CLI 树
ChatWord 使用共享的 chatstyle.add_tree_option() 从真实注册的 Click command surface 生成命令树:
chatword --tree显示参数签名,适合接口审查。chatword --tree-brief保留同一组节点和说明,但省略参数签名。
规划能力不会显示成可调用接口。
完整命令树
chatword
├── --help # Show this message and exit.
├── --version # Show the version and exit.
├── --tree # Print the registered CLI tree and exit.
├── --tree-brief # Print the registered CLI tree without parameter signatures and exit.
├── extract [PATH] [--output OUTPUT] [--force] [--interactive] # Extract plain text from a supported document.
└── inspect [PATH] [--json] [--interactive] # Inspect a Word or PDF file before deeper processing.
简洁命令树
chatword
├── --help # Show this message and exit.
├── --version # Show the version and exit.
├── --tree # Print the registered CLI tree and exit.
├── --tree-brief # Print the registered CLI tree without parameter signatures and exit.
├── extract # Extract plain text from a supported document.
└── inspect # Inspect a Word or PDF file before deeper processing.
命令边界
| 命令 | 必需输入 | 输出 | 副作用 | 边界 |
|---|---|---|---|---|
chatword inspect PATH |
本地文档路径 | 文本或 --json 元数据 |
只读本地文件 | 不读取或输出凭据;未知类型只报告元数据 |
chatword extract PATH |
本地 .docx 或 .pdf 路径 |
stdout 或 --output 文件 |
读取文档;指定输出时写本地文件 | 默认拒绝覆盖;--force 只允许覆盖输出文件,始终拒绝覆盖输入 |
输入契约
PATH视为可恢复的缺失参数:有 TTY 时可通过-i补问。-I禁止交互,适合 Agent、CI 和 shell automation。inspect --json是当前机器可读输出;extract的机器接口是 stdout 或显式文件。
更新规则
- 不实现包内树渲染器;完整树和简洁树都由 ChatStyle 从真实 Click 注册树生成。
- 新增或删除命令时,同时更新 CLI help/tree 测试、本页 runtime readback、能力地图和 README 命令摘要。