AI-powered Git CLI β generate commit messages, review code, manage workflows, all from your terminal. Written in Rust.
Rust rewrite inspired by gcop by Undertone0809.
- AI Commit Messages β Generate conventional commits via Claude, OpenAI, Gemini, or Ollama
- Code Review β AI-powered review with security & performance insights
- Monorepo Support β Auto-detect Cargo, Pnpm, Npm, Lerna, Nx, Turbo workspaces and infer commit scope
- Git Aliases β Shortcuts like
git c,git r,git acpfor streamlined workflow - Git Hook β
prepare-commit-msghook for seamless editor integration - Custom Providers β Any OpenAI/Claude-compatible API (DeepSeek, custom endpoints, etc.)
- Custom Prompts β Template variables for commit & review prompt customization
- Project Config β Per-repo
.gcop/config.tomloverrides user config - GPG Signing β Full support via native git
- Beautiful CLI β Spinner animations, streaming output, colored text, interactive menus
# Homebrew (macOS/Linux)
brew tap AptS-1547/tap
brew install gcop-rs
# pipx (Python users)
pipx install gcop-rs
# cargo-binstall (prebuilt binary, no compilation)
cargo binstall gcop-rs
# cargo install (from source)
cargo install gcop-rsSee Installation Guide for more options.
gcop-rs initThe interactive wizard creates your config file and optionally installs git aliases.
Or set up manually β use gcop-rs config edit to open your config in the system editor:
[llm]
default_provider = "claude"
[llm.providers.claude]
api_key = "sk-ant-your-key-here"
model = "claude-sonnet-4-5-20250929"Config locations: ~/.config/gcop/ (Linux), ~/Library/Application Support/gcop/ (macOS), %APPDATA%\gcop\config\ (Windows).
Environment overrides: GCOP__LLM__PROVIDERS__CLAUDE__API_KEY, etc. See Configuration Guide.
git add .
gcop-rs commit # Generate AI commit message β review β commit
gcop-rs review changes # AI review of working tree changes
# Or with aliases (after gcop-rs alias):
git c # = gcop-rs commit
git acp # Add all β AI commit β pushThe commit workflow is interactive β after generation, you can accept, edit, retry, or retry with feedback (e.g. "use Chinese", "be more concise") to refine the result.
| Command | Description |
|---|---|
gcop-rs commit |
Generate AI commit message for staged changes |
gcop-rs review <target> |
Review changes / commit <hash> / range <a..b> / file <path> |
gcop-rs init |
Interactive configuration setup |
gcop-rs config edit |
Edit config with post-save validation |
gcop-rs config validate |
Validate config & test provider connection |
gcop-rs alias |
Install / list / remove git aliases |
gcop-rs stats |
Repository commit statistics |
gcop-rs hook install |
Install prepare-commit-msg hook |
gcop-rs hook uninstall |
Remove the hook |
Global flags: -v verbose, --provider <name> override, --format text|json|markdown, --dry-run.
See Command Reference for full details.
Install with gcop-rs alias or during gcop-rs init.
| Alias | Action |
|---|---|
git c |
AI commit |
git r |
AI review changes |
git s |
Repository stats |
git ac |
Add all + AI commit |
git cp |
AI commit + push |
git acp |
Add all + AI commit + push |
git gconfig |
Edit gcop-rs config |
git p |
Push |
git pf |
Force push (--force-with-lease) |
git undo |
Undo last commit (keep staged) |
Manage: --list, --force, --remove --force. See Aliases Guide.
The current roadmap focuses on reliability and maintainability before adding more surface area. The next implementation priority is the public refactor plan in #39, which splits high-traffic modules and reduces duplicated commit generation logic.
Planned follow-up phases:
- Phase 1: Reliability diagnostics and daily workflow polish (#40) β add
gcop-rs doctor, improvereviewfor CI usage, add commit message validation, and make split mode easier to override. - Phase 2: LLM quality guardrails and machine-readable contracts (#41) β add prompt/response regression fixtures, provider capability metadata, stable JSON schema versions, and groundwork for split commit recovery.
- Phase 3: Distribution and ecosystem polish (#42) β add shell completions, man pages or generated CLI references, verbose version metadata, release checksums, and stronger installation docs.
The roadmap is intentionally scoped: stabilize AI-generated workflows, make failures diagnosable, and keep automation-friendly output reliable before expanding into larger new features.
- Installation β All installation methods
- Configuration β Complete config reference
- Commands β Detailed command docs
- Providers β Provider setup (Claude, OpenAI, Gemini, Ollama, custom)
- Custom Prompts β Template variables and examples
- Git Aliases β Full aliases reference
- Troubleshooting β Common issues and solutions
- Git 2.0+
- API key for at least one provider (Claude, OpenAI, Gemini), or local Ollama
- Rust 1.88.0+ (only if building from source)
MIT β see LICENSE.
This project is a Rust rewrite inspired by gcop by Undertone0809. The core concept of AI-powered commit message generation originated from that project.