Skip to main content

Getting Started

Learn how to install and set up MyCoder for your development environment.=

Prerequisites

  • OS: MacOS, Windows, or Linux
  • Node.js >= 20.0.0
  • An API key for your chosen AI provider

Installation

# Install globally
npm install -g mycoder

# Or use with npx
npx mycoder

Platform-Specific Setup

MyCoder works on all major operating systems. Select your platform for specific setup instructions:

Setting Up Your API Key

Before using MyCoder with a specific provider, you need to provide the appropriate API key:

  1. Set an environment variable:

    export ANTHROPIC_API_KEY=your-api-key
    # or
    export OPENAI_API_KEY=your-api-key
  2. Create a .env file in your working directory with the appropriate key:

    ANTHROPIC_API_KEY=your-api-key

You can obtain API keys from the respective provider websites.

Supported AI Providers

MyCoder supports multiple AI providers:

ProviderEnvironment VariableModels
AnthropicANTHROPIC_API_KEYclaude-3-opus, claude-3-sonnet, etc.
OpenAIOPENAI_API_KEYgpt-4o, gpt-4-turbo, etc.
OllamaN/A (local)Models with tool calling support

You can specify which provider and model to use with the --provider and --model options:

mycoder --provider openai --model gpt-4o "Your prompt here"

Or set them as defaults in your configuration file:

// mycoder.config.js
export default {
provider: 'openai',
model: 'gpt-4o',
};

Next Steps