
# tdx doctor

Check connection, auth, catalogue and backend information.

**Reads**

Read-only health, bearer login and gateway release identity checks. Catalogue version and backend details are explicitly unavailable: no authoritative version is exposed, and no provider/backend probes are made. Schema/config revisions are not catalogue versions. Uses auth status host-bound bearer rules. Once connection inputs resolve, the independent check report remains on stdout; exits 1 if connection or login fails, otherwise 0. Gateway-version unavailability alone is not fatal; inspect ok/available and error fields. Gateway version is release environment and optional commit, not a package version. --dry-run remains read-only and performs the same reads. The login section is masked with the full output-mask policy together with the whole gateway reply and request before selection/jq; █ marks masked values. Checked booleans, values the CLI sets itself and its source field (where present) print unmasked; source is only checked to exclude the token. A login reply that cannot be masked within the fixed limits reports login error OUTPUT_MASK_LIMIT and no values.

```bash
# GET /healthz
# GET /control/v1/me
# GET /version
tdx doctor [flags]
```

**Output fields** (inside `data`)

| Field | Type | Description |
|---|---|---|
| `connection` | connection-check | Validated health result or safe error code. |
| `login` | login-check | Projected bearer identity and permissions or safe error code. |
| `gatewayVersion` | release-identity | Validated release environment and optional commit, or unavailable. |
| `catalogueVersion` | unavailable-version | Explicitly unavailable; never substitutes schema/config revisions. |
| `backend` | unavailable-check | Explicitly unavailable; no backend probes. |
| `source` | bearer-source | Canonical origin, profile label and resolution sources; never the credential. |

Every command also takes the [global flags](/cli/reference#global-flags) and reads the [environment variables](/cli/reference#environment-variables) that the command reference lists once.
