AI-powered commit message generator using conventional commit format.
- Analyzes git diffs to generate semantic commit messages
- Follows conventional commits format
- Smart diff compression for large changesets
- Extracts semantic info (functions, types, classes) for better context
- Interactive file selection when no changes are staged
- Built-in release management with changelog generation
brew install seanmozeik/tap/aicRequires Bun runtime.
git clone https://github.com/seanmozeik/AICommit.git
cd AICommit
bun install
bun run buildaic uses Cloudflare Workers AI. You'll need a Cloudflare account with Workers AI access.
aic setupThis prompts for your credentials and stores them securely:
- macOS: Keychain
- Linux: libsecret (GNOME Keyring, KWallet, etc.)
- Windows: Credential Manager
To remove stored credentials:
aic teardownAlternatively, add to your shell profile:
export AIC_CLOUDFLARE_ACCOUNT_ID=your-account-id
export AIC_CLOUDFLARE_API_TOKEN=your-api-token# Generate commit message for staged changes
aic
# If nothing is staged, aic lets you select files interactively- Stage your changes with
git add(or let aic help you select) - Run
aic - Optionally describe your changes when prompted
- Review the generated message
- Confirm to commit, edit, or copy to clipboard
aic includes a complete release pipeline with AI-generated changelogs.
# Initialize release config
aic release init
# Create a release
aic release patch # 1.0.0 → 1.0.1
aic release minor # 1.0.0 → 1.1.0
aic release major # 1.0.0 → 2.0.0- Version bump - Updates package.json, pyproject.toml, Cargo.toml, etc.
- [release] scripts - Runs build, test, packaging commands from
.aic - Changelog - AI analyzes commits since last tag, generates user-friendly changelog
- Commit & tag - Creates release commit and git tag
- Push - Optionally pushes to remote with tags
- [publish] scripts - Runs publish commands (npm publish, GitHub release, etc.)
Create a .aic file in your project root to configure release scripts:
[release]
# Commands run BEFORE commit/tag (build, test, package)
bun run build
bun test
[publish]
# Commands run AFTER push (npm publish, GitHub release, etc.)
npm publishUse \ for line continuations:
[publish]
# Update Homebrew formula and push to tap
VERSION=$(bun -p "require('./package.json').version") && \
sed -i '' "s/version \".*\"/version \"$VERSION\"/" Formula/app.rb && \
cp Formula/app.rb ~/homebrew-tap/Formula/ && \
cd ~/homebrew-tap && git add -A && git commit -m "app $VERSION" && git push- Lines starting with
#are comments - Empty lines are ignored
- Commands run sequentially; if one fails, release aborts
- All shell features work: pipes, redirects,
&&,$(), etc.
[release]
# Clean and build
rm -rf dist
bun run build
# Cross-compile binaries
bun build ./src/index.ts --compile --target=bun-darwin-arm64 --outfile dist/app-darwin-arm64
bun build ./src/index.ts --compile --target=bun-linux-x64 --outfile dist/app-linux-x64
# Create archives
cd dist && for f in app-*; do tar -czvf "${f}.tar.gz" "$f" && rm "$f"; done
[publish]
# Create GitHub release with binaries
gh release create "v$(bun -p "require('./package.json').version")" \
dist/*.tar.gz \
--title "v$(bun -p "require('./package.json').version")" \
--notes-file /tmp/release-notes.mdSee .aic.example for more examples including Homebrew formula updates, npm/PyPI publishing, and Slack notifications.
- Parses unified diff output from git
- Classifies files (included, summarized, excluded)
- Extracts semantic information (new functions, types, classes)
- Compresses large diffs to fit token limits
- Sends context to AI with conventional commit guidelines
- Validates and formats the response
- Git
- Cloudflare account with Workers AI access
For clipboard support on Linux, install one of:
xclip(X11)xsel(X11)wl-copy(Wayland)
MIT