> ## 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 auth

> Authenticate to the Tensormesh Control Plane.

## Usage

```sh theme={null}
tm auth [OPTIONS] COMMAND [ARGS]...
```

## Examples

### Start the Control Plane login flow.

```sh theme={null}
tm auth login
```

### Inspect the local Control Plane and Gateway auth state.

```sh theme={null}
tm auth status
```

### Confirm the current authenticated Control Plane identity.

```sh theme={null}
tm auth whoami
```

## Subcommands

* [`tm auth login`](/cli/reference/auth/login): Login via browser and store Control Plane tokens.
* [`tm auth logout`](/cli/reference/auth/logout): Delete the local Control Plane token file.
* [`tm auth print-token`](/cli/reference/auth/print-token): Print the Control Plane access token to stdout (for scripting).
* [`tm auth refresh`](/cli/reference/auth/refresh): Refresh stored Control Plane tokens.
* [`tm auth status`](/cli/reference/auth/status): Show local Control Plane and Gateway auth status.
* [`tm auth whoami`](/cli/reference/auth/whoami): Show the authenticated Control Plane user profile.

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

## Parent Command

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