npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

monkey-coder-cli

v1.4.2

Published

CLI for Monkey Coder - AI-powered code generation platform. Requires account at https://coder.fastmonkey.au or local backend.

Readme

Monkey Coder CLI

A powerful command-line interface for the Monkey Coder AI-powered code generation and analysis platform.

Features

  • 🚀 Code Implementation: Generate code based on natural language requirements
  • 🔍 Code Analysis: Analyze code for quality, security, and performance issues
  • 🏗️ Architecture Building: Design and build robust code architectures
  • 🧪 Test Generation: Automatically generate comprehensive unit tests
  • 📊 Streaming Output: Real-time progress updates with Server-Sent Events
  • ⚙️ Configuration Management: Persistent settings and preferences
  • 🎭 Multiple Personas: Choose from different AI personas (developer, architect, reviewer, tester, etc.)
  • 🔌 Provider Support: Support for multiple AI providers (OpenAI, Anthropic, Google, Qwen)

Installation

# Install globally
npm install -g monkey-coder-cli

# Or use yarn
yarn global add monkey-coder-cli

Quick Start

  1. Set up your API configuration:

Option A - Use the hosted service:

# Set the API endpoint to the hosted service
monkey config set baseUrl "https://coder.fastmonkey.au"

# Login with your account (or create one at https://coder.fastmonkey.au)
monkey auth login --email [email protected] --password yourpassword

# Or use an API key if you have one
monkey config set apiKey "your-api-key-here"

Option B - Use local development:

# For local development (default)
monkey config set baseUrl "http://localhost:8000"
monkey config set apiKey "mk-dev-YOUR-KEY"
  1. Check server health:
monkey health
  1. Generate some code:
monkey-coder implement "Create a TypeScript function that validates email addresses" --output email-validator.ts

Commands

implement

Generate code implementation based on requirements.

monkey-coder implement <prompt> [files...] [options]

# Examples:
monkey-coder implement "Create a React component for user authentication"
monkey-coder implement "Add error handling to this API" src/api.ts --output src/api-fixed.ts
monkey-coder implement "Convert this to TypeScript" legacy.js --language typescript --stream

Options:

  • -o, --output <file> - Output file path
  • -l, --language <lang> - Target programming language
  • -p, --persona <persona> - AI persona to use (default: developer)
  • --model <model> - AI model to use
  • --provider <provider> - AI provider to use
  • -t, --temperature <temp> - Model temperature (0.0-2.0)
  • --timeout <seconds> - Request timeout in seconds
  • --stream - Enable streaming output

analyze

Analyze code for quality, security, and performance issues.

monkey-coder analyze <files...> [options]

# Examples:
monkey-coder analyze src/**/*.ts --type security
monkey-coder analyze app.py --type performance --output performance-report.md
monkey-coder analyze src/ --persona security_analyst --stream

Options:

  • -t, --type <type> - Analysis type (quality, security, performance)
  • -p, --persona <persona> - AI persona to use (default: reviewer)
  • -o, --output <file> - Output file path for analysis report
  • --model <model> - AI model to use
  • --provider <provider> - AI provider to use
  • --stream - Enable streaming output

build

Build and optimize code architecture.

monkey-coder build <prompt> [files...] [options]

# Examples:
monkey-coder build "Design a microservices architecture for e-commerce"
monkey-coder build "Refactor this monolith into modules" src/ --output refactored/
monkey-coder build "Add caching layer" --persona architect --stream

Options:

  • -o, --output <dir> - Output directory for built files
  • -p, --persona <persona> - AI persona to use (default: architect)
  • --model <model> - AI model to use
  • --provider <provider> - AI provider to use
  • --stream - Enable streaming output

test

Generate tests for code files.

monkey-coder test <files...> [options]

# Examples:
monkey-coder test src/utils.ts --framework jest
monkey-coder test src/**/*.py --output tests/ --framework pytest
monkey-coder test app.js --persona tester --stream

Options:

  • -o, --output <dir> - Output directory for test files
  • -f, --framework <framework> - Testing framework to use
  • -p, --persona <persona> - AI persona to use (default: tester)
  • --model <model> - AI model to use
  • --provider <provider> - AI provider to use
  • --stream - Enable streaming output

config

Manage CLI configuration.

# Set configuration values
monkey-coder config set <key> <value>
monkey-coder config set apiKey "sk-..."
monkey-coder config set defaultPersona "architect"

# Get configuration values
monkey-coder config get apiKey
monkey-coder config get baseUrl

# List all configuration
monkey-coder config list

# Reset to defaults
monkey-coder config reset

health

Check API server health.

monkey-coder health

Configuration

The CLI supports configuration through:

  1. Configuration file (~/.config/monkey-coder/config.json)
  2. Environment variables
  3. Command-line options

Configuration Keys

  • apiKey - Your API key for authentication
  • baseUrl - Base URL for the API (default: https://monkey-coder.up.railway.app)
  • defaultPersona - Default AI persona (default: developer)
  • defaultModel - Default AI model (default: claude-sonnet-4-20250514)
  • defaultProvider - Default AI provider (default: anthropic)
  • defaultTemperature - Default model temperature (default: 0.1)
  • defaultTimeout - Default request timeout (default: 300)

Environment Variables

  • MONKEY_CODER_API_KEY - API key
  • MONKEY_CODER_API_URL - Base URL for the API

AI Personas

Choose different AI personas for specialized tasks:

  • developer - General purpose coding and implementation
  • architect - System design and architecture planning
  • reviewer - Code review and quality analysis
  • security_analyst - Security-focused analysis and recommendations
  • performance_expert - Performance optimization and analysis
  • tester - Test generation and quality assurance
  • technical_writer - Documentation and explanation

Streaming Output

Enable real-time progress updates with the --stream flag:

monkey-coder implement "Build a REST API" --stream

This provides:

  • Real-time progress updates
  • Step-by-step execution feedback
  • Interactive spinner animations
  • Immediate error reporting

Examples

Generate a Complete Feature

# Generate a user authentication system
monkey-coder implement "Create a complete user authentication system with login, register, and JWT tokens" \
  --language typescript \
  --persona developer \
  --output auth-system.ts \
  --stream

Analyze Code Security

# Security analysis of multiple files
monkey-coder analyze src/**/*.js \
  --type security \
  --persona security_analyst \
  --output security-report.md \
  --stream

Build System Architecture

# Design microservices architecture
monkey-coder build "Design a scalable microservices architecture for a social media platform" \
  --persona architect \
  --output architecture/ \
  --stream

Generate Tests

# Generate comprehensive tests
monkey-coder test src/api/users.ts src/api/auth.ts \
  --framework jest \
  --output tests/ \
  --persona tester \
  --stream

Error Handling

The CLI provides comprehensive error handling:

  • Network errors - Connection issues with the API server
  • Authentication errors - Invalid API keys or permissions
  • File errors - Missing files or permission issues
  • Validation errors - Invalid command arguments or options
  • API errors - Server-side processing errors

All errors are displayed with clear, actionable messages.

Cross-Platform Support

The CLI works on:

  • ✅ Windows (PowerShell, Command Prompt)
  • ✅ macOS (Terminal, iTerm)
  • ✅ Linux (Bash, Zsh, Fish)

Development

Building from Source

# Clone the repository
git clone https://github.com/your-org/monkey-coder.git
cd monkey-coder/packages/cli

# Install dependencies
yarn install

# Build the project
yarn build

# Link for local development
yarn link

Testing

# Run tests
yarn test

# Run tests in watch mode
yarn test:watch

# Run tests with coverage
yarn test:coverage

License

MIT License - see LICENSE for details.

Support