01
Analyze the current diff
Run smartcommit plan and let the CLI inspect the changes currently in your working tree.
AI Git Commit CLI
Smartcommit is an AI Git commit CLI that groups related changes, splits diffs into logical commits, and helps you generate clearer commit messages from the terminal.
npm install -g @jccm6/smartcommit-cli
Free to use. Bring your own API key. Works across macOS, Windows, and Linux.
No subscriptions, no hidden fees. You use your own API keys, meaning you only pay the provider directly for what you use.
Stores preferences in .smartcommitrc and keeps your API credentials safely managed in your OS keychain.
Seamless support for OpenAI, Anthropic, xAI, and Codex CLI (Local ChatGPT sessions).
How it works
Smartcommit is built for developers who want atomic commits without wasting time in manual staging. It keeps your workflow in the terminal and adds an AI commit planning layer on top of Git.
01
Run smartcommit plan and let the CLI inspect the changes currently in your working tree.
02
The AI provider proposes logical commit boundaries so refactors, fixes, and features do not end up mixed together.
03
Review the plan, accept the grouped commits, and keep a cleaner, more understandable Git history.
Security
smartcommit init stores local preferences in .smartcommitrc, but keeps your API keys secure. Credentials are automatically managed in your OS
keychain (Apple Keychain, Windows Credential Manager, or Linux Secret Service).
smartcommit providers$ smartcommit providers
Available providers:
openai (active)
anthropic
codex-cli
$ _
Commit planning
Run smartcommit plan to read the current Git diff. It asks the configured AI provider for structured atomic commit suggestions and renders an interactive
preview.
It can intelligently split different hunks from the same file into separate logical commits, helping you avoid noisy history and manual `git add -p` sessions.
$ smartcommit plan
Analyzing current Git diff...
Generating atomic commits via AI...
Use cases
Separate fixes, refactors, and feature work into logical commits before opening a pull request.
Keep commit history consistent with clearer summaries and conventional commit-friendly suggestions.
Reduce time spent in interactive staging when a diff contains several unrelated logical changes.
Stay in the CLI, bring your own AI provider, and use Smartcommit without changing the way your team already works with Git.
Safety
Made a mistake? smartcommit undo removes only the commits created by the latest accepted plan and restores their changes to the working tree safely.
Undo metadata is stored locally and never added to your repository history.
$ smartcommit undo
Locating latest smartcommit run...
Undoing 2 commits:
- feat: add anthropic provider support
- fix: fallback to auth.json
✔ Success: Changes restored.
$ _
FAQ
Smartcommit is an AI Git commit CLI that turns a messy diff into a preview of logical atomic commits before you create them.
Instead of manually picking hunks one by one, Smartcommit proposes commit boundaries based on the intent of the changes in your diff.
Yes. Smartcommit is well suited for conventional commit workflows because it helps separate changes into clearer units with stronger commit summaries.
Yes. Smartcommit is free to use. You bring your own provider API key and pay the provider directly when applicable.
Install the free AI Git commit CLI globally and start building cleaner commit history faster.
npm install -g @jccm6/smartcommit-cli