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

# Mihu CLI

> Manage your Mihu workspace from the terminal, in CI, and from your AI-powered IDE

The Mihu CLI is the official command-line interface for Mihu. Every endpoint of the API is available as a command, so you can build agents, buy numbers, place calls, read conversations and run campaigns without leaving your terminal.

In this guide you will:

* Install and authenticate the CLI
* Run your first commands
* Manage several workspaces
* Connect your AI IDE to Mihu through MCP

## Installation

<Tabs>
  <Tab title="macOS / Linux">
    ```bash theme={null}
    curl -sSL https://mihu.ai/install.sh | bash
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    irm https://mihu.ai/install.ps1 | iex
    ```
  </Tab>
</Tabs>

The installer downloads a single binary for your platform, verifies its checksum and puts it on your PATH. No runtime is required. Verify with `mihu version`. If your shell already has an alias named `mihu`, the alias wins; rename it or run `command mihu`.

## Quick start

<Steps>
  <Step title="Authenticate">
    ```bash theme={null}
    mihu login
    ```

    The CLI asks for your workspace subdomain (the `abc` in `abc.mihu.ai`), opens the API token page of your dashboard, and stores the token you paste. See [Authentication](/authentication) for how tokens work.
  </Step>

  <Step title="Look around">
    ```bash theme={null}
    mihu whoami          # workspace, balance and where the credentials came from
    mihu agents list
    mihu numbers list
    ```
  </Step>

  <Step title="Place your first call">
    ```bash theme={null}
    mihu calls start +14155550123 --agent <agent-uuid> --greeting "Hi, this is a test call from Mihu"
    ```

    The response includes the call id, the conversation id and a live listen URL.
  </Step>
</Steps>

## Key features

### Every endpoint, one command tree

Commands mirror the API. Path segments become groups, path parameters become arguments and the HTTP method becomes the verb:

```bash theme={null}
mihu agents webhooks list <agent-uuid>     # GET  /agents/{uuid}/webhooks
mihu campaigns publish <campaign-uuid>     # POST /campaigns/{uuid}/publish
mihu transcriptions transcript <uuid>      # GET  /transcriptions/{uuid}/transcript
mihu commands                              # print all commands
```

### Interactive create and update

Run a `create` or `update` command without arguments and the CLI walks you through every field with its description, validates enums and shows the request before sending it:

```bash theme={null}
mihu agents create
# [1/28] name * (string)
#   Required. Internal label for this agent
#   > Support Bot
# [2/28] description (string)
#   > ...
```

Or pass fields as flags, since every body field is a typed flag:

```bash theme={null}
mihu agents create --name "Support Bot" --language en --tone "Short and friendly"
mihu contacts update <uuid> --email ada@example.com
```

### Scripting and CI

Output is a table on a terminal and JSON when piped, so the CLI composes with `jq`:

```bash theme={null}
mihu calls list --all -o json | jq '.[] | select(.status == "ended") | .uuid'
```

In CI, skip `mihu login` and set two environment variables:

```bash theme={null}
export MIHU_API_TOKEN=your-api-token
export MIHU_TENANT=abc
mihu agents list
```

### Several workspaces

```bash theme={null}
mihu login --name production
mihu login --name staging
mihu -p staging agents list
mihu config use production
```

### MCP for your IDE

Give Claude Code, Cursor, VS Code, Windsurf or Claude Desktop full knowledge of your workspace in one command:

```bash theme={null}
mihu mcp setup cursor
```

See [CLI and MCP](/cli/mcp).

### Any endpoint

For endpoints without a dedicated command, or when you want the raw response:

```bash theme={null}
mihu api /workspace
mihu api /agents/<uuid> -X PATCH -f name="New name"
```

## Common commands

<AccordionGroup>
  <Accordion title="Agents" icon="robot">
    ```bash theme={null}
    mihu agents list
    mihu agents get <uuid>
    mihu agents create --name "Sales" --language en
    mihu agents update <uuid> --tone "Formal"
    mihu agents from-website https://example.com
    mihu agents voice <uuid>
    mihu agents webhooks create <uuid> --url https://example.com/hook
    ```
  </Accordion>

  <Accordion title="Phone numbers" icon="phone">
    ```bash theme={null}
    mihu numbers list
    mihu numbers search US --type local --area-code 415
    mihu numbers buy -f number=+14155550123 -f country_code=US -f type=local
    mihu agents channels call provision <agent-uuid> --phone-number-uuid <number-uuid>
    mihu numbers release <number-uuid>
    ```
  </Accordion>

  <Accordion title="Calls" icon="phone-volume">
    ```bash theme={null}
    mihu calls start +14155550123 --agent <uuid> --prompt "Confirm tomorrow's appointment"
    mihu calls list --status ended
    mihu calls get <call-uuid>
    mihu calls say <call-uuid> "One moment please"
    mihu calls hangup <call-uuid>
    ```
  </Accordion>

  <Accordion title="Conversations and contacts" icon="comments">
    ```bash theme={null}
    mihu conversations list --channel whatsapp --status open
    mihu conversations messages <uuid>
    mihu conversations reply <uuid> "Thanks, we will call you back"
    mihu contacts list --search ada
    mihu contacts create --name "Ada" --phone-number +441234567890
    ```
  </Accordion>

  <Accordion title="Campaigns and tasks" icon="bullhorn">
    ```bash theme={null}
    mihu campaigns list
    mihu campaigns publish <uuid>
    mihu tasks list --status pending
    mihu tasks list --type make_call --executor ai
    ```
  </Accordion>

  <Accordion title="Quality" icon="clipboard-check">
    ```bash theme={null}
    mihu transcriptions create --voice-file call.mp3 --possible-language en
    mihu transcriptions transcript <uuid>
    mihu evaluations list
    mihu qa-agents list
    mihu coaching-agents list
    ```
  </Accordion>
</AccordionGroup>

## Configuration

Settings live in `~/.config/mihu/config.json`, credentials in `~/.config/mihu/credentials.json` (mode 0600). On Windows both are under `%AppData%\mihu`.

```bash theme={null}
mihu config path                       # print the directory
mihu config list                       # saved profiles
mihu config set output json            # default output format
mihu config set disable_update_check true
```

Environment variables override everything: `MIHU_API_TOKEN`, `MIHU_TENANT`, `MIHU_BASE_URL`, `MIHU_PROFILE`, `MIHU_CONFIG_DIR`.

## Updates

The CLI checks for a new version once a day and prints a one-line hint. Update with:

```bash theme={null}
mihu update --check
mihu update
```

## Uninstall

```bash theme={null}
mihu uninstall            # removes the binary, keeps your settings
mihu uninstall --purge    # also deletes ~/.config/mihu with saved credentials
```

## Next steps

<CardGroup cols={2}>
  <Card title="CLI and MCP" icon="plug" href="/cli/mcp">
    Connect Claude Code, Cursor, VS Code and Windsurf
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Every endpoint the CLI wraps
  </Card>
</CardGroup>
