> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.meshapi.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.meshapi.ai/_mcp/server.

# Install the Mesh CLI

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.

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](/cli/commands#staying-up-to-date).

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

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

### 3. Install pipx

```bash
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`.

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.

### 4. Install the Mesh CLI

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

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

**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.

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

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.

### 4. Install the Mesh CLI

```powershell
pipx install meshapi-code
```

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

## Next step

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

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