CLI-first AI commit messages. Git stays in the terminal.
Smart Commit uses AI to write clean, consistent, and professional commit messages so you can stay in flow. 🌊
Get up and running in seconds. No complex configuration required.
# 1. Install globally
npm install -g @viccalexander/smart-commit
# 2. Run it (first time walks you through setup)
git smart-commit
Whether you are vibe coding a side project or shipping production systems, Smart Commit keeps your Git history clean across iOS, frontend, backend, and everything in between.
It works just as well for Swift, JavaScript, Python, Go, Rails, infra repos, or monorepos 🫠.
- 🧠 Context-Aware: Understands your changes using LLMs.
- 🏷️ Auto-Tagging: Grabs Linear/Jira issue keys from your branch names automatically.
- 🎨 Scannable: Prepends emojis for a visual, readable history.
- 🛠️ Zero Ceremony: No pre-commit hooks or "standard-version" headaches.
Smart Commit acts as a smart wrapper around your staging and committing process:
- Scans your staged changes (or helps you stage them).
- Analyzes the diff to understand the intent of the code.
- Drafts a perfect commit message with an emoji and issue key.
- Asks for your vibe check—approve, edit, or cancel.
The Result: ✨ PROJ-123: Add intelligent retry logic to API client
- Implemented exponential backoff
- Added circuit breaker pattern
- OpenAI - GPT-5, GPT-4 models
- Anthropic - Claude 4.5 (Sonnet, Opus, Haiku)
- Google - Gemini 3 Flash/Pro
- Ollama - Local models (Llama, Mistral, CodeLlama, etc.)
- Custom models - Easy model switching
- Auto-detects issue keys from branch names (e.g.,
vicc-123) - Linear-friendly - Works with Linear's branch naming
- Any issue tracker - Supports any
prefix-numberformat
- Preview first - See the message before committing
- Edit mode - Tweak messages before committing (
-eflag) - Auto-commit - Fast path when you trust it (
-yflag) - Dry run - Test without committing (
--dry-run)
- Interactive wizard - One-time setup, auto-installs dependencies
- Multiple commands -
git smart-commitorsmart-commit - Built-in help -
--helpflag for documentation - Easy uninstall -
--uninstallwith smart detection
| Method | Command |
|---|---|
| npm (Best) | npm install -g @viccalexander/smart-commit |
| Homebrew | brew tap vicc/tap && brew install smart-commit |
| Manual | curl -o ~/bin/git-smart-commit https://raw.githubusercontent.com/vicc/smart-commit/main/bin/git-smart-commit |
The first time you run git smart-commit, a friendly wizard will help you:
- Set up the
llmCLI tool (automatic). - Connect OpenAI or Anthropic.
- Enter your API key.
- Select a model (e.g.,
gpt-4o-miniorclaude-3-haiku).
Need to change something later?
smart-commit --setup| Command | Action |
|---|---|
git smart-commit |
The Standard: Preview, then confirm. |
git smart-commit -y |
The Speedrun: Commit immediately without asking. |
git smart-commit -e |
The Perfectionist: Open in editor before saving. |
git smart-commit --dry-run |
The Lurker: See the message without committing. |
We follow a consistent style to make your git log look like a work of art:
- ✨ Feature: New functionality
- 🐛 Fix: Squashing bugs
- ♻️ Refactor: Code improvements (non-breaking)
- 🎨 UI: Changes to the look and feel
- 🔥 Cleanup: Removing code or files
- ⚡️ Perf: Improving performance
- 📝 Docs: Documentation changes
Got an idea to make it even better? Feel free to open an issue or submit a PR!
Philosophy: Good commit history is a love letter to future you or rather less of a FU to future you. 💌
Smart Commit itself is free and open source. You'll need an API key for cloud LLM providers:
- OpenAI - Pay-per-use (GPT-4o-mini is ~$0.01 per commit)
- Anthropic - Pay-per-use (similar pricing)
- Google - Pay-per-use (Gemini has free tier)
- Ollama - Completely free (runs locally)
Only file names and diff summaries are sent - not your actual code content. Smart Commit uses git diff --name-status to see what changed, which shows:
M src/components/Button.tsx
A src/utils/helpers.ts
The LLM sees file names and change types (Modified, Added, Deleted), never your source code.
Yes! Since only file names are sent (not code), it's safe for private repos. For extra security, use Ollama with local models.
Run the setup wizard again:
smart-commit --setupOr manually:
llm keys set openai # Switch provider
llm models default gpt-4o # Change modelCurrently, the format is fixed (emoji + subject + optional bullets). You can:
- Use
-eflag to edit messages before committing - Use
--dry-runto preview and copy messages - Change models for different writing styles
The emoji-based format is different from conventional commits (feat:, fix:, etc.). The emojis serve a similar purpose but are more visual. You can manually edit messages to conventional commit format using -e.
- OpenAI/Anthropic/Gemini down: The commit fails with an error. Fix connectivity or switch to Ollama.
- Slow API: The tool waits for a response (usually 2-5 seconds). Use
-yflag to speed up workflow once you trust the output. - Offline: Use Ollama with local models - works completely offline.
Not recommended. Smart Commit is designed for interactive use with preview/confirmation. For CI/CD, write commit messages in your scripts.
npm:
npm update -g @viccalexander/smart-commitHomebrew:
brew update
brew upgrade smart-commitAPI keys are stored by the llm tool in ~/.config/llm/keys.json. They're never sent anywhere except to your chosen LLM provider.
The llm tool supports one key per provider. To switch between accounts, run llm keys set <provider> to overwrite the stored key.
Just use regular git commands:
git add .
git commit -m "Your message"Smart Commit is optional - it doesn't replace or modify git's behavior.
MIT © Vicc Alexander 2026