Git Genie — Usage Guide
Essence:
ggautomates staging, Conventional Commit creation (Gemini), branch flow, optional merge to main, and push. Now includes secure API key storage and AI-powered branch/PR naming.
Quick start
Global install:
npm install -g @gunjanghate/git-genie
Configure your Gemini API key (one time):
gg config YOUR_GEMINI_API_KEY_HERE
Make a commit with AI assist:
gg "add user profile section" --type feat --scope ui --genie
Install & verify
which gg # macOS / Linux Get-Command gg # PowerShell gg --help # Shows banner + onboarding instructions
Use ad‑hoc (no global install):
npx @gunjanghate/git-genie "fix typo" --genie
Configure Gemini API key
Priority order used by the CLI:
GEMINI_API_KEYenv var (process.env)- OS keychain (macOS Keychain, Windows Credential Vault, Linux Secret Service)
- Encrypted fallback:
~/.gitgenie/config.json
Store key (overwrites existing):
gg config <API_KEY>
Remove or rotate stored key:
# Recommended: rotate (overwrite existing key) gg config <NEW_GEMINI_API_KEY>
To completely remove the key GitGenie uses:
- Delete the encrypted fallback file (if it exists):
rm ~/.gitgenie/config.json
- Remove the entry from your OS keychain using your OS tooling (Keychain Access, Credential Manager, Secret Service, etc.).
GitGenie stores the key in the OS keychain under:
- service: GitGenie
- account: gemini_api_key
Rotating keys: you can always run gg config <NEW_GEMINI_API_KEY> again to overwrite the existing one (useful when hitting quota limits).