βββββββ βββββββ βββββββ βββββββββββββββ βββββββ βββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
βββ βββ ββββββ βββββββββ ββββββββββββββββββββββββ
βββ βββ ββββββ βββββββββ ββββββββββββββββββββββββ
ββββββββββββββββββββββββββββββββββββ ββββββ ββββββ βββ
βββββββ βββββββ βββββββ βββββββββββ ββββββ ββββββ βββ
Your friendly neighbourhood Open Source AI-Powered Coding Agent
Coderrr is an AI-powered coding agent that analyzes tasks, creates actionable plans, performs file operations, and executes commands with user permission. Built for developers who want automated assistance without sacrificing control.
- See Coderrr in Action
- Features
- Installation
- Usage Examples
- How It Works
- Architecture
- Codebase Intelligence
- Safety Features
- Supported Test Frameworks
- Contributing
- Documentation
- License
- Task Analysis - Breaks down complex requests into structured, actionable TODO items
- File Operations - Create, update, patch, delete, and read files with automatic directory creation
- Command Execution - Runs shell commands with mandatory permission prompts (GitHub Copilot-style)
- Self-Healing - Automatically retries failed steps with AI-generated fixes
- Auto Testing - Automatically detects and runs tests after completing tasks
- Codebase Intelligence - Scans and understands project structure for accurate file editing
- Git Integration - Automatic checkpoints and commits with easy rollback capability
- Interactive Mode - Continuous conversation loop for iterative development
- Beautiful CLI - Clean interface with progress indicators and status updates
- Codebase Scanner - Automatic project awareness with 1-minute cache
- Multi-Framework Support - Works with Node.js, Python, Go, Rust, Java projects
- Environment Configuration - Flexible backend configuration via environment variables
- Safety First - Permission prompts for all destructive operations
- Dual Architecture - Python backend for AI, Node.js frontend for file operations
If you just want to try Coderrr quickly without any configuration, follow these steps:
npm install -g coderrr-cli
cd C:\Coder\Coderrr
coderrr
### Quick Start (Zero Config!)
```bash
npm install -g coderrr-cliThat's it! The CLI comes pre-configured with a hosted backend.
To run Coderrr locally from source or contribute to the project, ensure you have:
- Node.js >= 16.x
- npm (comes with Node.js)
- Python >= 3.8
- pip
- Git
Navigate to any folder and start coding:
cd my-project
coderrrBy default, Coderrr uses our hosted backend at https://coderrr-backend.vercel.app.
If you want to use a custom backend (self-hosted or different provider), you have several options:
Create ~/.coderrr/.env:
Windows:
mkdir $HOME\.coderrr
echo CODERRR_BACKEND=http://localhost:8000 > $HOME\.coderrr\.envLinux/Mac:
mkdir -p ~/.coderrr
echo "CODERRR_BACKEND=http://localhost:8000" > ~/.coderrr/.envWindows:
setx CODERRR_BACKEND "http://localhost:8000"Linux/Mac:
export CODERRR_BACKEND="http://localhost:8000"
# Add to ~/.bashrc or ~/.zshrc for persistencecoderrr --backend http://localhost:8000Most users won't need this! But if you want to run your own backend for privacy or customization, see our Self-Hosting Guide.
Navigate to your project and start the agent:
cd my-project
coderrrOr explicitly:
coderrr startExecute a single request and exit:
coderrr exec "Create a FastAPI endpoint for user authentication"-b, --backend <url>- Override the default backend URL-d, --dir <path>- Working directory (default: current directory)--no-auto-test- Disable automatic test running--no-auto-retry- Disable automatic retry/self-healing on errors--max-retries <number>- Maximum retry attempts per failed step (default: 2)--auto-commit- Enable git checkpoints and auto-commit (opt-in)
Default Backend: Uses hosted backend at https://coderrr-backend.vercel.app
Self-Healing: When a step fails, Coderrr automatically analyzes the error and attempts to fix it up to 2 times before giving up.
Git Integration: With --auto-commit flag, Coderrr creates safety checkpoints before operations and auto-commits successful changes. Use coderrr rollback to undo changes.
# Interactive mode
coderrr
# Create a new feature
coderrr exec "Add a REST API endpoint for creating blog posts"
# Refactor code
coderrr exec "Refactor the authentication module to use JWT tokens"
# Fix bugs
coderrr exec "Fix the database connection timeout issue"
# Write tests
coderrr exec "Add unit tests for the user service"
# With git safety (auto-commit enabled)
coderrr --auto-commit exec "Create user authentication system"
# Rollback changes
coderrr rollback
# Custom backend
coderrr start --backend http://my-backend:5000
# Different working directory
coderrr start --dir /path/to/project- User Input - You provide a coding task or request
- AI Analysis - The backend LLM analyzes and creates a structured plan
- TODO Generation - Tasks are broken down into actionable steps
- Execution - The agent executes each step:
- File operations (create, update, patch, delete)
- Command execution (with permission prompts)
- Testing - Automatically runs tests if a test framework is detected
- Completion - Shows summary and execution statistics
The Coderrr repository follows a clean and modular structure to improve maintainability, scalability, and contributor onboarding.
Coderrr/
βββ bin/ # CLI entry points (modern CLI & legacy TUI)
βββ src/ # Core agent logic, file operations, execution & UI
βββ backend/ # FastAPI backend for AI processing
βββ docs/ # Detailed documentation (architecture, API, guides)
βββ examples/ # Example usage and demo projects
βββ test/ # General test files
βββ tests/unit/ # Unit tests for core components
βββ .github/ # GitHub Actions, CI/CD workflows, templates
βββ package.json # Node.js dependencies and CLI metadata
βββ README.md # Project overview and usage guide
βββ LICENSE # MIT license
---
## Architecture
Coderrr/ βββ bin/ β βββ coderrr.js # Modern CLI (commander-based) β βββ coderrr-cli.js # Legacy TUI (blessed-based) βββ src/ β βββ agent.js # Core agent logic & orchestration β βββ fileOps.js # File operations handler β βββ executor.js # Command executor with permissions β βββ todoManager.js # TODO tracking & visualization β βββ codebaseScanner.js # Project structure scanner β βββ ui.js # UI utilities & components βββ backend/ β βββ main.py # FastAPI backend server β βββ requirements.txt # Python dependencies βββ test/ # Test suite βββ docs/ # Documentation βββ examples/ # Usage examples βββ .github/ # CI/CD workflows βββ package.json βββ .env # Environment configuration
### Backend (FastAPI)
Handles AI model communication, request processing, and JSON schema enforcement. Runs on port 5000 by default.
### Frontend (Node.js)
Manages user interaction, file operations, command execution, and project scanning. Provides both CLI and TUI interfaces.
---
## Codebase Intelligence
Coderrr includes an intelligent **Codebase Scanner** that:
- **Automatically scans** your project on first request
- **Remembers** all existing files and their locations
- **Prevents** filename mismatches when editing existing code
- **Caches** results for fast subsequent requests
- **Ignores** common folders like `node_modules`, `env`, `__pycache__`
This means when you ask to "edit the agent file", it knows you mean `src/agent.js` not `agent.py` or `agentController.js`.
**Learn more:** See [docs/ARCHITECTURE.md](./docs/ARCHITECTURE.md) for detailed architecture documentation.
---
## Safety Features
- **Permission Prompts** - All commands require user confirmation before execution
- **Diff Preview** - See changes before files are modified
- **Step-by-step Execution** - Each action is executed individually with feedback
- **Error Handling** - Graceful error handling with options to continue or stop
- **Git-Friendly** - Works best in Git repositories for easy rollback
---
## Supported Test Frameworks
Coderrr automatically detects and runs tests for:
- **JavaScript/TypeScript** - npm test
- **Python** - pytest
- **Go** - go test
- **Rust** - cargo test
- **Java** - Maven (mvn test) or Gradle (gradle test)
---
## Local Development Setup (For Contributors)
This section explains how to run Coderrr locally from source for development or contributions.
### 1. Clone the Repository
```bash
git clone https://github.com/Akash-nath29/Coderrr.git
cd Coderrr
cd backend
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txtRun the backend server:
uvicorn main:app --reload --port 5000Backend will be available at:
http://localhost:5000From the project root:
npm install
npm linkThis allows you to run the local CLI using:
coderrrCreate a user config file:
mkdir -p ~/.coderrr
echo "CODERRR_BACKEND=http://localhost:5000" > ~/.coderrr/.envOr run directly:
coderrr --backend http://localhost:5000cd any-project
coderrr- Ensure FastAPI is running on port 5000
- Check
CODERRR_BACKENDvalue
- Run
npm linkagain - Restart terminal
- Ensure virtual environment is activated
- Re-run
pip install -r requirements.txt
Before contributing, please review the Project Structure section above to understand where new code, tests, or documentation should be added.
Contributions are welcome! Please read our Contributing Guidelines before submitting pull requests.
feature/*βdevβmain- Direct feature to main PRs are blocked by CI
- All tests run on PRs to dev or main
See CONTRIBUTING.md for detailed development setup and guidelines.
- Architecture - System design and data flow
- API Reference - Complete API documentation
- FAQ - Frequently asked questions
- Deployment - Production deployment guide
- Examples - Usage examples and tutorials
MIT License - see LICENSE file for details.
Inspired by:
- Claude Code (Anthropic)
- GitHub Copilot CLI
- Cursor AI
Built by developers, for developers
