Solutions to common issues.
Problem: Command not found after installation
Solutions:
- Check PATH
# macOS/Linux
echo $PATH
# Windows PowerShell
$env:Path- Add to PATH
# macOS/Linux
export PATH=$PATH:/path/to/commit-ai
echo 'export PATH=$PATH:/path/to/commit-ai' >> ~/.bashrc
# Windows PowerShell
$env:Path += ";C:\Program Files\Commit-AI"- Use full path
/path/to/commit-ai versionProblem: Cannot execute binary
Solution:
# Make executable
chmod +x /path/to/commit-aiProblem: Binary doesn't work on your system
Solution:
# Check your architecture
uname -m # macOS/Linux
# or
[System.Environment]::Is64BitOperatingSystem # Windows
# Download correct binary
# amd64 for 64-bit Intel
# arm64 for Apple Silicon or ARM64Problem: Groq API key not configured
Solutions:
- Check if key is set
echo $GROQ_API_KEY- Set key globally
# macOS/Linux
export GROQ_API_KEY=gsk_your_key_here
echo 'export GROQ_API_KEY=gsk_your_key_here' >> ~/.bashrc
# Windows PowerShell
$env:GROQ_API_KEY = "gsk_your_key_here"- Create .env file
# Global
echo "GROQ_API_KEY=gsk_your_key_here" > ~/.commit-ai.env
# Project
echo "GROQ_API_KEY=gsk_your_key_here" > .env- Get API key
- Visit https://console.groq.com/keys
- Create new API key
- Copy and save
Problem: API key is invalid or expired
Solutions:
-
Verify key format
- Should start with
gsk_ - Should be long string
- Should start with
-
Check key validity
- Visit https://console.groq.com/keys
- Verify key is active
- Regenerate if needed
-
Update key
# Update .env file
echo "GROQ_API_KEY=gsk_new_key_here" > ~/.commit-ai.envProblem: Commit-AI says no changes found
Solutions:
- Check git status
git status- Stage changes
# Stage specific files
git add src/file.go
# Or stage all
git add .- Try again
commit-aiProblem: Cannot retrieve git diff
Solutions:
- Check git installation
git --version- Check repository
git status- Check permissions
# Ensure you have read permissions
ls -la .gitProblem: Cannot stage changes
Solutions:
- Check git status
git status- Try manual staging
git add .- Check permissions
# Ensure write permissions
ls -la .gitProblem: API request to Groq failed
Solutions:
- Check internet connection
ping google.com- Check API key
echo $GROQ_API_KEY-
Check Groq status
- Visit https://status.groq.com
- Check for service outages
-
Try again
commit-aiProblem: Too many API requests
Solutions:
- Wait and retry
sleep 10
commit-ai- Stage fewer files
git reset
git add src/api.go
commit-ai- Upgrade Groq plan
- Visit https://console.groq.com/settings/billing
- Upgrade to higher tier
Problem: AI response doesn't match expected format
Solutions:
- Try again
commit-ai- Use verbose mode
commit-ai -v- Check diff size
git diff --cached | wc -c- Reduce diff size
git reset
git add src/file.go
commit-aiProblem: Special characters not displaying correctly
Solutions:
- Check terminal encoding
# macOS/Linux
echo $LANG
# Windows PowerShell
[System.Console]::OutputEncoding- Set UTF-8 encoding
# macOS/Linux
export LANG=en_US.UTF-8
# Windows PowerShell
[System.Console]::OutputEncoding = [System.Text.Encoding]::UTF8Problem: Output not colored
Solutions:
-
Check terminal support
- Use modern terminal (iTerm2, Windows Terminal, etc.)
- Ensure 256-color support
-
Force colors
# Set environment variable
export FORCE_COLOR=1
commit-aiProblem: Commit-AI takes too long
Solutions:
- Check internet speed
ping -c 5 api.groq.com- Reduce diff size
# Stage fewer files
git reset
git add src/file.go
commit-ai- Use faster model
commit-ai -m llama-3.1-8b-instantProblem: Commit-AI uses too much memory
Solutions:
- Reduce diff size
git reset
git add src/file.go
commit-ai-
Close other applications
- Free up system memory
-
Restart terminal
exit
# Reopen terminal
commit-aiProblem: Cannot update to latest version
Solutions:
- Check internet connection
ping github.com-
Try manual update
- Download latest binary from GitHub
- Replace current binary
-
Check permissions
# Ensure write permissions
ls -la /usr/local/bin/commit-aiProblem: Update process hangs
Solutions:
- Cancel update
Ctrl+C- Try again
commit-ai update- Manual update
- Download from GitHub
- Replace binary manually
Problem: Git commit fails
Solutions:
- Check git configuration
git config user.name
git config user.email- Configure git
git config --global user.name "Your Name"
git config --global user.email "your@email.com"- Check permissions
# Ensure write permissions
ls -la .gitProblem: Commit message format is invalid
Solutions:
- Use edit option
commit-ai
# Select "✏️ Edit manually..."
# Fix the message-
Check format
- Should be:
type(scope): description - Example:
feat(api): add authentication
- Should be:
-
Validate manually
git commit -m "feat(api): add authentication"# See detailed analysis
commit-ai -v
# Output includes:
# - Detected scope
# - Number of files
# - Diff size
# - Number of options# View current configuration
echo $GROQ_API_KEY
echo $COMMIT_AI_MODEL
# View .env file
cat ~/.commit-ai.env# View staged changes
git diff --cached
# View all changes
git status
# View file list
git diff --cached --name-only- GitHub Issues: https://github.com/NeelFrostrain/Commit-Ai/issues
- GitHub Discussions: https://github.com/NeelFrostrain/Commit-Ai/discussions
- Documentation: https://github.com/NeelFrostrain/Commit-Ai/tree/main/docs
When reporting issues, include:
- Version
commit-ai version- System info
uname -a # macOS/Linux
# or
[System.Environment]::OSVersion # Windows- Error message
commit-ai -v 2>&1- Steps to reproduce
- Exact commands run
- Expected vs actual behavior
Q: Is my API key secure?
A: Yes, API key is stored locally in ~/.commit-ai.env with secure permissions (600).
Q: Can I use Commit-AI offline? A: No, Commit-AI requires internet connection for AI analysis.
Q: Can I use different AI models?
A: Yes, use -m flag: commit-ai -m llama-3.1-70b-versatile
Q: How much does it cost? A: Groq offers free tier with rate limits. Upgrade for higher limits.
Q: Can I use Commit-AI in CI/CD?
A: Yes, use -c -y flags for automation: commit-ai -c -y