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

# tp login

> 登录、登出与账号状态

## tp login

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp login --server https://<你的 TunePlane 域名>   # 首次指定，之后记住
tp login                                    # 浏览器授权（默认）
tp login --device-flow                      # 设备码登录（SSH / 无浏览器）
tp login --token <TOKEN>                    # 非交互（CI）
```

| 选项              | 说明                                                 |
| --------------- | -------------------------------------------------- |
| `-s, --server`  | TunePlane 服务地址；省略则用上次记住的 / `TUNEPLANE_SERVER` 环境变量 |
| `--token`       | 直接用服务令牌登录，跳过浏览器（CI 用）                              |
| `--device-flow` | 强制设备码流程                                            |
| `--no-browser`  | 等同 `--device-flow`                                 |

登录态写入 `~/.tuneplane/`（权限 0600）。浏览器流程走 OAuth + PKCE；平台配置 OIDC（如 Casdoor）时自动跳转单点登录。

<Frame caption="控制台登录页。`tp login` 打开浏览器时也是这一页。">
  <img src="https://mintcdn.com/starforge/GatXR2rI5-_Vm4_H/images/console/login.png?fit=max&auto=format&n=GatXR2rI5-_Vm4_H&q=85&s=2306521111801b18e089d0ddd58a6667" alt="TunePlane 控制台登录" width="2160" height="1350" data-path="images/console/login.png" />
</Frame>

## tp logout

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp logout
```

吊销 refresh token 并清除本地登录态。

## tp status

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp status
```

输出：当前账号与角色、配额（并发卡 / 作业 / 每日 GPU-时）、当前用量、可用硬件 profile、活跃作业列表。提交前看一眼水位是好习惯。

## `tp login`

Log in to TunePlane

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp login [options]
```

| 选项               | 说明                                                                                                  |
| ---------------- | --------------------------------------------------------------------------------------------------- |
| `--server`, `-s` | TunePlane server address (default [https://tuneplane.gcoreinc.com](https://tuneplane.gcoreinc.com)) |
| `--token`        | Non-interactive login: use a service token (for CI)                                                 |
| `--device-flow`  | Force the device-code login (SSH / no browser)                                                      |
| `--no-browser`   | Do not open a browser (same as --device-flow)                                                       |
