Quick answers to common questions about nocommit.
Common Errors
"Missing API Key"
Configure your API key:
nocommit config set GEMINI_API_KEY=<your token>Get your key for free from Google AI Studio.
"No staged changes found"
Stage your changes first:
git add .
nocommitOr use the --all flag to automatically stage all tracked files:
nocommit --all"Not a git repository"
Make sure you're inside a git repository:
git init # If starting a new project
nocommitOr navigate to an existing git repository before running nocommit.
"Invalid Gemini API Key"
Your API key may be incorrect or expired. Verify and reset it:
# Check current key (partially masked)
nocommit config get GEMINI_API_KEY
# Set a new key
nocommit config set GEMINI_API_KEY=<your new token>"API quota exceeded"
You've hit Gemini's usage limits. Options:
- Wait - Free tier limits reset periodically
- Check usage - Visit Google AI Studio to view your quota
- Upgrade - Consider a paid plan for higher limits
"Network error"
Check your internet connection and try again. If you're behind a firewall or proxy, ensure API requests to Google are allowed.
"AI returned empty response"
This occasionally happens. Simply try again:
nocommit # Run againOr use the Regenerate option in the interactive menu.
Request timeout
If requests are timing out on slow connections, increase the timeout:
nocommit config set timeout=60000 # 60 secondsQuick Questions
Why does nocommit use Gemini instead of other AI services?
nocommit uses Google's Gemini AI because it provides:
- Advanced understanding - Gemini analyzes your code changes semantically
- Generous free tier - Get started without any cost
- Fast inference - Get commit messages in seconds
- Reliable - Google's infrastructure ensures high uptime
- Cost-effective - Affordable pricing when you need more
Does nocommit send my code to Google?
Only your git diff (staged changes) is sent to generate the commit message, not your entire codebase. nocommit also:
- Limits analysis to 5 files maximum
- Extracts only 30 lines per file
- Keeps total diff under 4000 characters
- Excludes lock files and build outputs automatically
How much does it cost?
nocommit uses Google's Gemini API, which offers a generous free tier. For most developers, the free tier is sufficient for regular use. Check Google AI Studio for current pricing and limits.
How does nocommit handle large diffs?
For large commits, nocommit automatically optimizes to stay within token limits:
- Limits files - Processes up to 5 files
- Extracts changes - Captures only added/removed lines (30 per file max)
- Enforces size limits - Keeps total diff under 4000 characters
- Excludes noise - Ignores lock files, build outputs, and generated files
This ensures you can commit large changes without hitting API limits while maintaining accuracy.
What files are automatically excluded?
nocommit excludes these files from diff analysis:
- Lock files:
package-lock.json,pnpm-lock.yaml,yarn.lock,bun.lock - Build outputs:
dist/**,build/**,.next/** - Generated files:
*.min.js,*.map,*.log - Dependencies:
node_modules/**
Does nocommit support Conventional Commits?
Yes! nocommit automatically generates commit messages following the Conventional Commits specification with proper types like feat, fix, docs, refactor, etc.
Can I get multiple commit message suggestions?
Yes! Configure the generate setting:
nocommit config set generate=5 # Generate up to 5 optionsThen use the Regenerate option in the interactive menu to cycle through suggestions.
Can I change the AI model?
Yes! Set a different Gemini model:
nocommit config set model=gemini-2.0-flashThe default is gemini-2.5-flash, which provides a good balance of speed and quality.
Where is my configuration stored?
nocommit uses conf for configuration storage, which saves settings in a platform-appropriate location:
- macOS:
~/Library/Preferences/nocommit-nodejs/config.json - Linux:
~/.config/nocommit-nodejs/config.json - Windows:
%APPDATA%\nocommit-nodejs\config.json
Can I use nocommit in CI/CD pipelines?
nocommit is designed for interactive use. For CI/CD, you might want to use the --yes flag to skip confirmation, but be aware that automated commits should be reviewed carefully.
Need More Help?
- Installation Guide - Setup and configuration
- Usage Guide - Commands and flags
- Configuration - Settings and options
- GitHub Issues - Report bugs or request features