@ahalberkamp/aicommit
v2.0.0
Published
Generate clean git commit messages from staged changes using Codex or Claude Code.
Maintainers
Readme
aicommit
Generate clean Git commit messages from staged changes using Codex or Claude Code.
Table of Contents
Features
- Stages files and folders you pass in
- Reads the staged Git diff
- Uses Codex or Claude Code to suggest a commit message
- Detects ticket IDs from the current branch name, such as
ABC-123 - Lets you:
- commit
- commit and push
- edit the message manually
- regenerate the suggestion
- abort
Requirements
- Node.js 18 or newer
- Git
- Codex CLI or Claude Code installed and available in your shell
Installation
Install using npm:
npm install --global @ahalberkamp/aicommitInstall using Homebrew:
brew tap andihalberkamp/tap
brew install andihalberkamp/tap/aicommitPlatform Notes
macOS
Make sure these are installed and available in your terminal:
nodegitcodexclaudeif you want to use Claude Code
Linux
Install Node.js, Git, and either Codex or Claude Code with your preferred package manager or installer.
Windows
Use one of these:
- PowerShell
- Windows Terminal
- Git Bash
- WSL
For the best experience, Git Bash or WSL is recommended.
Usage
Stage everything and generate a commit
aicommitBy default, aicommit tries codex first and falls back to claude if Codex is not installed.
Stage a specific folder
aicommit srcStage multiple paths
aicommit src package.json README.mdChoose the AI CLI explicitly
aicommit --provider codex
aicommit --provider claudeYou can also set the provider permanently with an environment variable:
AICOMMIT_PROVIDER=claude aicommit srcTypical Flow
When you run the command:
- The provided paths are staged with
git add - The staged diff is collected
- The selected AI CLI generates a commit message
- You choose one of these actions:
(y) commit
(p) commit+push
(e) edit
(r) regenerate
(n) abortTicket Prefix Support
If your current Git branch contains a ticket ID like:
ABC-123-add-login-validationaicommit will try to prefix the commit message like this:
ABC-123: Improve login validation for empty password input.License
MIT. See LICENSE.
