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

# tm doctor

> Diagnose configuration and credentials.

## What This Checks

`tm doctor` is a broad local diagnosis command. It inspects configuration and credential readiness across the CLI, but it does not prove that a live API call will succeed.

Use [`tm auth whoami`](/cli/reference/auth/whoami) for a live Control Plane auth check and [`tm infer chat`](/cli/reference/infer/chat) for an end-to-end inference check.

## Usage

```sh theme={null}
tm doctor [OPTIONS]
```

## Examples

### Check the current CLI configuration and credential state.

```sh theme={null}
tm doctor
```

### Use shell-friendly exit codes when required credentials are missing.

```sh theme={null}
tm doctor --exit-status
```

## Options

| Name            | Type      | Required | Default | Details                                                           |
| --------------- | --------- | -------- | ------- | ----------------------------------------------------------------- |
| `--exit-status` | `boolean` | no       | `false` | Exit non-zero when checks report a not-ready state. Boolean flag. |

## Inherited Global Options

| Name                  | Type           | Required | Default                              | Details                                                                                                                      |          |    |          |                                                                   |
| --------------------- | -------------- | -------- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | -------- | -- | -------- | ----------------------------------------------------------------- |
| `--version`, `-V`     | `boolean`      | no       | `false`                              | Show the version and exit. Boolean flag.                                                                                     |          |    |          |                                                                   |
| `--config`            | `path`         | no       | `"~/.config/tensormesh/config.toml"` | Path to config TOML file                                                                                                     |          |    |          |                                                                   |
| `--output`            | \`choice\[text | json     | yaml                                 | raw                                                                                                                          | table]\` | no | `"text"` | Output format (text is human-readable; json is machine-friendly). |
| `--quiet`             | `boolean`      | no       | `false`                              | Suppress non-essential output. Boolean flag.                                                                                 |          |    |          |                                                                   |
| `--debug`             | `boolean`      | no       | `false`                              | Print debug logs to stderr (secrets redacted). Boolean flag.                                                                 |          |    |          |                                                                   |
| `--ca-bundle`         | `path`         | no       |                                      | Path to a PEM CA bundle for TLS verification (overrides TENSORMESH\_CA\_BUNDLE).                                             |          |    |          |                                                                   |
| `--timeout`           | `float`        | no       |                                      | Default HTTP timeout in seconds (overrides TENSORMESH\_TIMEOUT\_SECONDS; subcommands may override).                          |          |    |          |                                                                   |
| `--max-retries`       | `integer`      | no       |                                      | Max retries for idempotent HTTP requests on transient errors (overrides TENSORMESH\_MAX\_RETRIES; subcommands may override). |          |    |          |                                                                   |
| `--controlplane-base` | `text`         | no       |                                      | Override the Control Plane base URL.                                                                                         |          |    |          |                                                                   |

## Caveats

* Reports local readiness only. Use `tm auth whoami` to live-validate Control Plane auth and `tm infer chat` for an end-to-end inference check.
* Use `tm infer doctor` for direct gateway gating and `tm auth status`/`tm auth whoami` for Control Plane-specific checks.

## Related Commands

* [`tm config show`](/cli/reference/config/show)
* [`tm auth whoami`](/cli/reference/auth/whoami)
* [`tm infer doctor`](/cli/reference/infer/doctor)
* [`tm infer chat`](/cli/reference/infer/chat)

## Parent Command

* [`tm`](/cli/reference)
