Skip to main content
MegaLLM supports all major AI coding agents. This unified guide covers configuration for Claude Code, Codex/Windsurf, OpenCode, Kilocode, RooCode, and Cline.

Available Agents

Claude Code

CLI + Editor integration with JSON config

Codex/Windsurf

CLI + Editor with TOML config

OpenCode

CLI + Editor with auto-model fetching

Kilocode

VSCode extension with inline chat (CLI coming soon)

RooCode

Standalone app with visual interface

Cline

VSCode extension with autonomous tasks (CLI coming soon)

Quick Comparison

Agent Types

CLI-First Agents (with Editor Support)

Claude Code

  • CLI-first design
  • VSCode extension available
  • JSON configuration
  • System & project-level
  • Statusline support

Codex/Windsurf

  • CLI-first design
  • Editor integrations
  • TOML configuration
  • Cascade AI (Windsurf)
  • Supercomplete features

OpenCode

  • CLI-first design
  • Editor plugins available
  • JSON configuration
  • Auto-fetch models
  • Multi-provider support
When to use CLI-first agents:
  • Terminal-based workflows
  • CI/CD integration
  • Server environments
  • Scripting and automation
  • Also work great in editors with extensions

Editor-Only Agents (CLI Coming Soon)

Kilocode

  • VSCode extension (primary)
  • CLI under maintenance
  • Inline chat interface
  • Code completion
  • File tree integration

RooCode

  • Standalone app
  • Visual interface
  • Multi-project support
  • Code review features

Cline

  • VSCode extension (primary)
  • CLI under maintenance
  • Autonomous task execution
  • Terminal integration
  • Git workflow support
CLI Support for Kilocode & Cline: CLI versions are currently under maintenance and will be available soon. Use the VSCode extensions in the meantime.
When to use editor-focused agents:
  • Pure visual editing workflows
  • Inline suggestions and completions
  • Multi-file refactoring
  • Code review workflows
  • IDE-native experience

Getting Started

1

Choose Your Agent

Select a CLI agent for terminal workflows or a GUI agent for visual editing
2

Get Your API Key

Sign up at MegaLLM Dashboard and get your API key starting with sk-mega-
3

Configure Your Agent

Follow the specific configuration guide for your chosen agent (linked below)
4

Start Coding

Launch your agent and start using AI-powered coding assistance

Configuration Guides

CLI-First Agents (also work in editors)

Works as: CLI tool + VSCode extensionConfiguration files:
  • System: ~/.claude/settings.json
  • Project: ./.claude/settings.json
  • Local: ./.claude/settings.local.json
Quick setup:
Full Claude Code Configuration Guide →
Works as: CLI tool + Editor integrations (Windsurf is enhanced variant)Configuration file:
  • System: ~/.codex/config.toml (only)
Quick setup:
Full Codex/Windsurf Configuration Guide →
Works as: CLI tool + Editor plugins (VSCode, Vim, etc.)Configuration files:
  • System: ~/.config/opencode/opencode.json
  • Project: ./.opencode/opencode.json
Quick setup:
Full OpenCode Configuration Guide →

Editor-Only Agents

Configuration location:
  • User Settings (global): VSCode Settings UI or settings.json
  • Workspace Settings (project): .vscode/settings.json
Quick setup (settings.json):
Environment variable:
Full Kilocode Configuration Guide →
Configuration location:
  • Windows: %APPDATA%\RooCode\config.json
  • macOS: ~/Library/Application Support/RooCode/config.json
  • Linux: ~/.config/roocode/config.json
Quick setup:
Full RooCode Configuration Guide →
Configuration location:
  • User Settings (global): VSCode Settings UI or settings.json
  • Workspace Settings (project): .vscode/settings.json
Quick setup for GPT models (OpenAI format):
Quick setup for Claude models (Anthropic format):
Environment variable:
Full Cline Configuration Guide →

Model Selection

All agents support the same models through MegaLLM:

GPT Models

  • gpt-5 - Latest GPT model (recommended)
  • gpt-4 - GPT-4
  • gpt-4o - GPT-4 Optimized
  • gpt-4o-mini - Fast, cost-effective

Claude Models

  • claude-opus-4-1-20250805 - Most capable
  • claude-sonnet-4 - Balanced (recommended)
  • claude-haiku-4 - Fast, efficient

Gemini Models

  • gemini-2.5-pro - Latest Gemini
  • gemini-2.0-flash - Fast responses
See Full Model Catalog →

Environment Variables

Most agents support environment variables for API keys:
Add to your shell configuration:
  • Bash: ~/.bashrc
  • Zsh: ~/.zshrc
  • Fish: ~/.config/fish/config.fish

Common Configuration Patterns

Pattern 1: System-Level for Personal Use

Best for: Personal projects, single user

Pattern 2: Project-Level for Teams

Best for: Team projects, shared configuration

Pattern 3: Multi-Model Configuration

Best for: Using different models for different tasks

Troubleshooting

Verify your API key:
Common issues:
  • Missing sk-mega- prefix
  • Extra spaces or quotes
  • Wrong environment variable name
  • Shell config not reloaded (run source ~/.bashrc)
Check your base URL:For OpenAI-compatible format (GPT, Gemini):
For Anthropic format (Claude):
Agent-specific endpoints:
  • Claude Code: https://ai.megallm.io (no /v1)
  • Codex/Windsurf: https://ai.megallm.io/v1
  • OpenCode: https://ai.megallm.io/v1
  • Kilocode: https://ai.megallm.io/v1
  • RooCode: https://ai.megallm.io/v1
  • Cline: https://ai.megallm.io (Anthropic) or https://ai.megallm.io/v1 (OpenAI)
Verify model name spelling:Check Models Catalog for exact model names:
Check file locations:
Check permissions:
Reload your shell config:
Check where it’s defined:

Feature Comparison

Interfaces & Usage

Integrations

Configuration Flexibility

Best Practices

Use Environment Variables

Store API keys in environment variables, never commit them to version control

Project-Level for Teams

Use project-level config for shared settings, local files for personal keys

Choose Right Agent

CLI for automation/CI/CD, GUI for interactive coding and visual workflows

Test Configuration

Verify API connection with curl before configuring agents

Keep Keys Secure

Add sensitive files to .gitignore, use different keys for dev/prod

Regular Updates

Keep agents updated for latest features, security patches, and bug fixes

Next Steps

Claude Code

CLI with JSON config

Codex/Windsurf

CLI with TOML config

OpenCode

CLI with auto-fetch

Kilocode

VSCode extension

RooCode

Standalone app

Cline

VSCode + autonomy

Models Catalog

Browse all available models

API Reference

Direct API integration