> ## 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 and start your first task from the command line.

<div className="code-docs">
  MiniMax Code CLI brings MiniMax Code into your terminal and code repositories. This page walks you through installing the CLI, signing in, launching the interactive TUI, and completing your first task.

  ## One-Command Installation

  The installer reuses a compatible Node.js installation when available. If your system does not have a compatible version, it installs a self-contained runtime in your user directory. The entire process requires neither `sudo` nor administrator privileges.

  <Tabs>
    <Tab title="macOS / Linux / WSL">
      ```bash theme={null}
      curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash
      ```
    </Tab>

    <Tab title="Windows">
      Run the following command in PowerShell:

      ```powershell theme={null}
      irm https://filecdn.minimax.chat/public/install.ps1 | iex
      ```
    </Tab>
  </Tabs>

  After installation, reopen your terminal and verify that the command is available:

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

  <Note>
    One-command installation supports macOS, Windows, common Linux distributions,
    and WSL. Alpine and other musl-based Linux distributions are not currently
    supported.
  </Note>

  ## Update the CLI

  After installing MCode, run the following command in your terminal to update it:

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

  You can also run `/update` in the TUI. Restart the current MCode process after the update completes.

  ## Sign In

  Sign in before using MiniMax-hosted models or a Token Plan:

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

  For a Global account, use:

  ```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. To use a custom provider or API key, configure the model source with `mcode provider`.

  ## Start Your First Task

  Open the project directory you want to work in, then launch the interactive TUI:

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

  You can also submit a task when launching the CLI:

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

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

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

  MCode reads the directory structure, project rules, relevant implementation, and available scripts before working toward your goal. When describing a task, include the expected outcome, change boundaries, and validation method whenever possible.

  ## 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>
  ```

  In the TUI, you can also use `/sessions [query]` to search, resume, and manage sessions.

  ## Common Interactions

  | Action          | Purpose                                                               |
  | --------------- | --------------------------------------------------------------------- |
  | `Enter`         | Send a message; messages sent during a running task join the queue    |
  | `Shift+Enter`   | Insert a new line 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 between Default and Plan Mode                                  |
  | `Alt+M`         | Switch among Ask, Auto, and Full access permission modes              |
  | `Ctrl+O`        | Expand or collapse Thinking, tool output, and diffs                   |
  | `Ctrl+T`        | Expand or collapse the full todo list                                 |
  | `PgUp` / `PgDn` | Browse conversation history; press `End` to return to the latest item |
  | `Esc`           | Close the active panel or interrupt the running task                  |

  ## Common Slash Commands

  | Command             | Purpose                                               |
  | ------------------- | ----------------------------------------------------- |
  | `/help`             | View commands and keyboard shortcuts                  |
  | `/status`           | View account, model, and runtime status               |
  | `/model`            | Select a model                                        |
  | `/sessions [query]` | Search, resume, and manage sessions                   |
  | `/context`          | View the context budget and sources                   |
  | `/compact`          | Compact a long conversation                           |
  | `/new`              | Create a session in the current project               |
  | `/init`             | Analyze the project and create or update instructions |
  | `/update`           | Update MCode                                          |
  | `/quit`             | Exit MCode                                            |

  <CardGroup cols={2}>
    <Card title="Features" icon="terminal" href="/docs/cli/features">
      Explore the interactive TUI, Headless mode, ACP, providers, skills, MCP, and
      plugins.
    </Card>

    <Card title="FAQ" icon="circle-help" href="/docs/cli/faq">
      Troubleshoot installation, sign-in, PATH, terminal compatibility, and
      automation output.
    </Card>
  </CardGroup>
</div>
