> ## Documentation Index
> Fetch the complete documentation index at: https://agent.minimax.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Install MiniMax Code CLI, sign in, and complete your first terminal task.

MiniMax Code CLI brings MiniMax Code into your terminal and code repositories. Use the interactive TUI for long-running work, or `mcode exec` for Shell and CI automation.

## Choose an entry point

| Entry point | Command | Best for |
| - | - | - |
| Interactive TUI | `mcode [prompt]` | Exploring repositories, conversations, edits, and permission prompts |
| Headless | `mcode exec [prompt]` | Shell scripts, CI, batch jobs, and evaluations |
| ACP | `mcode acp` | Editors and clients that support Agent Client Protocol |

## Requirements

Manual installation requires one of these Node.js versions:

* Node.js `22.19.0` or later in the 22.x line;
* Node.js 24, 25, or 26.

The one-command installer prepares a compatible Node.js runtime when needed. Alpine and other musl-based Linux distributions are not currently supported by the installer.

## Install

### Official installer

The installer installs the latest CLI without requiring `sudo` or administrator privileges:

> [tab] macOS / Linux / WSL
>
> ```bash theme={null}
> curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash
> ```

> [tab] Windows
>
> Run this command in PowerShell:
>
> ```powershell theme={null}
> irm https://filecdn.minimax.chat/public/install.ps1 | iex
> ```

### npm

If a compatible Node.js is already installed:

```bash theme={null}
npm install -g @minimax-ai/code
```

Reopen your terminal and verify the command:

```bash theme={null}
mcode --version
mcode --help
```

## Sign in

For a mainland China account:

```bash theme={null}
mcode login
```

For a Global account:

```bash theme={null}
mcode login --region global
```

Sign-in is completed in your browser. After returning to the terminal, run `/status` in the TUI to check your account, model, and runtime status. Sign out with:

```bash theme={null}
mcode logout
```

To use a custom provider or MiniMax API key, configure a provider as described in [Features and configuration](https://agent.minimax.io/docs/cli/features.md).

## Complete your first task

Open the project directory you want to work in:

```bash theme={null}
cd /path/to/your/project
mcode
```

You can submit the first task as part of startup:

```bash theme={null}
mcode "Inspect the failing tests in this project, fix them, and run the relevant tests"
```

MCode reads project rules, relevant implementation, and test entry points from the current workspace before making and verifying changes. Include the expected outcome, change boundaries, and validation method in your prompt whenever possible.

When entering a repository for the first time, generate or update project instructions:

```bash theme={null}
mcode init .
```

`init` analyzes the directory structure, project rules, and available scripts, then generates or updates `AGENTS.md`.

## Continue an existing session

```bash theme={null}
# Continue the most recent session in the current workspace
mcode --continue

# Open the session manager
mcode --session

# Open a specific session
mcode --session <session-id>
```

`--session`, `--continue`, and the compatibility alias `--resume` cannot be combined. In the TUI, use `/sessions [query]` to search and manage sessions.

## First TUI actions

| Action | Purpose |
| - | - |
| `Enter` | Send a message; steer the current response while a task runs |
| `Alt+Enter` | Queue a follow-up while a task runs |
| `Shift+Enter` | Insert a newline in the composer |
| `@` | Reference a file or directory in the workspace |
| `Ctrl+V` | Paste an image or video file from the clipboard |
| `Shift+Tab` | Switch Plan Mode |
| `Alt+M` | Switch Ask, Auto, or Full access permission mode |
| `Esc` | Close the current panel or interrupt the running task |

Run `/help` to see the complete command and shortcut list for the installed version. While a task runs, press `Enter` or use `/steer <message>` to guide the current response, and press `Alt+Enter` to queue a follow-up.

## Next steps

> [card] [Features and configuration](https://agent.minimax.io/docs/cli/features.md)
>
> Learn about TUI, Headless, ACP, providers, plugins, and the complete command reference.

> [card] [Troubleshooting](https://agent.minimax.io/docs/cli/faq.md)
>
> Troubleshoot installation, sign-in, configuration, automation output, sessions, and terminal compatibility.
