An intelligent Git commit message generator and code reviewer powered by AI with a beautiful terminal user interface. Use CodeGenius anywhere on your system - just like Firebase CLI!
- π¨ Beautiful Terminal UI: Modern, interactive interface with multi-select, input fields, and elegant styling
- π€ AI-Powered Commit Messages: Generate conventional, meaningful commit messages using Google's Gemini AI
- π Interactive Code Reviews: Multi-select review types with additional context input (security, performance, style, structure)
- π Work History Tracking: Visual progress tracking with statistics and filtering
- π¬ Context-Aware: Add custom context to both commits and reviews for better AI analysis
- βοΈ Fully Configurable: Customizable templates, review settings, and project configuration
- π Global CLI Tool: Install once, use anywhere on your system
Method | Status | Version | One-Line Install |
---|---|---|---|
πΊ Homebrew | β Working | v1.1.2 | brew tap Shubhpreet-Rana/codegenius && brew install codegenius |
π¦ NPM | β Working | v1.1.4 | npm install -g codegenius-cli |
π Curl | β Working | v1.1.2 | curl -fsSL https://raw.githubusercontent.com/Shubhpreet-Rana/codegenius/latest/install.sh | bash |
π§ Go | β Working | Latest | go install github.com/Shubhpreet-Rana/codegenius@latest |
Choose your preferred method and get started in seconds! π
Choose your preferred installation method:
# Add the tap
brew tap Shubhpreet-Rana/codegenius
# Install CodeGenius
brew install codegenius
β Clean installation, automatic updates, easy uninstall
npm install -g codegenius-cli
β Easy updates, clean uninstall, works everywhere Node.js does
curl -fsSL https://raw.githubusercontent.com/Shubhpreet-Rana/codegenius/latest/install.sh | bash
β Automatic platform detection, PATH setup, instant global access
go install github.com/Shubhpreet-Rana/codegenius@latest
β Build from source, latest features, automatic updates
Download the latest release for your platform:
Then install:
# macOS/Linux
chmod +x codegenius-*
sudo mv codegenius-* /usr/local/bin/codegenius
# Windows: Move .exe to a folder in your PATH
Platform | Homebrew | NPM | Curl | Go | Manual |
---|---|---|---|---|---|
macOS Intel | β | β | β | β | β |
macOS ARM64 | β | β | β | β | β |
Linux x64 | β | β | β | β | β |
Linux ARM64 | β | β | β | β | β |
Windows | β | β | β | β | β |
π‘ Recommended: Use Homebrew on macOS/Linux or NPM for cross-platform
# Get your API key from: https://makersuite.google.com/app/apikey
export GEMINI_API_KEY="your-gemini-api-key"
# Add to your shell profile
echo 'export GEMINI_API_KEY="your-gemini-api-key"' >> ~/.zshrc
# Navigate to any Git project
cd your-project
# Initialize CodeGenius (creates .codegenius.yaml)
codegenius --init
# Stage your changes
git add .
# Use the beautiful TUI
codegenius --tui
# Or traditional CLI
codegenius # Generate commit message
codegenius --review # Perform code review
# In any Git repository
cd ~/my-awesome-project
git add .
codegenius --tui
# Review staged changes in any project
cd ~/work/client-app
git add src/
codegenius --review
# View your work history
codegenius --history "Dec 2024"
# Your preferences follow you everywhere
codegenius --init # Creates .codegenius.yaml in current directory
# Generate commit message for staged changes
codegenius
# Perform code review
codegenius --review
# View work history
codegenius --history "Dec 2024"
# Interactive mode
codegenius --interactive
# Beautiful TUI mode (recommended)
codegenius --tui
# Initialize configuration
codegenius --init
# Show help
codegenius --help
# Launch beautiful terminal interface
codegenius --tui
The TUI provides:
- π€ Smart Commit Generation with context input
- π Interactive Code Review with multi-select options
- π Visual History & Statistics
- βοΈ Configuration Management
CodeGenius is designed to work seamlessly across your entire system:
- Install Once: Single installation works everywhere
- Per-Project Configuration: Each project can have its own
.codegenius.yaml
- Global Settings: Your API key and preferences travel with you
- Context Aware: Automatically detects project language and Git status
- Cross-Platform: Works on macOS, Linux, and Windows
CLI_GO/
βββ main.go # Global CLI entry point
βββ internal/
β βββ tui/ # Beautiful terminal UI
β βββ interfaces/ # Clean architecture
β βββ container/ # Dependency injection
β βββ ai/ # AI integration
β βββ config/ # Configuration management
β βββ git/ # Git operations
β βββ history/ # Work history tracking
β βββ review/ # Code review functionality
βββ .codegenius.yaml # Project-specific configuration
βββ install.sh # Global installation script
βββ go.mod # Go module definition
βββ README.md # This file
CodeGenius works with both global and project-specific configurations:
Your API key and global preferences:
export GEMINI_API_KEY="your-api-key"
Each project can have its own settings:
project:
name: "Your Project"
language: "go"
overview: "Project description"
scopes:
- core
- api
- docs
standards: "https://golang.org/doc/effective_go.html"
ai:
model: "gemini-2.0-flash"
max_tokens: 4000
context_templates:
default: "Standard commit message generation"
bugfix: "Focus on bug fixes and impact"
feature: "Emphasize new functionality"
review:
enabled_types:
- security
- performance
- style
- structure
text_only: true # No code snippets in reviews
security_patterns:
- '(?i)(password|secret|key|token)\s*[:=]\s*["'"'"'][^"'"'"']+["'"'"']'
# Clone and setup
git clone https://github.com/Shubhpreet-Rana/codegenius.git
cd CLI_GO
make dev-setup
# Build locally
make build
# Test globally
sudo cp bin/codegenius /usr/local/bin/
codegenius --help
# Build for multiple platforms
make build-all
# Create release
make release
# Work on multiple projects seamlessly
cd ~/project1 && codegenius --tui
cd ~/project2 && codegenius --review
cd ~/project3 && codegenius --history
# Consistent commit messages across team
codegenius --init # Share .codegenius.yaml with team
git add .codegenius.yaml && git commit -m "Add CodeGenius config"
# Use in build scripts
codegenius --review > review-report.txt
CodeGenius is distributed through multiple channels:
- Homebrew:
brew tap Shubhpreet-Rana/codegenius && brew install codegenius
(v1.1.2) - NPM:
npm install -g codegenius-cli
(v1.1.4) - GitHub Releases: Pre-built binaries for all platforms (v1.1.2)
- Go Modules:
go install github.com/Shubhpreet-Rana/codegenius@latest
- Curl Installer: One-line installation script (v1.1.2)
Other applications can integrate CodeGenius:
import "github.com/Shubhpreet-Rana/codegenius/internal/interfaces"
// Use as a library
service := buildCodeGeniusService()
message, err := service.AI.GenerateCommitMessage(diff, files, branch, context)
- OS: macOS, Linux, Windows
- Git: Any version (for Git operations)
- Internet: For AI features (Gemini API)
- Go: Optional (only for
go install
method)
- Fast: Typically generates commits in 2-3 seconds
- Lightweight: ~10MB binary, minimal memory usage
- Offline: Some features work without internet
- Concurrent: Multiple operations can run simultaneously
- No Code Storage: Your code never leaves your machine (except for AI analysis)
- Secure API: Uses HTTPS for all AI communications
- Local History: Work history stored locally
- Configurable: Control what data is sent to AI
- β
NPM Package Fixed: All installation issues resolved in
codegenius-cli@1.1.4
- β Homebrew Support: Official Homebrew tap available and working
- π Verified Binaries: All releases signed and verified with real SHA256 hashes
- π οΈ Enhanced Installation: Multiple working installation methods
- π¦ GitHub Releases: Pre-built binaries for all platforms (v1.1.2)
- π Automatic Updates: Easy updates via package managers
- Google Gemini AI for intelligent code analysis
- The Charm team for amazing TUI libraries
- The Go community for excellent tooling
- Contributors and users of CodeGenius
Ready to revolutionize your Git workflow? Install CodeGenius and use it anywhere! πβ¨
# Create aliases for faster access
echo 'alias cg="codegenius --tui"' >> ~/.zshrc
echo 'alias cgr="codegenius --review"' >> ~/.zshrc
# Quick commit workflow
git add . && cg
# Quick review workflow
git add . && cgr
Experience the future of Git workflow with CodeGenius CLI - your global AI-powered Git assistant! π€β‘