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

# Pi

> Use the latest MiniMax M-series models in Pi, an open-source terminal coding agent.

<div style={{background:"#fffbeb",borderLeft:"4px solid #d97706",padding:"12px 16px",borderRadius:"6px",margin:"16px 0"}}>[**Pi**](https://github.com/earendil-works/pi) is an open-source TUI coding agent from earendil-works that talks to any provider through a unified LLM API.</div>

## Configure MiniMax

<Tabs sync={false}>
  <Tab title="Option 1: One-click setup wizard">
    Automatic Pi installation requires Node.js 22.19 or newer. Run:

    ```bash theme={null}
    npx -y mmx-cli@latest agent setup
    ```

    Select **Pi**. If it is missing, keep Pi selected in the second multi-select. The wizard installs the official npm package, verifies its version, and adds MiniMax M3 to Pi's models and defaults.

    Then launch Pi directly:

    ```bash theme={null}
    pi
    ```

    See [One-click setup wizard](/docs/token-plan/agent-setup) for command options and backup behavior.
  </Tab>

  <Tab title="Option 2: Manual setup">
    <Steps>
      <Step title="Install Pi">
        ```bash theme={null}
        npm install -g @earendil-works/pi-coding-agent
        ```
      </Step>

      <Step title="Set env var and launch">
        Export your [Subscription Key](https://platform.minimax.io/user-center/payment/token-plan) (prefix `sk-cp-…`) and launch Pi:

        ```bash theme={null}
        export MINIMAX_API_KEY=sk-cp-...
        pi --provider minimax --model MiniMax-M3
        ```
      </Step>
    </Steps>
  </Tab>
</Tabs>
