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

# Commands & permission modes

## Permission modes

The colored bar at the bottom of the screen always shows the current permission
mode. Press **Shift+Tab** to cycle through the four modes:

| Mode                      | Color  | Behavior                                                                     |
| ------------------------- | ------ | ---------------------------------------------------------------------------- |
| **default**               | green  | Asks before every file write, command, or search. Safest — start here.       |
| **accept edits on**       | cyan   | File writes in your current folder happen automatically; commands still ask. |
| **auto**                  | yellow | File writes, commands, and web searches all run automatically.               |
| **bypass permissions on** | red    | Everything runs automatically.                                               |

Even in **bypass permissions** mode, genuinely dangerous actions — `rm -rf`,
`sudo`, or writing to `~/.ssh` — still stop and ask for confirmation.

## Commands you'll actually use

Slash commands work from the prompt inside the CLI:

| Command         | What it does                                                                       |
| --------------- | ---------------------------------------------------------------------------------- |
| `/help`         | Lists every command, explained.                                                    |
| `/model <name>` | Switch model, with fuzzy suggestions as you type.                                  |
| `/models`       | Browse the full model catalog with prices.                                         |
| `/route auto`   | Let Mesh pick the best model for each prompt automatically.                        |
| `/memory`       | Shows what the CLI remembers about this project — it learns your repo as it works. |
| `/cost`         | Total spend for the current session.                                               |
| `/update`       | Check for a newer version (the CLI also offers upgrades on its own).               |
| `/login`        | Re-enter your API key (use this if you pasted a wrong key).                        |
| `/exit`         | Leave the CLI. Next time, just run `meshapi` again.                                |

## Staying up to date

New versions add models, fix bugs, and expand what the CLI can do. You don't
reinstall — you update.

**Easiest:** the CLI checks for new versions itself. When it offers one, press
`y`. To check any time while it's running, type `/update`.

**Manual:** quit the CLI with `/exit`, then run this (same on Mac and Windows):

```bash
pipx upgrade meshapi-code
```

Confirm it worked:

```bash
meshapi --version
```

Check that the number went up. If it still shows the old version, close the
window, open a new one, and check again.

Running into errors? See [Mesh CLI debugging](/debug/mesh-cli).