Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (wizardcommit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
commitwizard ✦
AI-powered git commit messages. Works with your Claude Code account — no API key needed.
Stage your changes, run commitwizard, and pick from smart suggestions following the Conventional Commits specification.
✦ commitwizard · AI-powered git commit messages
3 files · +87 · -12
? Commit type:
❯ ✦ auto AI decides based on the diff
feat — new feature
fix — bug fix
refactor — no behavior change
…
? Ticket / issue (optional — Enter to skip): PROJ-123
╌╌╌ Suggestions ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌
1. feat(auth): add JWT refresh token rotation [PROJ-123]
2. feat(auth): implement silent token renewal on expiry [PROJ-123]
3. refactor(auth): extract token lifecycle into dedicated service [PROJ-123]
? Select a commit message: › …With --body, each suggestion includes a detailed explanation:
1. feat(auth): add JWT refresh token rotation [PROJ-123]
Implement refresh token rotation to reduce the risk of token theft.
Each refresh invalidates the previous token and issues a new pair.Features
- Zero config — works out of the box if you have Claude Code installed
- Commit type selector — interactive menu to pick
feat,fix,refactor… or let AI decide - Ticket / issue linking — auto-detects Jira/Linear/GitHub issue numbers from your branch name, appends
[PROJ-123]to the message - Commit body generation —
--bodygenerates a detailed why/what paragraph below the subject line - Scope enforcement —
--scope authforces(auth)in every suggestion - Breaking change flag —
--breakingappends!to the commit type (feat!:,feat(api)!:) - Multiple suggestions — pick the best one, or regenerate
- Conventional Commits —
feat,fix,docs,refactor,chore, and more - Gitmoji support —
--emojiflag adds relevant emojis - Multi-language — write commit messages in any language
- Style matching — reads recent commits to match your project's style
- Auto-commit mode —
--yesfor scripting and hooks - Dry-run mode — preview without committing
- Clipboard copy —
--copysends the message to your clipboard - Configurable model — Haiku (fast/cheap), Sonnet, or Opus
Install
npm install -g wizardcommitThen run with:
commitwizardRequirements
One of the following AI providers:
| Provider | Setup |
|---|---|
| ✅ Claude Code installed | Nothing — just works |
| 🟣 Anthropic (Claude) | export ANTHROPIC_API_KEY=sk-ant-... |
| 🟢 OpenAI (ChatGPT) | export OPENAI_API_KEY=sk-... |
| 🔵 Google (Gemini) | export GEMINI_API_KEY=... |
Provider is auto-detected from your environment variables.
Usage
git add .
commitwizardOptions
| Flag | Description |
|---|---|
-y, --yes |
Auto-commit with the top suggestion |
-b, --body |
Generate a detailed commit body (why/what paragraph) |
-s, --scope <name> |
Force a scope: all suggestions use type(name): … |
-B, --breaking |
Mark as breaking change — appends ! to the commit type |
-e, --emoji |
Add gitmoji to the description |
-l, --lang <lang> |
Language: tr, de, fr, es… |
-p, --provider <name> |
AI provider: anthropic, openai, gemini (default: auto) |
-m, --model <name> |
Model alias: haiku/sonnet/opus · gpt-mini/gpt · flash/pro |
-n, --count <n> |
Number of suggestions (default: 3) |
-t, --type <type> |
Force a type: feat, fix, docs… (skips interactive selector) |
--ticket <id> |
Ticket / issue reference to append: PROJ-123, #45 |
--dry-run |
Generate without committing |
--copy |
Copy selected message to clipboard |
--no-history |
Skip recent commit history context |
Examples
# Interactive (default)
commitwizard
# Auto-commit the best suggestion
commitwizard --yes
# Use Sonnet for harder diffs
commitwizard --model sonnet
# Commit message in Turkish with emojis
commitwizard --lang tr --emoji
# Force fix type (skips type selector)
commitwizard --type fix
# Attach a Jira ticket manually
commitwizard --ticket PROJ-123
# Branch named feature/PROJ-456-login → ticket auto-detected
commitwizard
# Preview only
commitwizard --dry-run
# Generate with a detailed body paragraph
commitwizard --body
# Body + auto-commit
commitwizard --body --yes
# Force scope — all suggestions use type(api): …
commitwizard --scope api
# Mark as breaking change — appends ! to the type
commitwizard --breaking
# Combine: feat(auth)!: …
commitwizard --type feat --scope auth --breakingConfiguration
commitwizard config # show current config
commitwizard config --set-provider openai # switch to ChatGPT
commitwizard config --set-provider gemini # switch to Gemini
commitwizard config --set-model gpt # set default model
commitwizard config --set-lang tr
commitwizard config --set-count 5
commitwizard config --toggle-emoji
commitwizard config --toggle-body # always generate commit body by defaultConfig is saved at ~/.config/ai-commit/config.json. Add .ai-commitrc.json to any project root for project-specific defaults.
Git hook
Auto-launch on every commit by adding to .git/hooks/prepare-commit-msg:
#!/bin/sh
exec < /dev/tty
commitwizardModels
Claude (Anthropic)
| Alias | Model | Speed | Cost |
|---|---|---|---|
haiku (default) |
claude-haiku-4-5 | ⚡ Fast | $ Low |
sonnet |
claude-sonnet-4-6 | ◈ Balanced | $$ Medium |
opus |
claude-opus-4-7 | ◉ Best quality | $$$ Higher |
ChatGPT (OpenAI)
| Alias | Model | Speed | Cost |
|---|---|---|---|
gpt-mini (default) |
gpt-4o-mini | ⚡ Fast | $ Low |
gpt |
gpt-4o | ◈ Balanced | $$ Medium |
o1 |
o1 | ◉ Best quality | $$$ Higher |
Gemini (Google)
| Alias | Model | Speed | Cost |
|---|---|---|---|
flash (default) |
gemini-2.0-flash | ⚡ Fast | $ Low |
pro |
gemini-1.5-pro | ◈ Balanced | $$ Medium |
When using Claude Code (no API key), the model flag is ignored — Claude Code handles routing automatically.