Skip to content

jroell/gitgang

Repository files navigation

๐Ÿค˜ GitGang

The gang's all here to code โ€” Multi-agent AI orchestration for autonomous software development

GitGang is a Node-based CLI (bundled with esbuild) that coordinates multiple AI agents (Gemini, Claude, and Codex) to collaboratively solve complex coding tasks. Each agent works in isolation on git worktrees, and a reviewer agent merges the best solutions.

npm version License: MIT

โœจ Features

  • Multi-Agent Collaboration: Runs three AI agents in parallel (Gemini, Claude, Codex)
  • Real-Time Dashboard: Live-updating progress display showing file changes, commits, and agent status
  • Beautiful Dracula UI: Modern terminal interface with RGB colors, rounded corners, and live spinners
  • Git Worktree Isolation: Each agent works in its own git worktree and branch
  • Intelligent Review Loop: Codex reviewer analyzes all solutions and merges the best parts
  • Interactive Command Palette: Monitor and control agents in real-time
  • Autonomous Execution: Agents work independently with full permissions (optional yolo mode)
  • Single-File Bundle: Lightweight Node CLI built with esbuild (no Bun required)

๐Ÿ“ฆ Installation

npm i -g gitgang@latest

Prerequisites

You need the following CLI tools installed and configured:

All three CLIs must be available on your PATH.

๐Ÿš€ Usage

Basic Usage

gg "Add user authentication with JWT tokens"
# or
gitgang "Add user authentication with JWT tokens"

Advanced Options

gitgang --task "Refactor API layer" \
  --rounds 5 \
  --no-yolo \
  --workRoot .agents \
  --timeoutMs 3600000 \
  --no-pr

Options

Flag Description Default
--task Task description for agents First positional arg
--rounds Number of review rounds 3
--yolo / --no-yolo Auto-approve agent actions true
--workRoot Directory for git worktrees .ai-worktrees
--timeoutMs Max runtime in milliseconds 1500000 (25m)
--no-pr Skip GitHub PR creation Creates PR by default

๐ŸŽฎ Interactive Commands

While agents are running, use these slash commands:

Command Description
/status Show agent status and branches
/agents List all agent worktrees
/logs <agent> View logs for gemini, claude, or codex
/nudge <agent> <msg> Send message to specific agent
/kill <agent> Terminate a running agent
/review Trigger reviewer manually
/help Show available commands

๐Ÿ—๏ธ How It Works

  1. Initialization: Creates three git worktrees from your current branch
  2. Parallel Execution: Launches Gemini, Claude, and Codex simultaneously with live spinners
  3. Real-Time Monitoring: Dashboard updates every 2 seconds showing:
    • Agent status (pending, working, complete)
    • Files changed, added, and deleted in each worktree
    • Commit counts per agent
    • Current activity (thinking, running commands, editing files)
    • Reviewer status (distinct from regular agents)
    • Elapsed session time
  4. Autonomous Development: Each agent:
    • Implements the feature independently
    • Writes/updates tests
    • Commits changes incrementally
    • Handles failures autonomously
  5. Review Loop: Codex reviewer:
    • Compares all three solutions
    • Either approves and merges best parts
    • Or provides targeted revision feedback
  6. Integration: Creates merge branch with best solution
  7. PR Creation: Optionally opens GitHub PR (requires gh CLI)

๐Ÿ“‹ Requirements

  • macOS (tested; should work anywhere with git and Node)
  • Git repository with clean working tree
  • Node.js 18+ / npm for installation
  • AI CLI Tools: gemini, claude, codex
  • Terminal: RGB color support recommended (iTerm2, Terminal.app, Hyper, etc.)
    • Gracefully falls back to basic ANSI colors in unsupported terminals

๐Ÿ› ๏ธ Development

Building from Source

# Clone the repo
git clone https://github.com/jroell/gitgang.git
cd gitgang

# Install deps
npm install

# Run locally
npm run build
node dist/cli.js "Test task"

Sidebar Demo

Render the polished sidebar without wiring the full CLI:

import { renderHelloWorldSidebar } from "./src/sidebar.ts";

console.log(renderHelloWorldSidebar());

Publishing

# Set your npm token
export NPM_TOKEN='your_npm_token_here'

# Run publish script
./release.sh

๐ŸŽฏ Use Cases

  • Feature Development: Implement complex features with multiple perspectives
  • Refactoring: Get different approaches to code restructuring
  • Bug Fixes: Multiple agents tackle the same bug differently
  • Code Reviews: Compare solutions before committing
  • Experimentation: Try different implementation strategies simultaneously

โš ๏ธ Important Notes

  • Requires a clean git working tree (commit or stash changes first)
  • Agents have full authorization to modify files and run commands in yolo mode
  • Each agent works in isolated git worktrees to prevent conflicts
  • The reviewer creates a new merge branch for the final solution
  • Worktrees are automatically cleaned up after completion
  • Real-time dashboard updates every 2 seconds with live git status monitoring
  • Terminal colors auto-detected; works in basic ANSI mode if RGB not supported
  • Reviewer agent shown separately with distinct visual styling (pink badge)

๐Ÿ“ Example Session

$ gitgang "Add Redis caching layer to API"

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿค˜ GitGang - The gang's all here to code!                                      โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Repository: /Users/you/project
Base branch: main
Task: Add Redis caching layer to API
Rounds: 3  Auto-merge: true
Type /help for interactive commands while agents run.

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿš€ Starting AI Agents                                                           โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

 GEMINI  โ†’ agents/gemini/20251104-010930-a4f2b1
 CLAUDE  โ†’ agents/claude/20251104-010930-c8e3d2
 CODEX   โ†’ agents/codex/20251104-010930-f9a1e5

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿ“Š Agent Dashboard                              Round 1  โฑ๏ธ  3:24               โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ โ— GEMINI   โœ“ Complete    Files: +3 ~2 -0    Commits: 4                         โ”‚
โ”‚   Implemented Redis client with connection pooling                              โ”‚
โ”‚                                                                                  โ”‚
โ”‚ โ— CLAUDE   โ— Working     Files: +2 ~1 -0    Commits: 3                         โ”‚
โ”‚   Adding cache layer to API endpoints...                                        โ”‚
โ”‚                                                                                  โ”‚
โ”‚ โ—‹ CODEX    โ—‹ Pending     Files: +0 ~0 -0    Commits: 0                         โ”‚
โ”‚   Waiting to start...                                                           โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚ REVIEWER   โ— Reviewing                                                          โ”‚
โ”‚   Comparing all solutions...                                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โœ“ Reviewer Approved                                                             โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Merge branch ready: ai-merge-20251104-011245
PR created: https://github.com/you/project/pull/123

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โœจ All done!                                                                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

MIT License - see LICENSE file for details

๐Ÿ‘ค Author

Jason Roell (@jroell88)

๐Ÿ”— Links


Note: This tool gives AI agents significant autonomy over your codebase. Always review changes before merging to production. Use --no-yolo mode for safer, interactive operation.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published