> ## Documentation Index
> Fetch the complete documentation index at: https://developers.meshapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the Mesh CLI

> Install the Mesh CLI on macOS, Linux, or Windows and sign in with your API key.

The Mesh CLI (`meshapi`) is a terminal app that lets you chat with any model,
switch between 1000+ models, and have it write and run code for you — all from
your Terminal or PowerShell.

It installs with [pipx](https://pipx.pypa.io), which needs Python. The steps
below install Python, pipx, and the CLI from scratch. Pick your OS.

<Note>
  The whole install is three tools: **Python** → **pipx** → **meshapi-code**.
  After the one-time setup, updating is a single command — see
  [Using the CLI → Staying up to date](/docs/cli/commands#staying-up-to-date).
</Note>

<Tabs>
  <Tab title="macOS">
    ### 1. Install Python

    1. Open Safari (or any browser) and go to [python.org/downloads](https://python.org/downloads).
    2. Click the yellow **Download Python 3.x** button (any recent 3.x is fine).
    3. Open the downloaded file — named like `python-3.14.6-macos11.pkg`.
    4. Click **Continue → Continue → Continue → Agree → Install**, enter your Mac login password, then **Install Software**.
    5. Wait for *"The installation was successful"* and click **Close**.

    ### 2. Check Python

    1. Press **⌘ + Space**, type `Terminal`, press **Enter**.
    2. Run:

    ```bash theme={null}
    python3 --version
    ```

    You should see `Python 3.` followed by numbers. ✅

    ### 3. Install pipx

    ```bash theme={null}
    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
    ```

    The second command prints something like `Success! Added /Users/you/.local/bin to the PATH`.

    <Warning>
      Now **quit Terminal completely** (**⌘ + Q**) and open a fresh window
      (**⌘ + Space → Terminal**). The next command only works in a new window that
      has picked up the updated PATH.
    </Warning>

    ### 4. Install the Mesh CLI

    ```bash theme={null}
    pipx install meshapi-code
    ```

    When you see `done!` and `installed package meshapi-code`, the CLI is ready. ✅

    ```
    done! ✨ 🌟 ✨
      installed package meshapi-code 0.5.2
      These apps are now available
        - meshapi
    ```
  </Tab>

  <Tab title="Windows">
    ### 1. Install Python

    1. Open Microsoft Edge (or any browser) and go to [python.org/downloads/windows](https://python.org/downloads/windows).
    2. Click **"Latest Python 3 Release - Python 3.x"** at the top of the list.
    3. Scroll to the **Files** table and click **"Windows installer (64-bit)"**. The file downloads.
    4. Open the downloaded file — named like `python-3.14.6-amd64.exe`.

    <Warning>
      **The most important step:** on the first installer screen, tick
      **"Add python.exe to PATH"** at the bottom — do this *before* clicking anything
      else. If you skip it, the CLI won't be found later.
    </Warning>

    5. Click **Install Now**, click **Yes** if Windows asks for permission, wait for *"Setup was successful"*, then **Close**.

    ### 2. Check Python

    1. Click **Start**, type `PowerShell`, press **Enter**.
    2. Run:

    ```powershell theme={null}
    py --version
    ```

    You should see `Python 3.` followed by numbers. ✅ If you get an error, redo
    Step 1 and make sure the **PATH** checkbox was ticked.

    ### 3. Install pipx

    ```powershell theme={null}
    py -m pip install --user pipx
    py -m pipx ensurepath
    ```

    The second command prints something like `Success! Added C:\Users\you\.local\bin to the PATH`.

    <Warning>
      Now **close the PowerShell window** (click the X) and open a fresh one
      (**Start → PowerShell**). The next command only works in a new window that has
      picked up the updated PATH.
    </Warning>

    ### 4. Install the Mesh CLI

    ```powershell theme={null}
    pipx install meshapi-code
    ```

    When you see `done!` and `installed package meshapi-code`, the CLI is ready. ✅
  </Tab>
</Tabs>

## Next step

The CLI is installed. Head to [Using the Mesh CLI](/docs/cli/usage) to add your API
key and send your first prompt.

<Note>
  Hit a snag during install? See [Mesh CLI debugging](/debug/mesh-cli).
</Note>
