Skip to content

smic29/ai-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ai-helper

Tiny CLI to generate AI-ready prompts from any Git repo.

Installation

  1. Clone this repo somewhere in your home directory (e.g., ~/ai-helper):

    git clone git@github.com:your-org/ai-helper.git ~/ai-helper
  2. Run make install or sudo make install

    Or if you prefer manually doing stuff, add the bin/ folder to your shell PATH (zsh example):

    echo 'export PATH="$HOME/ai-helper/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
  3. (Optional) If you want to keep templates in a custom location, set AI_HELPER_HOME:

    export AI_HELPER_HOME="$HOME/ai-helper"

    By default, templates are loaded from scripts/templates/ inside this repo.

Usage

Run from inside any Git repo:

ai-helper help                     # show available commands
ai-helper pr-review                # diff vs origin/main
ai-helper pr-review develop        # diff vs develop

Example:

ai-helper pr-review
  • Generates a PR review prompt based on your local branch’s diff vs origin/main
  • Inserts the diff into templates/pr_review.md
  • Copies the full prompt to your clipboard
  • Paste directly into ChatGPT / DeepSeek / Claude, etc.

How it works

  • ai-helper is a Bash script that wraps git diff.
  • Each command (like pr-review) corresponds to a template file in templates/.
  • Templates are plain Markdown with placeholders (currently only {{DIFF}}).
  • The script substitutes your Git diff into the template and sends it to your clipboard (pbcopy on macOS).

Example template (templates/pr_review.md):

Please review the following pull request:

Diff:
{{DIFF}}

When you run:

ai-helper pr-review

…it replaces {{DIFF}} with the actual Git diff and copies the full prompt.

Intended Use

  • Save time writing AI prompts when reviewing code
  • Standardize the way you ask ChatGPT/DeepSeek for reviews
  • Extendable: add more templates for commit messages, code explanations, etc.
  • Lightweight: no Ruby, Python, or Node dependency — just Git + Bash

About

a CLI tool that copies a standard prompt to clipboard.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors