gitbot-cli
v1.1.0
Published
Production-grade, model-agnostic Git commit assistant CLI for semantic versioning and Conventional Commits
Downloads
155
Maintainers
Readme
GitBot
AI-powered Git commit message generator and repository assistant. Uses staged diff only; works with Ollama, OpenAI, Anthropic, Groq, and Google (Gemini).
Install
# npm (package name: gitbot-cli)
npm install -g gitbot-cli
# pnpm
pnpm add -g gitbot-cli
# yarn
yarn global add gitbot-cli
# bun
bun add -g gitbot-cliThen run gitbot init in your repo (creates .git if missing), then gitbot commit to commit. The gb and gitbot-cli aliases also work.
Quick Start (from source)
pnpm install && pnpm build
# First time: set up config (creates .git if missing)
node dist/index.js init
# Stage and commit
git add .
node dist/index.js commitConfig
.gitbotrc.json in project root. Run gitbot config --init to create it. Set provider to ollama (default), openai, anthropic, groq, or google. Store API keys in environment variables (OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, etc.) for security.
Commands
| Command | Description |
|---------|-------------|
| gitbot init | Interactive setup; runs git init if no .git |
| gitbot commit | Generate message from staged diff and commit |
| gitbot status | Show staged/unstaged summary and AI-generated summary |
| gitbot add [paths...] | Stage specific files, or (with no paths) let AI recommend what to stage (-m for context) |
| gitbot review | AI code review of staged changes in the style of Linus Torvalds |
| gitbot check | Health check GitBot setup; use --convention <type> to verify code conventions |
| gitbot diff [paths...]| Show git diff with an AI-generated summary of changes |
| gitbot cache | Manage the GitBot diff cache (--stats, --clear) |
| gitbot config | Show config; --init creates .gitbotrc.json, or update key/value pairs |
Commit Options:
--dry-run: Preview commit without executing-y,--yes: Skip interactive prompts-n,--no-verify: Skip pre-commit hooks--amend: Amend the previous commit- Override provider/model with
-p,-m
Convention Types for check:
function_naming,variable_naming,file_naming
.gitbotignore
Exclude paths from diff analysis and AI staging (e.g. .env, *.key). Same pattern syntax as .gitignore.
Proprietary. See LICENSE (EULA) for terms.
