# shb-cli config

查看当前 profile 的配置与认证状态。

## 命令

```bash
# 查看默认 profile
shb-cli config

# 查看指定 profile
shb-cli --profile <name> config
```

> 不存在 `config init`、`config show`、`config use-profile` 子命令。

## 响应

```json
{
  "config_path": "/Users/xxx/.config/shb-cli/config.json",
  "environment": "dingtalk",
  "user_id": "u123",
  "tenant_id": "t456",
  "tenant_name": "我的企业",
  "display_name": "张三",
  "language": "zh",
  "authenticated": true,
  "valid": true
}
```

| 字段 | 说明 |
|------|------|
| `authenticated` | 本地是否持有 token |
| `valid` | token 是否通过后端校验（仅 `authenticated: true` 时出现） |
| `validation_error` | 校验失败时的错误信息 |

## 域名规则

- `build_env=prod`：`dingtalk` → `shb3144.eapps.dingtalkcloud.com`；其余 → `cloud.shb.ltd`
- `build_env=test`：所有端统一 → `pubapp.shb.ltd`

## --profile 全局 flag

`--profile` 作用于所有命令，用于切换操作的 profile：

```bash
shb-cli --profile work config
shb-cli --profile work auth login --env standalone
```
