codegenius-cli
v1.1.4
Published
AI-powered Git commit message generator and code reviewer with beautiful terminal UI
Downloads
11
Maintainers
Readme
CodeGenius CLI 🤖✨
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!
🌟 Features
- 🎨 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
🚀 Installation Methods
Choose your preferred installation method:
🍺 Homebrew (macOS/Linux) - ✅ Available Now!
# Add the tap
brew tap Shubhpreet-Rana/codegenius
# Install CodeGenius
brew install codegenius✅ Clean installation, automatic updates, easy uninstall
📦 NPM (Node.js) - ✅ Published!
npm install -g codegenius-cli✅ Easy updates, clean uninstall, works everywhere Node.js does
🌐 One-Line Install (Alternative)
curl -fsSL https://raw.githubusercontent.com/Shubhpreet-Rana/codegenius/latest/install.sh | bash✅ Automatic platform detection, PATH setup, instant global access
🔧 Go Install (Developers)
go install github.com/Shubhpreet-Rana/codegenius@latest✅ Build from source, latest features, automatic updates
💾 Manual Download
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 Support
| 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
⚡ Quick Start
1. Setup (One-time)
# 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"' >> ~/.zshrc2. Use in Any Git Repository
# 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🎯 Global Usage Examples
Smart Commit Generation
# In any Git repository
cd ~/my-awesome-project
git add .
codegenius --tuiCode Review Anywhere
# Review staged changes in any project
cd ~/work/client-app
git add src/
codegenius --reviewProject History
# View your work history
codegenius --history "Dec 2024"Global Configuration
# Your preferences follow you everywhere
codegenius --init # Creates .codegenius.yaml in current directory🎯 Usage
Basic Commands (Work Anywhere!)
# 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 --helpTUI Mode (Recommended)
# Launch beautiful terminal interface
codegenius --tuiThe TUI provides:
- 🤖 Smart Commit Generation with context input
- 🔍 Interactive Code Review with multi-select options
- 📊 Visual History & Statistics
- ⚙️ Configuration Management
🌍 How It Works Globally
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
📁 Project Structure
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⚙️ Configuration
CodeGenius works with both global and project-specific configurations:
Global Configuration
Your API key and global preferences:
export GEMINI_API_KEY="your-api-key"Project Configuration (.codegenius.yaml)
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*["'"'"'][^"'"'"']+["'"'"']'🛠️ Development & Contributing
For Contributors
# 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 --helpBuilding Releases
# Build for multiple platforms
make build-all
# Create release
make release🌟 Use Cases
Individual Developers
# Work on multiple projects seamlessly
cd ~/project1 && codegenius --tui
cd ~/project2 && codegenius --review
cd ~/project3 && codegenius --historyTeams
# Consistent commit messages across team
codegenius --init # Share .codegenius.yaml with team
git add .codegenius.yaml && git commit -m "Add CodeGenius config"CI/CD Integration
# Use in build scripts
codegenius --review > review-report.txt📦 Distribution
CodeGenius is distributed through multiple channels:
- Homebrew:
brew tap Shubhpreet-Rana/codegenius && brew install codegenius - NPM:
npm install -g codegenius-cli - GitHub Releases: Pre-built binaries for all platforms
- Go Modules:
go install github.com/Shubhpreet-Rana/codegenius@latest - Curl Installer: One-line installation script
🔧 API Integration
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)💻 System Requirements
- OS: macOS, Linux, Windows
- Git: Any version (for Git operations)
- Internet: For AI features (Gemini API)
- Go: Optional (only for
go installmethod)
🚀 Performance
- 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
🔒 Privacy & Security
- 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
🎉 What's New in v1.1.2
- ✅ Homebrew Support: Official Homebrew tap available
- 🔐 Verified Binaries: All releases signed and verified
- 🛠️ Enhanced Installation: Multiple installation methods
- 📦 GitHub Releases: Pre-built binaries for all platforms
- 🔄 Automatic Updates: Easy updates via package managers
📄 License
🙏 Acknowledgments
- 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! 🚀✨
💡 Pro Tips
# 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 . && cgrExperience the future of Git workflow with CodeGenius CLI - your global AI-powered Git assistant! 🤖⚡
