SmartCommit is a blazing-fast CLI tool that uses AI to generate meaningful Git commit messages from your staged changes — powered by local or remote LLMs (Ollama, OpenAI, or any HTTP-based LLM).
- 🔍 Reads your staged Git diff
- 🤖 Supports multiple LLM providers: Ollama, OpenAI, HTTP endpoints (Claude, Gemini, etc.)
- ✏️ Customizable system prompt (edit in Vim)
- ⚡ Interactive flow with options to commit, edit, regenerate, or quit
- ⚡ One‐shot
--yesflag for auto‐commit - 📦 Single static binaries for Linux, macOS (Intel/ARM), and Windows
- 🔖
--versionflag andversionsubcommand
go install github.com/manyfacedqod/smartcommit@latest-
Visit the Releases page.
-
Download the
.tar.gzfor your OS and extract:tar -xzf smartcommit-<os>.tar.gz
-
Move the binary into your
PATH:mv smartcommit-<os> /usr/local/bin/smartcommit # or equivalent chmod +x /usr/local/bin/smartcommit
smartcommit setupConfigure in an interactive prompt:
- Provider:
ollama,openai, orhttp - Model name: e.g.,
llama3,gpt-4,gemini - API Key (HTTP/OpenAI) or Base URL (HTTP/Ollama)
- System prompt saved to
~/.config/smartcommit/config.yaml
git add .
smartcommit generate💡 Generated Commit Message:
fix: handle empty username in login flow
Choose [c]ommit, [e]dit, [r]egenerate, [q]uit:
- c: commit
- e: inline edit via PromptUI
- r: regenerate
- q: quit
smartcommit generate --yessmartcommit config show # display current config
smartcommit config edit # edit system prompt in $EDITORsmartcommit --version
smartcommit version| Command | Description |
|---|---|
smartcommit setup |
Configure your LLM provider and settings |
smartcommit generate |
Generate commit message from staged diff |
smartcommit generate --yes |
Auto‑generate & commit without prompt |
smartcommit config show |
Display current configuration |
smartcommit config edit |
Edit the system prompt using your $EDITOR |
smartcommit --version |
Show the CLI version |
smartcommit version |
Same as --version |
We welcome your contributions! 🚀
-
Fork the repo and clone your fork:
git clone https://github.com/manyfacedqod/smartcommit.git cd smartcommit -
Create a feature branch:
git checkout -b feat/your-feature
-
Make changes, add tests, and update docs.
-
Run tests & build:
go test ./... go build -
Commit, push, and open a Pull Request.
- Follow existing code style and idioms.
- Use Conventional Commits (
feat:,fix:,docs:, etc.). - Write clear tests for new features or fixes.
- Update this README when adding or changing commands.
(this one kinda ai generated, will update later)
MIT License © manyfacedqod