| sidebar_position | 2 |
|---|
Learn how to install and set up MyCoder for your development environment.=
- OS: MacOS, Windows, or Linux
- Node.js >= 20.0.0
- An API key for your chosen AI provider
# Install globally
npm install -g mycoder
# Or use with npx
npx mycoderMyCoder works on all major operating systems. Select your platform for specific setup instructions:
Before using MyCoder with a specific provider, you need to provide the appropriate API key:
-
Set an environment variable:
export ANTHROPIC_API_KEY=your-api-key # or export OPENAI_API_KEY=your-api-key # or export MISTRAL_API_KEY=your-api-key # or export XAI_API_KEY=your-api-key
-
Create a
.envfile in your working directory with the appropriate key:ANTHROPIC_API_KEY=your-api-key
You can obtain API keys from the respective provider websites.
MyCoder supports multiple AI providers:
| Provider | Environment Variable | Models |
|---|---|---|
| Anthropic | ANTHROPIC_API_KEY |
claude-3-opus, claude-3-sonnet, etc. |
| OpenAI | OPENAI_API_KEY |
gpt-4o, o3-mini, etc. |
| Mistral AI | MISTRAL_API_KEY |
mistral-large, mistral-medium, etc. |
| xAI/Grok | XAI_API_KEY |
grok-1 |
| Ollama | N/A (local) | Various local models |
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',
};- Learn about basic usage
- Explore the configuration options
- Join our Discord community