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

# Monitoring and usage

> Measure latency, view character usage, and uninstall the Rime CLI.

## `rime speedtest`

Measure time-to-first-byte (TTFB) for configured environments. The command sends a TTS request to each endpoint and reports the latency.

```bash theme={null}
rime speedtest
```

### Flags

| Flag        | Short | Default              | Description                                                                               |
| ----------- | ----- | -------------------- | ----------------------------------------------------------------------------------------- |
| `--model`   | `-m`  | `coda`               | Model ID for the test request                                                             |
| `--speaker` | `-s`  | `astra`              | Speaker for the test request                                                              |
| `--lang`    | `-l`  | `eng`                | Language code for the test request                                                        |
| `--text`    | --    | `running speedtest.` | Text to synthesize                                                                        |
| `--runs`    | --    | `1`                  | Number of requests per endpoint; reports mean/min/max when greater than 1                 |
| `--timeout` | --    | `10s`                | Per-request timeout (`0` disables timeout)                                                |
| `--url`     | --    | --                   | Additional URL to test (repeatable). Forwards your configured API credentials to that URL |
| `--env`     | --    | --                   | Only test these named environments from config (repeatable)                               |
| `--yes`     | `-y`  | `false`              | Automatically switch the default environment if a faster one is found                     |

<Warning>`--url` forwards your configured API credentials to every supplied URL. Use it only with endpoints you trust. The CLI also prints this warning at runtime.</Warning>

### Behavior

* No flags: tests all configured environments
* `--url` alone: tests only the specified URLs and skips the config environments
* `--env` + `--url`: tests both the named envs and the extra URLs
* After the test completes, if the fastest environment differs from the current default, the CLI prompts you to switch. Use `--yes` to skip the prompt and switch automatically.

### Example output (single run)

```
ENV             URL                                                TTFB
--------------------------------------------------------------------------------
users           https://users.rime.ai/v1/rime-tts                 245.12ms
users-east      https://users-east.rime.ai/v1/rime-tts            189.40ms

Fastest: users-east (189.40ms)
Switch default to "users-east"? [y/N]:
```

### Example output (`--runs 3`)

```
ENV             URL                                                TTFB (3 runs)
--------------------------------------------------------------------------------
users           https://users.rime.ai/v1/rime-tts                 mean=245.12ms  min=221.30ms  max=271.50ms
users-east      https://users-east.rime.ai/v1/rime-tts            mean=189.40ms  min=175.10ms  max=203.80ms

Fastest: users-east (189.40ms)
Switch default to "users-east"? [y/N]:
```

When `--runs` is greater than 1, the JSON output includes `ttfb_min_ms` and `ttfb_max_ms` fields in addition to `ttfb_ms` (mean).

***

## `rime usage`

Display daily character usage per model, Coda included. The table has one column for each model with usage in the window plus a Total column. Cloud and on-prem usage are summed per day, and a footer shows the split when both appear. Days are UTC. Per-model history begins 2026-04-01, so earlier days show 0.

```bash theme={null}
rime usage
```

### Flags

| Flag     | Default | Description                                                                                |
| -------- | ------- | ------------------------------------------------------------------------------------------ |
| `--days` | `7`     | Days of history to show, ending today (1 to 90)                                            |
| `--from` |         | Start date as `YYYY-MM-DD`, inclusive. On its own, the range runs through today            |
| `--to`   |         | End date as `YYYY-MM-DD`, inclusive. On its own, the range is `--days` ending on this date |
| `--env`  |         | Count only one environment: `cloud` or `onprem`                                            |
| `--csv`  | `false` | Output one row per day, environment, and model                                             |

A range cannot exceed 90 days. The global `--json` flag prints the per-day records unchanged: each day carries a `breakdown` list of `{model, environment, charCount}` entries, and a day with no usage has an empty list.

### Example output

```
       Day   mistv3     coda    Total
----------  -------  -------  -------
2026-05-18   12,400   31,250   43,650
2026-05-19        0   28,900   28,900

Cloud 70,100  On-prem 2,450  (use --env to filter)
```

The same two days as CSV:

```
day,environment,model,chars
2026-05-18,cloud,mistv3,12400
2026-05-18,cloud,coda,30000
2026-05-18,onprem,coda,1250
2026-05-19,cloud,coda,27700
2026-05-19,onprem,coda,1200
```

***

## `rime uninstall`

Remove the Rime CLI binary, configuration, and shell PATH entries. The command detects whether you installed the CLI via Homebrew or the shell script and prints instructions for that install method.

```bash theme={null}
rime uninstall
```

### Flags

| Flag    | Short | Default | Description                  |
| ------- | ----- | ------- | ---------------------------- |
| `--yes` | `-y`  | `false` | Skip the confirmation prompt |

<Note>If installed via Homebrew, the command prints `brew uninstall rime-cli` instead of performing removal directly.</Note>
