cnb-rs info config
cnb-rs info config [--json]CLI 自身配置(运行时生效值)。回答「为什么 cnb-rs 用了这个 endpoint / 这个 repo」。
输出分区
CLI:
Version—cnb-rs --version同源(编译时注入)Domain— 优先级:CLI--domain→ git remote → 默认cnb.coolActive Repo— 当前生效的{owner/group}/{repo}(--repoflag 或 git remote 解析)
GIT:
Remote URL— 从GitInfo重组的远程 URLParsed Repo— 从 remote URL 解析出的 repo 路径Current Branch— 本地 gitHEAD所在分支(非 git 仓库时显示-)
CONFIG FILE:
Path—~/.cnb/config.toml绝对路径Loaded— 文件存在且解析成功为yes(绿),否则no(灰)
与 config list 的区别
| 维度 | info config | config list |
|---|---|---|
| 范围 | 仅运行时生效的关键值(最常诊断的 7 项) | 配置文件全部 KV + 默认值 |
| 风格 | 3 分区卡片 + 状态颜色 | KV 完整列表 |
| 适用 | 「我现在用的是哪个 endpoint / repo / token」一屏排查 | 完整审计 / 文档化配置 |
选项
--json:JSON 输出(含config_loaded布尔值)
示例
bash
# 默认输出
cnb-rs info config
# 排查仓库解析问题
cnb-rs info config | grep -E "Domain|Repo|Remote"
# JSON 模式
cnb-rs info config --json | jq '{version, domain, repo, config_loaded}'另请参阅
- cnb-rs info — info 子组首页
- cnb-rs config list — 完整配置 KV
- cnb-rs config get / set — 修改单项配置