v1.0.6 just shipped — latest release Apr 11, 2026

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.

$
npm install -g commitpilotai
commitpilot — bash
~/project $git add .
~/project $cmt

✈ CommitPilot — Cockpit Dashboard
Repo my-awesome-app
Branch feat/CP-42-user-auth
Staged 3 files (+127 / -18)
Scanner ✓ No sensitive files detected

🧠 Analyzing diff with gemini-2.0-flash…

✓ Suggested commit:
feat(auth)[CP-42]: implement JWT-based user authentication

- Add login endpoint with bcrypt password validation
- Introduce JWT token generation and refresh logic
- Guard protected routes via middleware

Impact Logic ███████░░░ 72% · Tests ███░░░░░░░ 28%
HUD gemini-2.0-flash · 1.4s · ~$0.0003

Commit? (Yes / Edit / Regenerate / No)
10+
AI Providers
v1.0.6
Latest Version
MIT
License
Node 18+
Requirement
TS
Built with TypeScript

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.

bash
# 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.

bash
# 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.

-s, --short
Forces a concise, single-line conventional commit. Ideal for small, obvious changes.
-l, --long
Generates a detailed commit with a technical bulleted body. Best for feature work or complex refactors.
-f, --force
Bypasses the Pre-Flight Security Scanner. Use with extreme caution — only when you've confirmed staged files are safe.
-b, --base <branch>
For cmt pr only. Explicitly sets the target base branch for the pull request (e.g., --base develop).
bash — flag examples
# 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.

🔵 Google Gemini
🟢 OpenAI
🟣 Anthropic (Claude)
🦙 Ollama Local
🌐 Perplexity
🔀 OpenRouter Free models
🌊 Mistral
⚡ Groq
🌙 Moonshot (Kimi)
🎉 MiniMax
bash — switching providers
# 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
# .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.

bash
# 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.

TypeScript
Core language — strict types, 87.2% of codebase
Vercel AI SDK
Unified multi-provider LLM interface
@clack/prompts
Beautiful interactive CLI components
simple-git
Programmatic Git orchestration
boxen & kleur
Rich terminal aesthetics & framing
cac
CLI argument parsing & command routing
conf
Persistent local credential storage
zod
Runtime schema validation
ESLint + Prettier
Strict linting and formatting enforcement
package.json — key dependencies
{
  "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.

1

Fork & Clone

Fork the repository on GitHub and clone your fork locally.

bash
git clone https://github.com/YOUR_USERNAME/commitpilot.git
cd commitpilot
git remote add upstream https://github.com/Aryan-Srivastava/commitpilot.git
2

Install & Link

Install dependencies and link the package globally for local testing.

bash
npm install
npm run build
npm link   # cmt now points to your local build
3

Create a Feature Branch

Always branch off main with a descriptive name.

bash
git checkout main && git pull upstream main
git checkout -b feat/your-feature-name
# or
git checkout -b fix/your-bug-fix
4

Develop, Lint, Commit

Make changes in src/. Run lint before committing — and use CommitPilot itself to write your commit!

bash
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 🎉
5

Push & Open a PR

Push your branch and open a pull request against main with a clear description of your changes.

bash
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.