Coderrr is an AI-powered coding agent that understands natural language requests and autonomously creates, modifies, and manages code. Think of it like having an AI pair programmer that can handle everything from simple file creation to complex multi-file refactoring.
| Feature | Coderrr | GitHub Copilot |
|---|---|---|
| Scope | Full file operations, multi-file changes | Inline code suggestions |
| Autonomy | Autonomous plan execution | Requires manual acceptance |
| Interface | CLI + Programmatic API | IDE extension |
| File Awareness | Full codebase scanning | Current file context |
| Commands | Can execute shell commands | Code suggestions only |
Coderrr supports:
- GitHub Models (default): Mistral Large via Azure
- Mistral AI: Direct Mistral API access
You can configure this via environment variables in .env.
Coderrr itself is free and open-source (MIT License). However, you need:
- A GitHub account (for GitHub Models) - Free tier available
- Or a Mistral AI API key (paid service)
No, Coderrr requires an internet connection to communicate with AI models. However, once you have the generated code, you can work offline.
Required:
- Node.js 16+ (for CLI)
- Python 3.8+ (for backend)
- Windows, macOS, or Linux
Recommended:
- Node.js 18+ for best compatibility
- Python 3.11 for optimal performance
- PowerShell 5.1+ on Windows
# Clone the repository
git clone https://github.com/yourusername/coderrr.git
cd coderrr
# Install Node.js dependencies
npm install
# Install Python dependencies
pip install -r requirements.txt
# Set up environment variables
cp .env.example .env
# Edit .env with your API keys
# Link CLI globally
npm linkSee README.md for detailed instructions.
Coderrr uses a dual architecture:
- Backend (Python/FastAPI): Handles AI model communication
- Frontend (Node.js): CLI interface and file operations
This separation allows for flexibility and easier maintenance.
- Go to GitHub Settings → Developer Settings → Personal Access Tokens
- Click "Generate new token (classic)"
- Give it a name like "Coderrr"
- Select scopes: No specific scopes needed for GitHub Models
- Generate and copy the token
- Add to
.env:GITHUB_TOKEN=your_token_here
Step 1: Start the backend
uvicorn main:app --reload --port 5000Step 2: Use the CLI
# Interactive mode
coderrr
# Single command
coderrr exec "your request here"File Operations:
- "Create a Node.js server with Express"
- "Add error handling to server.js"
- "Refactor utils.js to use async/await"
- "Delete old-file.js"
Code Generation:
- "Create a REST API for user management"
- "Add JWT authentication"
- "Generate unit tests for calculator.js"
Project Setup:
- "Initialize a React project with TypeScript"
- "Set up ESLint and Prettier"
- "Create a .gitignore for Node.js"
Commands:
- "Install axios and express"
- "Run tests"
- "Build the project"
Yes, by default. Coderrr will:
- Show you the command
- Ask for permission (Y/n)
- Execute if approved
- Show live output
This is for safety and transparency.
Not via CLI for safety reasons. However, in programmatic usage, you can:
await executor.execute(command, {
requirePermission: false // Use with caution
});Coderrr has a Codebase Scanner that:
- Automatically scans your project on first request
- Builds a map of all files and directories
- Caches results for 1 minute
- Includes context in AI prompts
This prevents filename mismatches and helps the AI make informed decisions.
- Use Git: Always work in a Git repository so you can revert changes
- Review changes: Check what Coderrr created before committing
- Iterative fixes: Ask Coderrr to fix the issue: "Fix the error in server.js"
- Manual override: You can always edit files manually
Coderrr doesn't have built-in undo. Use Git:
# Undo uncommitted changes
git checkout -- filename
# Revert a commit
git revert HEAD
# Reset to previous state
git reset --hard HEAD~1Best practice: Commit before using Coderrr for major changes.
Check these:
-
Is the backend running?
curl http://localhost:8000 # Should return: {"message":"Coderrr backend is running 🚀",...} -
Is the URL correct in .env?
CODERRR_BACKEND=http://localhost:8000
-
Is the port available?
- Something else might be using port 5000
- Try a different port:
uvicorn main:app --reload --port 5001 - Update
.envaccordingly
-
Firewall issues?
- Some firewalls block local connections
- Add an exception for uvicorn/python
The backend has a fallback mechanism, but for best results:
# Activate virtual environment (recommended)
# Windows PowerShell:
.\env\Scripts\Activate.ps1
# Windows CMD:
.\env\Scripts\activate.bat
# Linux/Mac:
source env/bin/activate
# Then run backend
uvicorn main:app --reload --port 5000Yes, edit .env:
# For GitHub Models
MISTRAL_ENDPOINT=https://models.inference.ai.azure.com
MISTRAL_MODEL=mistral-large-2411 # or other models
# For Mistral AI direct
MISTRAL_ENDPOINT=https://api.mistral.ai
MISTRAL_MODEL=mistral-large-latest
MISTRAL_API_KEY=your_mistral_keyEdit .env:
TIMEOUT_MS=300000 # 5 minutes (default is 120000 = 2 minutes)Possible causes:
- Ambiguous request: Be more specific
- Cache issue: Refresh codebase scan:
coderrr exec "refresh codebase scan and then [your request]"
- Context misunderstanding: Provide more details
Solutions:
- Delete wrong files and try again with clearer instructions
- Use specific filenames: "Create server.js in the src/ directory"
- Mention existing files: "Add a function to the existing utils.js"
Error: "Failed to parse JSON response"
Causes:
- Backend returned invalid JSON
- AI model didn't follow the expected format
- Network corruption
Solutions:
- Check backend logs for raw response
- Try again (sometimes AI has a bad output)
- Reduce request complexity
- Check
MISTRAL_MODELin.env
After Coderrr generates code:
- Review the code: AI-generated code may need tweaking
- Install dependencies:
npm installorpip install -r requirements.txt - Check test configuration: Ensure test framework is set up correctly
- Run manually:
npm testorpytestto see detailed errors
On Windows:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserOn Linux/Mac:
chmod +x bin/coderrr.jsCodebase scanner caching:
- Clear cache periodically: Restart CLI or use
refreshCodebase() - Ignore large directories: Add to scanner ignore patterns
Backend:
- Large responses use more memory
- Reduce
max_tokensin requests
Yes! See examples/07-programmatic.md:
const Agent = require('coderrr/src/agent');
const agent = new Agent();
await agent.process('Create a REST API');Yes! See the example in examples/07-programmatic.md.
You can create automated pipelines that use Coderrr to generate code, run tests, and more.
Edit src/fileOps.js:
class FileOperations {
async customOperation(params) {
// Your implementation
}
async execute(operation) {
switch (operation.action) {
case 'custom_operation':
return await this.customOperation(operation);
// ... existing cases
}
}
}Yes! Coderrr's frontend can connect to any backend that implements the /chat endpoint:
CODERRR_BACKEND=https://my-custom-backend.comYour backend must:
- Accept
POST /chatwith{prompt, temperature, max_tokens, top_p} - Return
{response: "JSON-formatted plan"}
Yes, when you make requests:
- Your prompts and codebase context are sent to the AI model
- GitHub Models or Mistral AI process the requests
- Responses are returned to your local machine
Never sent:
.envfiles (ignored by scanner)node_modules/,env/directories- Large files (>500KB)
- Files in
.gitignorepatterns
Considerations:
- Review your organization's policies on using AI tools
- Coderrr sends code context to third-party AI services
- Consider self-hosting if you need full privacy
- Don't include sensitive credentials in code files
Best practices:
- Use environment variables for secrets
- Review generated code before committing
- Enable Git pre-commit hooks
- Use in development environments first
See SECURITY.md for our security policy.
Quick summary:
- Email security issues (don't open public issues)
- Include detailed reproduction steps
- Allow time for fixes before disclosure
See CONTRIBUTING.md for full guidelines.
Quick ways to contribute:
- Report bugs
- Suggest features
- Improve documentation
- Submit pull requests
- Share examples
- Architecture: Read docs/ARCHITECTURE.md
- Setup: Follow development setup in CONTRIBUTING.md
- Code style: Follow existing patterns (JavaScript + Python)
- Testing: Run tests before submitting PRs
- GitHub Issues: For bugs and feature requests
- GitHub Discussions: For general questions and ideas
- Documentation: Check docs/ first
Typical timings:
- Codebase scan: <10ms (cached: instant)
- Simple request: 2-5 seconds
- Complex multi-file request: 10-30 seconds
- Command execution: Depends on the command
Factors affecting speed:
- AI model response time
- Network latency
- Request complexity
- Codebase size
- Reduce context: Smaller codebases scan faster
- Use cache: Avoid
forceRefreshunless needed - Lower
max_tokens: Faster AI responses - Simpler requests: Break complex tasks into steps
- Local backend: Run backend on the same machine
Yes, but with considerations:
- Codebase scanner has a 500KB file size limit
- Scans can take longer (but results are cached)
- AI context window limits may require focused requests
For very large projects:
- Use specific directory paths in requests
- Work in focused areas
- Consider clearing cache periodically
- ✅ Windows 10/11 (PowerShell)
- ✅ macOS (Catalina and later)
- ✅ Linux (Ubuntu, Debian, Fedora, etc.)
- ✅ PowerShell (Windows default)
- ✅ Bash (Linux/Mac default)
- ✅ Zsh (Mac default)
⚠️ CMD (limited support)
Yes! Coderrr works great in WSL:
# In WSL terminal
cd /mnt/c/your/project
coderrrYes! The codebase scanner handles complex directory structures. For best results:
- Specify which package to work on
- Use relative paths from the root
MIT License - see LICENSE
You can:
- ✅ Use commercially
- ✅ Modify
- ✅ Distribute
- ✅ Use privately
Yes! The MIT License allows commercial use. However:
- Check the licenses of AI services you use (GitHub Models, Mistral AI)
- Review your organization's policies on AI-generated code
Yes, but:
- AI-generated code may not be copyrightable in all jurisdictions
- You're responsible for ensuring generated code doesn't violate licenses
- Review and modify generated code as needed
Still have questions? Open an issue or check the documentation.