AI-powered Git history analysis tool - Zero configuration needed!
GitGenius transforms your Git repository into an intelligent knowledge base using AI. Analyze commit history, search semantically, generate changelogs, and create comprehensive reports with AI-powered insights.
No database setup required - uses local SQLite
Simple setup - just enter your Gemini API key when prompted
- π Changelog Generator - Auto-generate release notes with AI categorization
- π Filter Commits - Browse by author, date range (7/30/90 days or custom)
- π Incremental Analysis - Only analyzes new commits, skips already processed
- π Progress Tracking - Real-time progress updates during analysis
- π€ AI-powered Search - Ask any question in natural language
- π¨ Improved HTML Export - Beautiful reports with better styling
- AI-Powered Analysis - Automatically categorize and summarize commits using Google Gemini
- Semantic Search - Ask questions in natural language, get AI-powered answers with relevant commits
- Changelog Generation - Auto-generate professional release notes grouped by category
- Interactive Filtering - Browse commits by author, date range, or view all
- Beautiful Reports - Export detailed analysis in JSON, Markdown, CSV, or HTML
- Interactive CLI - User-friendly menu-driven interface with arrow key navigation
- Repository Statistics - Comprehensive metrics and insights about your codebase
- Incremental Processing - Only analyze new commits, skip already processed ones
- Fast & Efficient - Parallel processing with intelligent caching
GitGenius is built with modern technologies for optimal performance and developer experience:
| Category | Technologies |
|---|---|
| Language | TypeScript |
| AI/LLM | Google Gemini 2.5 Flash, LangChain.js |
| Database | SQLite + Prisma ORM |
| CLI Framework | oclif |
| Git Operations | simple-git |
| UI/UX | Inquirer.js, chalk, ora, gradient-string |
| Validation | Zod |
npm install -g gitgenius- Node.js >= 18.0.0
- Google Gemini API key (free at Google AI Studio)
cd your-git-repo
gitgeniusOn first run, you'll be prompted to enter your Gemini API key. It will be saved securely for future use.
Select Setup from the menu to analyze your Git repository.
Select Analyze to process commits with AI and generate insights.
Use Search to ask questions about your codebase in natural language.
Select Changelog to auto-generate release notes with AI categorization.
Use Filter to browse commits by author or date range.
Select Export to generate detailed reports in your preferred format.
Simply run gitgenius in any Git repository:
gitgeniusNavigate using arrow keys through the menu:
- Setup - Initialize this Git repository
- Analyze - Process commits with AI (only new commits)
- Search - Ask AI about your commits (natural language)
- Changelog - Generate release notes β¨ NEW
- Filter - Browse commits by author/date β¨ NEW
- Stats - View repository statistics
- Export - Generate detailed report
- Help - Documentation and guides
- Exit - Quit GitGenius
# Initialize repository
gitgenius init
# Analyze commits
gitgenius analyze
# Search for specific changes
gitgenius search "authentication implementation"Ask questions in natural language and get intelligent answers:
? Ask anything about your commits: Which commit has the most code changes?
βββ AI Answer βββββββββββββββββββββββββββββββ
The commit with hash a0f104b has the most code changes with +15,234 additions
and -2,341 deletions. This was the initial project setup commit that established
the core architecture...
βββ Related Commits βββββββββββββββββββββββββ
1. a0f104b
"feat: Initialize GitWise project with core functionalities"
Author: pankaj kumar | Date: 2025-11-21
Changes: +15234 -2341
Automatically generate professional release notes:
βββ Changelog Generator ββββββββββββββββββββ
? Version name (e.g., v1.0.0): v1.1.0
# Changelog
## v1.1.0
### β¨ Features
- Changelog generator with AI categorization (`abc1234`) - Author
- Filter commits by author and date (`def5678`) - Author
### π Bug Fixes
- Fixed HTML export visibility (`ghi9012`) - Author
### β»οΈ Refactoring
- Improved CLI structure (`jkl3456`) - Author
? Save changelog to file? Yes
β
Saved to CHANGELOG-v1.1.0.md
GitGenius supports multiple export formats:
Machine-readable format with complete metadata and statistics.
Professional documentation with executive summary, metrics tables, and AI insights.
Spreadsheet-compatible format for commit data analysis.
Beautiful web report with interactive styling and comprehensive details.
- Zero Configuration - No database setup required, uses local SQLite
- Simple API Key Setup - Enter once, saved securely
- AI-Powered Analysis - Automatic commit categorization with Google Gemini
- Natural Language Search - Ask questions, get AI answers with commit references
- Changelog Generation - Auto-generate release notes grouped by category
- Interactive Filtering - Browse commits by author, date, or view all
- Incremental Processing - Only new commits are analyzed
- Multiple Export Formats - JSON, Markdown, CSV, HTML
- Beautiful CLI - Interactive menu with arrow key navigation
- Comprehensive Reports - Detailed analysis with statistics and insights
GitGenius stores all data locally in a SQLite database (gitgenius.db in your project directory). No external database required!
- Visit Google AI Studio
- Create a new API key (it's free!)
- Run
gitgeniusand enter the key when prompted
That's it! Your key will be saved securely for future use.
- Initialization: GitGenius scans your Git repository and stores commit history in local SQLite
- Chunking: Commits are grouped into manageable chunks for efficient processing
- AI Analysis: Google Gemini analyzes each chunk, extracting insights and categories
- Incremental Updates: On subsequent runs, only new commits are analyzed
- Search: AI-powered semantic search finds relevant commits and generates answers
- Changelog: AI categorizes commits and generates professional release notes
GitGenius uses LangChain.js for LLM orchestration:
- Prompt Templates - Structured prompts for consistent AI responses
- Output Parsers - JSON parsing with schema validation
- LLM Chains - Composable chains for analysis and search workflows
// Example: How GitGenius uses LangChain
import { ChatGoogleGenerativeAI } from '@langchain/google-genai';
import { PromptTemplate } from '@langchain/core/prompts';
import { JsonOutputParser } from '@langchain/core/output_parsers';
const prompt = PromptTemplate.fromTemplate(analysisTemplate);
const chain = prompt.pipe(llm).pipe(new JsonOutputParser());
const result = await chain.invoke({ chunk_text: commitData });Built-in support for text embeddings using Google's text-embedding-004 model for future semantic search enhancements.
No configuration files needed! GitGenius works out of the box.
Optional: You can set these environment variables to customize behavior:
GEMINI_MODEL- AI model to use (default: gemini-2.5-flash)CHUNK_SIZE- Commits per analysis chunk (default: 50)MAX_CONCURRENT_JOBS- Parallel processing limit (default: 5)
Contributions are welcome! Please feel free to submit issues or pull requests.
MIT Β© Pankaj Kumar
Built with:
- Google Gemini - AI analysis and text generation
- LangChain.js - LLM framework for prompt engineering and chains
- Prisma - Type-safe database ORM
- oclif - Enterprise-grade CLI framework
- simple-git - Git operations in Node.js
- Zod - TypeScript-first schema validation
- @inquirer/prompts - Interactive CLI prompts
- chalk & gradient-string - Beautiful terminal styling
- ora - Elegant terminal spinners
Made with β€οΈ by Pankaj Kumar