Documentation

Getting started

MegaBrain Code Factory runs an AI coding agent on your machine. These steps get it working in a few minutes.

1. Install the CLI

$npm install -g @getmegabrain/cli

Then run megabrain in the folder of your project. Prefer a window? Download the Mac app and choose Sign in with MegaBrain when it opens. In VS Code, Cursor or Windsurf, add the extension; in IntelliJ IDEA, PyCharm and the other JetBrains IDEs, add the plugin. All of them use the same sign-in and the same plan.

2. Sign in

Run megabrain auth login and choose MegaBrain. A browser page opens; sign in with Google or an email link and approve the device. The CLI keeps the sign-in on your machine, so you do this once.

3. Plans and limits

Free gives you the free models, your own keys and local models. Plus ($8 a month), Pro ($30), Super ($100) and Ultra ($200) include GLM, Kimi, MiniMax, DeepSeek, Qwen, Grok and Auto, paid from the plan's limits. From Pro up, Claude, GPT and Gemini are paid from your credits.

Every paid plan has a session limit over 5 hours, which can use up to a quarter of the week, and a weekly limit that resets every Thursday at 00:00 UTC. Pro has four times Plus's limits, Super 15 times and Ultra 25 times. See them any time with megabrain limits, the /limits command in the agent, or on your Billing page.

When a limit is reached, the agent says when it resets. The free models and your own keys keep working, and you can turn on Extra Usage on the Billing page to continue from your balance.

4. Your own keys and local models

Run megabrain auth login again and choose another provider to add its API key. Requests through your own key never count against your plan. Local models served by Ollama or LM Studio work the same way.

Help

Questions about billing and plans are answered in the FAQ. For anything else, see Support or read how we handle your code in Security.