Install MegaBrain

Code with MegaBrain in your terminal, your editor and on your Mac

Install the CLI to run the Code Factory agent in your terminal, add the extension to VS Code, Cursor or Windsurf or the plugin to a JetBrains IDE, or download the Mac app. Sign in once and it starts on Free with the free models; you need no API keys of your own. To use your own provider keys instead, add them in the provider settings.

MegaBrain CLI

AI coding assistance in your terminal

The MegaBrain CLI brings agentic coding to your terminal and CI. It connects to MegaBrain when you sign in, so you need no provider API keys.

v7.4.18-mb.26engine: Kilo 7.4.18

Install with npm

$npm install -g @getmegabrain/cli

Requires Node.js 18 or later. Sign in with your MegaBrain account when prompted to connect the Gateway.

Or run it once, without installing

$npx @getmegabrain/cli
  1. Step 1

    Install the CLI

    Run the install command above with npm.

  2. Step 2

    Sign in

    Run megabrain auth login and approve the sign-in in your browser to link the Gateway.

  3. Step 3

    Start coding

    Run megabrain in any project and let the agent work.

MegaBrain for VS Code

The agent in the sidebar of VS Code, Cursor and Windsurf

The same agent in your editor. It plans, edits across files, runs commands and checks its own work, on the same plan and limits as the CLI and the Mac app. VS Code installs it from the VS Code Marketplace; Cursor, Windsurf and other VS Code forks install it from Open VSX.

v7.4.18VS Code 1.105 or later, or a fork built on it

Or install it from a terminal

$code --install-extension megabrain.code-factory
  1. Step 1

    Install

    Open the store page above, or search for MegaBrain in your editor’s Extensions view.

  2. Step 2

    Sign in

    Open MegaBrain in the sidebar and sign in with your MegaBrain account in the browser.

  3. Step 3

    Start coding

    Open a project and tell the agent what to build.

MegaBrain for JetBrains

The agent in a tool window of IntelliJ IDEA, PyCharm, WebStorm, GoLand, Rider and the other JetBrains IDEs

The same agent in your IDE. It plans, edits across files, runs commands and checks its own work, on the same plan and limits as the CLI and the Mac app. On its first start the plugin downloads the MegaBrain CLI it runs, about 60 MB.

v1.0.2JetBrains IDEs 2026.1 or later
  1. Step 1

    Install

    Open the Marketplace page above, or search for MegaBrain under Settings → Plugins → Marketplace in your IDE.

  2. Step 2

    Sign in

    Open the MegaBrain tool window, then the gear → User Profile → Login with MegaBrain, and approve the code in your browser.

  3. Step 3

    Start coding

    Open a project and tell the agent what to build.

MegaBrain for Mac

Your projects, threads and limits in one window

The same agent as a desktop app. Commands run on your Mac, and the app keeps its own settings in ~/.megabrain. It is signed with a Developer ID and notarized by Apple.

v1.0.2macOS 13 or later on Apple silicon (M1 or newer)
Download for Mac (.dmg)

The app does not update itself yet: download a new version here when one is out.

  1. Step 1

    Install

    Open the .dmg and drag MegaBrain to Applications.

  2. Step 2

    Sign in

    Choose Sign in with MegaBrain and approve the device in your browser.

  3. Step 3

    Start coding

    Open a project folder and tell the agent what to build.