// the find
appleboy/CodeGPT
A CLI written in Go language that writes git commit messages or do a code review brief for you using ChatGPT AI (gpt-4.1, gpt-4o model) and automatically installs a git prepare-commit-msg hook.
A Go CLI that writes git commit messages and brief code reviews by sending your staged diff to an LLM, with a prepare-commit-msg hook so it fires automatically on `git commit`. Built for developers who want AI-generated commit messages without leaving the terminal, and who are picky about which provider their code diffs get sent to.
Provider support is genuinely broad and well-abstracted — OpenAI, Azure OpenAI, Gemini (both API and VertexAI backends), Anthropic, Groq, Ollama, OpenRouter, and a LiteLLM proxy all go through the same config surface, so switching providers is a few `config set` calls, not a rewrite. The credential handling is more thought-through than most CLIs this size: OS keyring storage with a 0600 file fallback, plus an `api_key_helper` mechanism that shells out to 1Password/AWS/GCP secret managers with a configurable refresh interval, so keys never have to sit in the config file. Commit messages are template-driven (Go templates, custom vars, vars-from-file) rather than hardcoded strings, and the repo backs this with CI badges that are actually meaningful — lint, Trivy security scan, and codecov, not just decoration.
Default `max_tokens` is 300, which is thin for anything beyond a one-line commit message or a review of more than a trivial diff — users will hit truncated output before they realize they need to raise it. The code review feature only looks at the diff, not surrounding file context, so it can confidently flag or miss things a reviewer with the whole file open wouldn't; the PHP example in the README is a reasonable catch but a diff-only reviewer will miss plenty in larger changes. The `api_key_helper` design, while clever, means CodeGPT executes arbitrary shell commands from a config file — fine if you wrote that config, a real risk if it's ever synced or shared across a team without review. Output translation is capped at three languages (zh-tw, zh-cn, ja), so it's of limited use outside those locales.