Quick Install (Recommended)
Activate Yarn via Corepack and run the CLI with yarn dlx
corepack enable && corepack prepare yarn@4.9.2 --activateyarn dlx monkey-coder-cli@latest --helpyarn dlx to stay aligned with the Yarn 4 workspace toolchain.monkey-coder implement
Generate code implementation based on requirements
Examples
Basic implementation:
monkey-coder implement "Create a user authentication system"Modify existing file:
monkey-coder implement "Add error handling" src/api.ts --output src/api-fixed.tsLanguage conversion with streaming:
monkey-coder implement "Convert to TypeScript" legacy.js --language typescript --streamOptions
-o, --outputOutput file path-l, --languageTarget programming language-p, --personaAI persona to use (developer, architect, etc.)--modelSpecific AI model to use--streamEnable streaming output-t, --temperatureModel temperature (0.0-2.0)monkey-coder analyze
Analyze code for quality, security, and performance issues
Examples
Security analysis:
monkey-coder analyze src/**/*.ts --type securityPerformance analysis with report:
monkey-coder analyze app.py --type performance --output report.mdOptions
-t, --typeAnalysis type (quality, security, performance)-o, --outputOutput file for analysis report-p, --personaAI persona (default: reviewer)--streamEnable streaming outputmonkey-coder build
Build and optimize code architecture
Examples
Architecture design:
monkey-coder build "Design a microservices architecture"Refactoring with output directory:
monkey-coder build "Refactor monolith" src/ --output refactored/Options
-o, --outputOutput directory for built files-p, --personaAI persona (default: architect)--streamEnable streaming outputmonkey-coder test
Generate comprehensive tests for your code
Examples
Generate Jest tests:
monkey-coder test src/utils.ts --framework jestGenerate Python tests:
monkey-coder test src/**/*.py --output tests/ --framework pytestOptions
-o, --outputOutput directory for test files-f, --frameworkTesting framework (jest, pytest, etc.)-p, --personaAI persona (default: tester)--streamEnable streaming outputmonkey-coder config
Manage CLI configuration
Examples
Set API key:
monkey-coder config set apiKey "your-api-key"List all configuration:
monkey-coder config listReset to defaults:
monkey-coder config resetOptions
set <key> <value>Set a configuration valueget <key>Get a configuration valuelistList all configurationresetReset to default configurationmonkey-coder health
Check API server health status
Examples
Check server status:
monkey-coder healthAI Personas
Choose specialized AI personas for different tasks
developerGeneral purpose coding and implementation
architectSystem design and architecture planning
reviewerCode review and quality analysis
security_analystSecurity-focused analysis
performance_expertPerformance optimization
testerTest generation and quality assurance
technical_writerDocumentation and explanation
Configuration Options
Available configuration keys and their defaults
apiKeyYour API key for authentication
baseUrlBase URL for the API
Default: https://monkey-coder.up.railway.appdefaultPersonaDefault AI persona
Default: developerdefaultModelDefault AI model
Default: claude-opus-4-6defaultProviderDefault AI provider
Default: anthropicdefaultTemperatureDefault model temperature
Default: 0.1defaultTimeoutDefault request timeout (seconds)
Default: 300Environment Variables
Alternative configuration through environment variables
MONKEY_CODER_API_KEYAPI keyMONKEY_CODER_API_URLBase URL for the APIAdvanced Usage Patterns
Pro tips and advanced workflows
Streaming Output
Use the --stream flag for real-time progress updates on long-running tasks:
monkey-coder implement "Complex system" --streamCombining Commands
Chain commands for complete workflows:
# Generate code, analyze it, then create tests
monkey-coder implement "API endpoint" --output api.ts
monkey-coder analyze api.ts --type security
monkey-coder test api.ts --framework jestUsing Personas Effectively
Match personas to tasks for best results: