> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://platform.bctrl.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://platform.bctrl.ai/_mcp/server.

# Auth Commands

> Log in, inspect auth state, print tokens, and log out.

Log in, inspect auth state, print tokens, and log out.

Output formatting flags (`--json`, `--jq`, and `--template`) are documented once in [Output Formatting](/cli/output) and are omitted from the tables below.

## `bctrl auth login`

Authenticate with BCTRL

```bash
bctrl auth login [flags]
```

| Flag                  | Description                                                                  |
| --------------------- | ---------------------------------------------------------------------------- |
| `--with-token`        | Read an API key from standard input instead of using the browser device flow |
| `--token-file <path>` | Read an API key from a file instead of using the browser device flow         |
| `--url`               | Start a browser authorization, print the URL, and exit                       |
| `--wait`              | Poll until the browser authorization is approved                             |

## `bctrl auth logout`

Remove stored BCTRL credentials

```bash
bctrl auth logout
```

## `bctrl auth status`

Show BCTRL authentication status

```bash
bctrl auth status
```

## `bctrl auth token`

Print the active BCTRL API key

```bash
bctrl auth token [flags]
```

| Flag       | Description                              |
| ---------- | ---------------------------------------- |
| `--reveal` | Allow printing the API key to a terminal |