npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

codegenius-cli

v1.1.4

Published

AI-powered Git commit message generator and code reviewer with beautiful terminal UI

Downloads

11

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"' >> ~/.zshrc

2. 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 --tui

Code Review Anywhere

# Review staged changes in any project
cd ~/work/client-app
git add src/
codegenius --review

Project 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 --help

TUI Mode (Recommended)

# 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

🌍 How It Works Globally

CodeGenius is designed to work seamlessly across your entire system:

  1. Install Once: Single installation works everywhere
  2. Per-Project Configuration: Each project can have its own .codegenius.yaml
  3. Global Settings: Your API key and preferences travel with you
  4. Context Aware: Automatically detects project language and Git status
  5. 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 --help

Building 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 --history

Teams

# 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 install method)

🚀 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

MIT 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 . && cgr

Experience the future of Git workflow with CodeGenius CLI - your global AI-powered Git assistant! 🤖⚡