@hpreet/gitpilot
v0.1.2
Published
AI-powered Git commit assistant — generates commit messages intelligently and fits seamlessly into your workflow.
Downloads
28
Maintainers
Readme
GitPilot 🚇
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.
🚀 Features
- Generate commit messages with AI (OpenAI by default)
- 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
⚡ Quick Start
1. Install GitPilot globally
npm install -g @hpreet/git-pilot2. Setup your AI provider
gitpilot setupFollow the prompts:
- Choose provider (OpenAI or local LLM)
- Enter your API key if needed
This creates your
~/.gitpilotrcwith defaults
3. Stage your changes
git add .4. Generate a commit message automatically
gitpilot commit- The AI will suggest a commit message
- You can approve or edit it (interactive mode)
5. Optional: provide your own message
gitpilot commit -m "Your commit message here"6. Advanced: Git wrapper mode
git commit -ai- Uses GitPilot as a drop-in replacement for
git commit - Only enable if you’re comfortable replacing Git binary
⚙ Configuration
GitPilot stores user preferences in:
~/.gitpilotrcExample:
{
"provider": "openai",
"apiKey": "YOUR_API_KEY_HERE",
"defaultCommitStyle": "concise"
}You can override settings using environment variables:
export GITPILOT_API_KEY="YOUR_API_KEY"🧉 Supported Providers
- OpenAI (default)
- Local LLMs (stub included; future support for Claude, GPT-4 local models)
📖 Contribution
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
🌟 License
MIT © Harpreet Singh
💬 Contact
- GitHub: https://github.com/singhhrpreet/git-pilot
- Email: [email protected]
