AI-powered Git commit assistant — generate meaningful, concise commit messages effortlessly. Designed to fit seamlessly into your workflow while keeping you productive and in control.
- Generate commit messages with AI (OpenAI by default)
- Supports hosted providers: OpenAI, Claude, and Gemini
- Supports local LLMs (Ollama, LLaMA, etc.)
- Interactive mode: approve or edit AI-generated messages
- Optional Git wrapper mode (
git commit -ai) - Minimal setup: works out-of-the-box with
gitpilot setup - Configurable via
~/.gitpilotrcor environment variables
npm install -g @hpreet/git-pilotgitpilot setup-
Follow the prompts:
- Choose provider (OpenAI, Claude, Gemini, or local LLM)
- Enter your API key if needed
-
This creates your
~/.gitpilotrcwith defaults
git add .gitpilot commit- The AI will suggest a commit message
- You can approve or edit it (interactive mode)
gitpilot commit -m "Your commit message here"git commit -ai- Uses GitPilot as a drop-in replacement for
git commit - Only enable if you’re comfortable replacing Git binary
GitPilot stores user preferences in:
~/.gitpilotrc
Example:
{
"provider": "openai",
"apiKey": "YOUR_API_KEY_HERE",
"defaultCommitStyle": "concise"
}You can override settings using environment variables:
export GITPILOT_API_KEY="YOUR_API_KEY"- OpenAI (default)
- Claude
- Gemini
- Local LLMs (stub included)
GitPilot is open source!
- Report issues, suggest features, or contribute via PRs
- Code style: ESLint + Prettier
- Follow standard Git workflow:
git clone,npm install,npm link
MIT © Harpreet Singh