AI-powered CLI that auto-generates conventional commit messages and pull request descriptions from your staged diffs.
What is Aigh?
Aigh (AI + GitHub) is a CLI tool that eliminates the friction of writing commit messages and pull request descriptions. Instead of context-switching to craft the perfect conventional commit or a thorough PR summary, you run a single command — aigh commit or aigh pr new — and AI drafts it for you in seconds.
You stay in control. Aigh always shows you the generated output and asks for confirmation before touching your repo. It's AI as a draft generator, not a decision maker.
The Problem It Solves
Writing consistent, meaningful commit messages and PR descriptions is cognitively expensive, especially under pressure. Teams that follow Conventional Commits benefit from structured history and automated changelogs, but enforcing the format manually creates friction.
Aigh removes that friction without sacrificing quality or discipline.
Core Features
aigh commit — AI commit messages
Aigh reads your staged diff and sends it to the AI provider of your choice. The response is a conventional commit message (feat:, fix:, chore:, etc.) that reflects exactly what changed.
git add src/auth.ts
aigh commit
# ✔ Generated: feat(auth): add JWT refresh token rotation
# Commit with this message? (Y/n)Pass -e / --editor to open the message in your editor before committing.
aigh pr new — AI pull request descriptions
Aigh diffs your branch against the base, reads your .github/pull_request_template.md (if present), and generates a complete PR title and body.
aigh pr new --base main --no-draft --webOptions:
| Flag | Description |
|---|---|
--base <branch> | Base branch to diff against (default: main) |
--no-draft | Create PR as ready-for-review |
--web | Open the created PR in the browser |
-e / --editor | Edit title/body before creating |
Multi-provider AI support
Configure any of the three major providers:
| Provider | Default model |
|---|---|
| OpenAI | gpt-4o |
| Anthropic Claude | claude-opus-4-5 |
| Google Gemini | gemini-pro |
Switch providers or models anytime via aigh config set.
aigh config — persistent configuration
aigh config setup # interactive wizard
aigh config get # show all settings
aigh config set provider openai
aigh config set model gpt-4oConfiguration is stored at ~/.aigh/config.json. API keys can also be set via environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY).
How It Works
staged diff / branch diff
│
▼
AI provider (OpenAI / Claude / Gemini)
│
▼
structured output (conventional commit or PR title+body)
│
▼
interactive confirmation prompt
│
▼
git commit -m … / gh pr create …
The tool is intentionally thin. It shells out to git and the official gh CLI — no custom API calls to GitHub, no credential management, no side effects beyond what you approve.
Installation
npm install -g aighPrerequisites: Node.js ≥ 18, git, and gh CLI authenticated (gh auth login).
Tech Stack
- TypeScript — strict mode, compiled with esbuild to a single
dist/cli.js - Vercel AI SDK — unified interface for OpenAI, Anthropic, and Google providers
- execa — process execution for
gitandghcommands - inquirer — interactive terminal prompts
- meow — CLI argument parsing
- ora + chalk — spinner and colored output
Design Philosophy
- AI drafts, human approves — every generated output goes through an interactive confirmation step
- No magic — aigh wraps
gitandgh; it doesn't reimplement them - Provider agnostic — bring your own API key and preferred model
- Convention first — output follows Conventional Commits and Angular commit style
Status
Aigh is actively maintained at v1.1.0. Releases are automated via semantic-release from conventional commits (of course). Future work includes a code review command (aigh review), customizable prompts, and smarter context gathering (file names, surrounding code).