Your AI
Git Co-Pilot
is ready for takeoff.
CommitPilot analyzes your staged changes, identifies logical patterns, and generates professional commit messages and PR descriptions following the Conventional Commits spec. 10 AI providers. Zero friction.
Everything you need in your Git workflow
CommitPilot is a professional-grade CLI tool — not a toy wrapper. It's built for real teams and real projects with security, privacy, and developer experience as first-class concerns.
Atomic Commit Splitter
Run cmt split to analyze a
large "Mega-Commit" and get logical suggestions to split it
into focused, atomic commits.
Branch-Aware Context
Automatically detects ticket IDs like
CP-123 from your branch name
and includes them in the commit header.
Smart Scoping
Suggests a commit scope based on the directory where most changes occurred, so your conventional commits are always accurate.
Local Rules Engine
Drop a .commitpilot file in
your project root to define team-specific AI instructions for
consistent commit style.
Pre-Flight Security Scanner
Automatically detects sensitive files like
.env,
.pem, or
credentials.json in staging
and halts to prevent secret leakage.
Privacy-First Mode
Enable cmt privacy on to mask
string literals in your diffs before they're sent to the AI —
protecting proprietary business logic.
Token Guard
Warns you before sending extremely large diffs to the LLM, preventing runaway costs or hallucinated messages from oversized context.
PR Description Generator
Run cmt pr to generate a full
PR title and body ready for GitHub. Integrates directly with
the gh CLI.
Visual Experience
Dynamic themed terminal UI, ASCII impact chart, real-time HUD showing model, latency, and estimated cost. Commit in style.
Installation
CommitPilot requires Node.js v18 or higher and Git installed in your environment.
Install globally so cmt is
available from any directory on your machine.
# Install globally from npm
npm install -g commitpilotai
# Verify the install
cmt --version
# Set up the native 'git c' alias (run once)
cmt alias install
Quick Start
After installation, run the auth wizard to connect your first AI provider, then you're ready to fly.
# 1. Configure your AI provider (interactive wizard)
cmt auth
# 2. Stage your changes
git add .
# 3. Generate your commit message
git c
# or equivalently
cmt
The git c alias requires
running cmt alias install once.
This registers a Git alias globally on your machine.
Command Reference
All commands are available under the
cmt (or
commitpilot) binary.
Primary Commands
Core workflow commands you'll use every day.
| Command | Description | Tag |
|---|---|---|
| cmt | Generate an AI commit message for your staged changes. The standard daily workflow command. | primary |
| cmt split | Analyze a large diff and receive suggestions to split it into multiple focused, atomic commits. | primary |
| cmt pr |
Generate a full PR title and description based on commits
since your base branch. Integrates with
gh CLI.
|
primary |
| cmt undo | Reverts the last commit while keeping all changes in the staging area, ready for a quick fix. | utility |
Configuration & Management
Control providers, models, and settings.
| Command | Description | Tag |
|---|---|---|
| cmt auth | Launch the interactive AI provider configuration wizard. Supports all 10+ providers. | config |
| cmt use <provider> | Quickly switch between previously configured providers without re-entering credentials. | config |
| cmt config | View your current active provider configuration and all saved provider profiles. | config |
| cmt model <name> |
Swap the specific model for the current provider (e.g.,
gpt-4o-mini,
gemini-2.0-flash).
|
config |
| cmt privacy <on/off> | Toggle string literal masking in diffs before sending to the AI. Protects business logic. | safety |
| cmt remove <provider> | Permanently delete a provider's credentials from local storage. | config |
| cmt alias install |
Registers the
git c shorthand globally.
Run once after install.
|
utility |
Flags
Pass flags to modify the behavior of a single command run without changing your global config.
cmt pr only. Explicitly
sets the target base branch for the pull request (e.g.,
--base develop).
# Generate a short, one-line commit
cmt --short
# Generate a detailed commit with body
cmt --long
# PR against the 'develop' branch
cmt pr --base develop
# Force commit past the security scanner
cmt --force
Supported AI Providers
CommitPilot uses the Vercel AI SDK to provide a unified interface
across all major LLM providers. Configure multiple providers and
switch between them instantly with
cmt use.
# Start the setup wizard
cmt auth
# Switch to a previously configured provider
cmt use openai
cmt use gemini
cmt use ollama
# Swap the model within the current provider
cmt model gpt-4o-mini
cmt model gemini-2.0-flash
cmt model llama3.2
Ollama runs 100% locally — no API key needed, no data leaves your machine. Perfect for air-gapped environments or maximum privacy.
Configuration
CommitPilot stores credentials and settings locally using
conf. You can also add a
.commitpilot file to your
repository root for project-level AI instructions.
Project-Level Rules (.commitpilot)
Drop a .commitpilot file in your
repo root. CommitPilot will append these instructions to every AI
prompt for that project.
# .commitpilot — project-level AI instructions
# These are appended to every prompt CommitPilot sends.
Always use past tense in commit messages.
Scope should always be one of: api, ui, db, auth, infra.
Reference Jira tickets in the format PROJ-XXXX.
Never use vague words like "fix", "update", or "change".
Privacy Mode
Enable privacy mode to mask string literals from your diffs before they're sent to external AI APIs.
# Enable privacy mode globally
cmt privacy on
# Disable it
cmt privacy off
# Check current config
cmt config
Privacy mode replaces string literals with placeholders like
[REDACTED_STRING]. This may
reduce commit message accuracy slightly. Recommended for repos
containing business-sensitive logic.
Technical Stack
CommitPilot is built with modern, production-grade libraries for reliability and extensibility.
{
"name": "commitpilotai",
"version": "1.0.6",
"engines": { "node": ">=18" },
"bin": {
"cmt": "./dist/index.js",
"commitpilot": "./dist/index.js"
},
"dependencies": {
"@ai-sdk/anthropic": "^1.1.9",
"@ai-sdk/google": "^1.1.11",
"@ai-sdk/groq": "^3.0.31",
"@ai-sdk/mistral": "^3.0.27",
"@ai-sdk/openai": "^1.1.9",
"ai": "^4.1.45",
"simple-git": "^3.27.0",
"@clack/prompts": "^0.9.1"
}
}
Contributing
Contributions of all kinds are welcome — bug reports, feature ideas, documentation improvements, and pull requests. Here's how to get started.
Fork & Clone
Fork the repository on GitHub and clone your fork locally.
git clone https://github.com/YOUR_USERNAME/commitpilot.git
cd commitpilot
git remote add upstream https://github.com/Aryan-Srivastava/commitpilot.git
Install & Link
Install dependencies and link the package globally for local testing.
npm install
npm run build
npm link # cmt now points to your local build
Create a Feature Branch
Always branch off main with
a descriptive name.
git checkout main && git pull upstream main
git checkout -b feat/your-feature-name
# or
git checkout -b fix/your-bug-fix
Develop, Lint, Commit
Make changes in src/. Run
lint before committing — and use CommitPilot itself to write
your commit!
npm run dev # run source directly
npm run build # compile TypeScript
npm run lint # ESLint + Prettier check
git add .
cmt # let CommitPilot write the commit message 🎉
Push & Open a PR
Push your branch and open a pull request against
main with a clear
description of your changes.
git push origin feat/your-feature-name
Code Standards: ESLint + Prettier are enforced.
Avoid any unless strictly
necessary for external library compatibility. Keep commits
atomic — use cmt split if your
diff grows too large.