AI-powered Git intelligence. Understand any repo in seconds.
aiq uses LLMs to analyze your git history β generate changelogs, summarize PRs, find risky commits, and explain what happened while you were away.
pip install aiq-git# Summarize what happened this week
aiq summary --since "1 week ago"
# Generate a changelog from commits
aiq changelog v1.0..v2.0
# Find potentially risky commits
aiq risk --since "1 month ago"
# Explain a specific commit in plain English
aiq explain abc1234
# Review a diff before committing
git diff --staged | aiq review- π§ Smart Summaries β Understand what happened in a repo over any time range
- π Auto Changelogs β Generate release notes from commit history
β οΈ Risk Detection β Flag commits that touch sensitive areas (auth, payments, config)- π¬ Commit Explanation β Plain English explanation of any commit
- π Diff Review β AI code review on staged changes or PRs
- π Multi-LLM β Works with OpenAI, Anthropic, Ollama, or any OpenAI-compatible API
# Use OpenAI (default)
export OPENAI_API_KEY=sk-...
# Or use Anthropic
export ANTHROPIC_API_KEY=sk-ant-...
aiq summary --model claude-sonnet-4-20250514
# Or use local models via Ollama
aiq summary --model ollama/llama3aiq reads git log data (commits, diffs, authors, timestamps) and sends structured prompts to an LLM. Your code stays local β only diffs and commit messages are sent to the API (or kept fully local with Ollama).
| Command | Description |
|---|---|
aiq summary |
Summarize repo activity over a time range |
aiq changelog |
Generate a changelog between two refs |
aiq risk |
Identify potentially risky commits |
aiq explain <sha> |
Explain a specific commit |
aiq review |
Review a diff from stdin |
aiq stats |
Show contributor and file statistics |
--since TEXT Start date (e.g., "1 week ago", "2024-01-01")
--until TEXT End date
--author TEXT Filter by author
--model TEXT LLM model to use (default: gpt-4o-mini)
--format TEXT Output format: text, markdown, json
--max-diff INT Max diff lines per commit (default: 500)
--verbose Show prompts and raw responses
aiq summary --since "last monday" --format markdownOutput:
## Week Summary (Feb 10 - Feb 14)
### Key Changes
- **Authentication overhaul** β Migrated from JWT to session-based auth (3 commits by @alice)
- **API rate limiting** β Added Redis-backed rate limiter to all public endpoints (@bob)
- **Bug fixes** β 7 minor fixes across the payments and notification modules
### Stats
- 23 commits by 4 authors
- 42 files changed (+1,204 / -389 lines)aiq changelog v1.2.0..HEAD --format markdownaiq risk --since "1 month ago"Output:
β οΈ HIGH abc1234 - Modified authentication middleware (auth/middleware.py)
β οΈ MED def5678 - Changed payment processing logic (payments/stripe.py)
β οΈ LOW ghi9012 - Updated environment configuration (.env.example)
- Only commit messages and diffs are sent to the LLM API
- Use
--max-diffto limit how much code is sent - Use Ollama for fully local, offline analysis
- No data is stored or logged by
aiq
Contributions welcome! Please open an issue first to discuss what you'd like to change.
MIT