Skip to main content

Quick Start

Get started in seconds:
npx megallm@latest
That’s it! The interactive wizard guides you through the entire setup process.
No installation required - just run npx megallm@latest and follow the prompts

What It Does

The CLI automatically:
  • Detects installed AI tools and your system configuration
  • Installs missing tools if needed (with your permission)
  • Configures AI assistants with your MegaLLM API key
  • Backs up existing configurations before making changes
  • Validates settings to ensure everything works correctly

Supported Tools

Claude Code

System & project-level configuration

Codex/Windsurf

System-level configuration

OpenCode

System & project-level configuration

Key Features

Smart Detection

Auto-detects OS, shell, installed tools, and existing configurations

Automated Setup

Interactive wizard with step-by-step guidance

Secure Storage

Automatic backups and secure API key management

Cross-Platform

Works on macOS, Linux, Windows with all major shells

How It Works

1

Run the CLI

Execute npx megallm@latest in your terminal
2

System Detection

CLI detects your OS, shell, and installed AI tools
3

Choose Configuration

Select which tool(s) to configure and at what level (system/project)
4

Enter API Key

Provide your MegaLLM API key (or get guided to create one)
5

Review & Confirm

Review configuration summary and confirm
6

Apply Settings

CLI configures files, sets environment variables, and reloads shell

Setup Levels

Choose between two configuration levels:

System-Level (Global)

Applies to all projects on your machine. Best for:
  • Personal development environments
  • Single developer setups
  • Quick testing and prototyping
Storage:
  • ~/.claude/ - Claude Code
  • ~/.codex/ - Codex/Windsurf
  • ~/.config/opencode/ - OpenCode

Project-Level (Local)

Applies only to the current project directory. Best for:
  • Team projects with shared configurations
  • Different API keys per project
  • Version-controlled settings
Storage:
  • ./.claude/ - Claude Code
  • ./opencode.json - OpenCode
Codex/Windsurf only supports system-level configuration

Requirements

Node.js 18.0.0+ is required. Check your version: node --version
Supported Platforms:
  • macOS (Intel & Apple Silicon)
  • Linux (all major distributions)
  • Windows (10/11 with WSL or native)
Supported Shells:
  • bash
  • zsh
  • fish
  • PowerShell

Installation Options

No installation needed:
npx megallm@latest

Global Installation

Install once, use anytime:
npm install -g megallm
megallm

Specific Version

Run a specific version:
npx megallm@2.5.9

First-Time Setup Example

# Run the CLI
npx megallm@latest

# Interactive prompts:
# ✓ System detected: Linux (bash)
# ✓ Tools detected: Claude Code ✓, Codex ✗
#
# ? Which tool? › Claude Code
# ? Setup level? › System-level (global)
# ? Enter API key: sk-mega-***
#
# ✓ Configuration applied successfully!
# 🎉 Ready to use Claude Code with MegaLLM

Getting Your API Key

1

Visit Dashboard

2

Sign Up or Log In

Create an account or log in to existing one
3

Generate API Key

Navigate to API Keys section and click “Create New API Key”
4

Copy Key

Copy your key (starts with sk-mega-) - you won’t see it again
5

Use in CLI

Paste the key when prompted during setup
The CLI can automatically open the dashboard for you during setup

What’s Next?

Support

Need help? We’re here for you: