Git Pilot is a Go-based CLI that helps you review local Git changes, generate AI-assisted commit messages with Groq, split commits file-wise or category-wise, and keep a human approval step before every commit and push.
- Secure API key storage via OS keychain (macOS Keychain, Linux libsecret, Windows Credential Manager)
- Interactive commit workflow with approval before each commit
- AI-generated commit messages with conventional prefixes such as
feat:,fix:, andrefactor: - File-wise commit mode
- AI group-wise commit mode for related changes
- Push and pull confirmation flows
- PR message generation from commit history
- Modern terminal UI with structured previews and summaries
brew tap mohammadumar-dev/tap
brew install gitpilotgo install github.com/mohammadumar-dev/gitpilot@latestDownloads the correct pre-built binary, verifies SHA256 checksum, and installs to /usr/local/bin:
curl -sSfL https://raw.githubusercontent.com/mohammadumar-dev/gitpilot/main/install.sh | shDownloads, verifies SHA256 checksum, installs to %LOCALAPPDATA%\Programs\gitpilot, and adds it to your user PATH automatically:
irm https://raw.githubusercontent.com/mohammadumar-dev/gitpilot/main/install.ps1 | iexgit clone https://github.com/mohammadumar-dev/gitpilot.git
cd gitpilot
make build- Git (required at runtime)
- A Groq API key for AI commit generation
Store your Groq API key securely using the auth command. The key is stored in the OS keychain where available, falling back to ~/.config/gitpilot/credentials (chmod 0600).
gitpilot auth loginYou will be prompted to paste your key — input is hidden and the key is validated before storing.
gitpilot auth status # show which source is active
gitpilot auth logout # remove stored keyThe environment variable GROQ_API_KEY always takes priority over stored keys (useful for CI/CD).
Set or inspect the Groq model:
gitpilot config groq-model llama-3.3-70b-versatile
gitpilot config showInitialize repository-local Git Pilot settings:
gitpilot initinit validates the current Git repository and seeds local Git config values such as gitpilot.groq-model and gitpilot.initialized.
Start interactive mode:
gitpilotRun a command directly:
gitpilot status
gitpilot diff
gitpilot commit
gitpilot push
gitpilot pull
gitpilot pr
gitpilot version
gitpilot helppush and pull both show a preview and ask for approval before running the underlying Git command. pull uses git pull --ff-only to avoid implicit merge commits.
gitpilot commitGit Pilot will:
- Inspect changed files.
- Ask whether to commit file-wise or AI group-wise.
- Generate one commit message at a time.
- Show the target files and message preview.
- Ask for
y/napproval before the actual commit. - Offer a push prompt after successful commits.
Direct modes are also supported:
gitpilot commit file main.go
gitpilot commit groupgitpilot pr # uses origin/main as base
gitpilot pr develop # uses a custom base branchgitpilot › commit
Select mode (1/2): 2
Approve commit for auth cleanup? [y/N]: y
Approve commit for docs update? [y/N]: n
Push committed changes now? [y/N]: y
.
├── main.go # CLI, Git integration, AI prompts, and terminal UI
├── go.mod # Go module definition
├── Makefile # Developer workflow (build, fmt, clean, release-dry)
├── .goreleaser.yml # Cross-platform release configuration
├── install.sh # Linux/macOS installer
├── install.ps1 # Windows PowerShell installer
├── install-test.sh # Local end-to-end installer test (8 tests, no GitHub needed)
├── README.md
├── AGENTS.md
├── LICENSE
└── .github/
└── workflows/
└── release.yml # Publishes release on git tag push
make build # build with version from git describe
make fmt # run gofmt
make clean # remove binary
make release-dry # test GoReleaser locally without publishingOr using Go directly:
go build -ldflags="-X main.version=dev" -o gitpilot .
go run . help
gofmt -w main.goTest the installer locally without a GitHub release:
sh install-test.sh- AI features require a valid Groq API key.
pullusesgit pull --ff-onlyto avoid implicit merge commits.- The tool currently keeps most logic in
main.go; future refactors can split command, UI, and AI logic into packages.
- Spinner/progress feedback for AI calls
- Editable AI-generated commit messages before approval
- Richer Git status breakdowns
- Homebrew tap support
- Better non-interactive scripting support
Contributions are welcome. Before opening a pull request:
- run
make fmt - run
go build ./... - test the command flow you changed
See AGENTS.md for repository-specific contribution guidance.
This project is licensed under the terms in LICENSE.