git-neo
v1.0.5
Published
Enter the Git Matrix - A powerful terminal-first Git CLI toolkit with Matrix-inspired interface and AI-powered commits
Maintainers
Readme
Git Neo 🟢
Enter the Git Matrix - A powerful terminal-first Git CLI toolkit with Matrix-inspired interface and AI-powered commits
🎯 What is Git Neo?
Git Neo is a Matrix-themed Git CLI toolkit that makes Git operations faster, smarter, and more intuitive. Named after Neo from The Matrix, it helps you "decode" your Git workflow with:
- 🤖 AI-Powered Commits - Let AI write your commit messages
- ⚡ Smart Operations - Combine add, commit, and push in one command
- 🎨 Matrix UI - Beautiful terminal interface inspired by The Matrix
- 🔄 Auto-Fetch & Auto-Push - Automated workflow options
- 🎯 Conventional Commits - Automatic commit message formatting
- 💡 Interactive Mode - User-friendly prompts for all operations
🚀 Quick Start
Installation
npm install -g git-neoFirst Run
git-neo setupThis launches the configuration wizard where you can:
- Set your default branch
- Enable auto-push/auto-fetch
- Choose commit style
- Configure AI commits (optional)
Note: This configuration is project-specific - each Git repository maintains its own settings!
Basic Usage
# Interactive mode
git-neo
# Smart push (add + commit + push)
git-neo push "your commit message"
# AI-powered commit
git-neo ai-commit
# Smart commit (add + commit, no push)
git-neo commit "your message"✨ Features
🤖 AI-Powered Commits
Let AI analyze your changes and generate meaningful commit messages:
$ git-neo ai-commit
⠹ Generating AI commit message...
✓ AI commit message generated
🤖 AI Generated Commit Message:
"feat: implement JWT authentication for API endpoints"
? What would you like to do?
✓ Use this message
✎ Edit this message
↻ Generate new message
✗ CancelFeatures:
- Analyzes your git diff
- Generates conventional commit messages
- Multiple AI models to choose from
- Edit or regenerate suggestions
- Configure during setup or use environment variables
⚡ Smart Operations
Smart Push
Combines add, commit, and push in one command:
git-neo push "add new feature"Smart Commit
Add and commit without pushing:
git-neo commit "work in progress"Auto-Push
Enable in config to automatically push after commits:
git-neo setup
# Choose: autoPush = Yes🎨 Interactive Mode
Beautiful Matrix-themed UI for all Git operations:
$ git-neo
██████╗ ██╗████████╗ ███╗ ██╗███████╗ ██████╗
██╔════╝ ██║╚══██╔══╝ ████╗ ██║██╔════╝██╔═══██╗
██║ ███╗██║ ██║ ██╔██╗ ██║█████╗ ██║ ██║
██║ ██║██║ ██║ ██║╚██╗██║██╔══╝ ██║ ██║
╚██████╔╝██║ ██║ ██║ ╚████║███████╗╚██████╔╝
╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═══╝╚══════╝ ╚═════╝
Enter the Matrix v1.0.2
[+] Neo initialized
? [SELECT OPERATION]
[1] Smart Push → add, commit, push
[2] Commit → add, commit (no push)
[3] Branch Management → create, switch, delete
[4] Merge Branch → merge operations
[5] Repository Status → view changes
[X] Exit🔄 Auto-Fetch & Auto-Push
Auto-Fetch: Automatically fetch from remote before operations
git-neo setup
# Choose: autoFetch = YesAuto-Push: Automatically push after commits
git-neo setup
# Choose: autoPush = Yes🎯 Commit Styles
Choose your commit message format:
Conventional Commits
# Your input: "add new feature"
# Actual commit: "chore: add new feature"Custom Prefix
# Config: customPrefix = "[PROJECT]"
# Your input: "add feature"
# Actual commit: "[PROJECT] add feature"Simple (Free-form)
# No formatting, uses your message as-is📖 Commands
Core Commands
git-neo # Interactive mode
git-neo setup # Configuration wizard
git-neo push "message" # Smart push (add + commit + push)
git-neo commit "message" # Smart commit (add + commit)
git-neo ai-commit # AI-powered commit
git-neo ai-commit --push # AI commit with pushGit Operations
git-neo pull # Pull from remote
git-neo pull origin dev # Pull from specific branch
git-neo fetch # Fetch from remote
git-neo status # Repository status
git-neo log # Commit history
git-neo log -n 10 # Last 10 commits
git-neo diff # Show changes
git-neo diff file.js # Diff specific fileBranch Management
git-neo branch # Interactive branch menu
git-neo branch list # List all branches
git-neo branch create # Create new branch
git-neo branch switch # Switch branch
git-neo branch delete # Delete branchAdvanced
git-neo merge <branch> # Merge branch
git-neo clone <url> # Clone repository
git-neo init # Initialize repository🗂️ Multi-Project Support
Git Neo now works seamlessly across multiple projects! Each project maintains its own configuration, allowing you to use different settings for different repositories.
How It Works
- Project Detection: Git Neo automatically detects the Git repository root directory
- Project-Specific Config: Each project has its own
.gitkit.jsonconfiguration file - No Conflicts: Settings from one project won't affect another
Example: Using Git Neo in Multiple Projects
# Project 1 - Uses auto-push and conventional commits
cd ~/projects/frontend
git-neo setup # Configure for this project
git-neo push "feat: add login page"
# Project 2 - Uses manual push and simple commits
cd ~/projects/backend
git-neo setup # Different configuration for this project
git-neo commit "fix: database connection"
# Both projects maintain their own settings!Configuration File Location
Each project stores its configuration in:
<project-root>/.gitkit.jsonBenefits:
- ✅ Different commit styles per project
- ✅ Project-specific AI settings
- ✅ Independent auto-push/auto-fetch preferences
- ✅ No configuration conflicts between projects
⚙️ Configuration
Setup Wizard
Run the configuration wizard:
git-neo setupYou'll be asked to configure:
- Repository URL (optional)
- Default Branch (e.g., main)
- Auto-Push - Push after commit?
- Auto-Fetch - Fetch before operations?
- Commit Style - Conventional, Simple, or Custom
- AI Commits - Enable AI-powered commits?
- AI API Key - Your Gemini API key
- AI Model - Choose Gemini Pro, Flash, or 1.5 Pro
Configuration File
Settings are stored in .gitkit.json:
{
"repoUrl": "https://github.com/user/repo",
"defaultBranch": "main",
"autoPush": true,
"autoFetch": true,
"commitStyle": "conventional",
"customPrefix": null,
"aiEnabled": true,
"aiApiKey": "your-api-key",
"aiModel": "gemini-pro",
"setupDate": "2025-12-09T10:30:00.000Z"
}Important: Add .gitkit.json to .gitignore to keep your API key private!
🤖 AI Configuration
Get API Key
- Visit Google AI Studio
- Click "Create API Key"
- Copy your key
Configure AI
Option 1: During Setup (Recommended)
git-neo setup
# Choose: Enable AI Commits = Yes
# Enter your API key
# Select your preferred modelOption 2: Environment Variable
# Windows (PowerShell)
$env:GEMINI_API_KEY="your-api-key"
# Linux/Mac
export GEMINI_API_KEY="your-api-key"AI Models
Choose from 3 models:
| Model | Speed | Quality | Best For | |-------|-------|---------|----------| | Gemini Pro | ⚡⚡ | ⭐⭐⭐ | Balanced (recommended) | | Gemini 1.5 Flash | ⚡⚡⚡ | ⭐⭐ | Quick commits | | Gemini 1.5 Pro | ⚡ | ⭐⭐⭐⭐ | Complex changes |
💡 Usage Examples
Example 1: Quick Commit and Push
$ git-neo push "add login feature"
⠹ Preparing to push...
⠹ Adding files...
⠹ Committing changes...
⠹ Pushing to remote...
✓ Successfully pushed!Example 2: AI-Powered Commit
$ git-neo ai-commit
⠹ Generating AI commit message...
✓ AI commit message generated
🤖 AI Generated: "feat: implement user authentication with JWT"
? What would you like to do? Use this message
✓ Successfully committed!
[*] Tip: Run git-neo push to push changesExample 3: Interactive Mode
$ git-neo
# Choose [2] Commit
# Choose 🤖 Generate with AI
# AI generates message
# Choose ✓ Use this message
# Done!Example 4: Branch Management
$ git-neo branch
? [BRANCH OPERATIONS]
[L] List branches → show all
[C] Create new branch → checkout new
[S] Switch branch → checkout existing
[D] Delete branch → remove
[←] Back🎨 Features in Detail
Auto-Fetch
When enabled, Git Neo automatically fetches from remote before:
- Smart push operations
- Smart commit operations
- Helps avoid conflicts and keeps you synced
Auto-Push
When enabled, Git Neo automatically pushes after:
- Smart commit operations
- Saves you an extra command
- Can be disabled per-commit if needed
Commit Message Formatting
Automatically formats your commits based on your chosen style:
- Conventional: Adds prefixes like
feat:,fix:,docs: - Custom: Adds your custom prefix
- Simple: No formatting
Network Resilience
- 30-second timeout for push/pull/fetch
- 60-second timeout for clone
- Clear error messages for network issues
- Automatic retry suggestions
Error Handling
- Repository validation
- Remote validation
- Upstream checking
- Merge conflict detection
- Helpful error messages with solutions
🔧 Troubleshooting
"AI not configured"
Solution: Run git-neo setup and enable AI commits, or set GEMINI_API_KEY environment variable.
"Not a git repository"
Solution: Run git init or navigate to a git repository.
"No remote repository configured"
Solution: Add remote with git remote add origin <url>
"Push rejected"
Solution: Pull remote changes first with git-neo pull
"Network timeout"
Solution: Check your internet connection and try again.
📊 Comparison
Traditional Git Workflow
git add .
git commit -m "add feature"
git push
# 3 commandsGit Neo Workflow
git-neo push "add feature"
# 1 commandWith AI
git-neo ai-commit
# AI writes the message for you!🎯 Best Practices
1. Use AI for Complex Changes
When you've made many changes and can't think of a good message:
git-neo ai-commit2. Enable Auto-Fetch for Teams
Keeps you synced with remote changes:
git-neo setup
# Choose: autoFetch = Yes3. Use Conventional Commits
For better commit history:
git-neo setup
# Choose: commitStyle = Conventional4. Keep API Key Private
Add to .gitignore:
echo ".gitkit.json" >> .gitignore🚀 Advanced Usage
Custom Workflows
Commit without push:
git-neo commit "work in progress"AI commit with immediate push:
git-neo ai-commit --pushPull from specific branch:
git-neo pull origin developView last 5 commits:
git-neo log -n 5📝 Configuration Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| repoUrl | string | null | Repository URL (optional) |
| defaultBranch | string | "main" | Default branch name |
| autoPush | boolean | true | Auto-push after commit |
| autoFetch | boolean | false | Auto-fetch before operations |
| commitStyle | string | "simple" | Commit message style |
| customPrefix | string | null | Custom commit prefix |
| aiEnabled | boolean | false | Enable AI commits |
| aiApiKey | string | null | Gemini API key |
| aiModel | string | "gemini-pro" | AI model to use |
🤝 Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
📄 License
ISC License - see LICENSE file for details
🙏 Acknowledgments
- Inspired by The Matrix
- Powered by Google Gemini AI
- Built with Node.js, Commander.js, Inquirer.js, and Chalk
🔗 Links
Enter the Matrix. Decode your Git workflow with Neo. 🟢
📚 Quick Reference
# Setup
git-neo setup # Configure Git Neo
# Basic Operations
git-neo # Interactive mode
git-neo push "message" # Add + commit + push
git-neo commit "message" # Add + commit
git-neo ai-commit # AI-powered commit
# Git Commands
git-neo pull # Pull changes
git-neo fetch # Fetch from remote
git-neo status # Repository status
git-neo log # Commit history
git-neo diff # Show changes
# Branch Management
git-neo branch # Interactive branch menu
git-neo branch list # List branches
git-neo branch create # Create branch
git-neo branch switch # Switch branch
git-neo branch delete # Delete branch
# Advanced
git-neo merge <branch> # Merge branch
git-neo clone <url> # Clone repository
git-neo init # Initialize repositoryVersion: 1.0.2
Author: @vortex77
Status: ✅ Production Ready
