docs: add --output-format to diagnostic verb help text

Updated LocalHelpTopic help strings to surface --output-format support:
- Status, Sandbox, Doctor, Acp all now show [--output-format <format>]
- Added 'Formats: text (default), json' line to each

Diagnostic verbs support JSON output but help text didn't advertise it.
Post-#127 fix: help text now matches actual CLI surface.

Verified: cargo build passes, claw doctor --help shows output-format.

Refs: #127
This commit is contained in:
YeonGyu-Kim 2026-04-20 21:32:02 +09:00
parent a51b2105ed
commit 50e3fa3a83

View File

@ -5240,28 +5240,32 @@ fn sandbox_json_value(status: &runtime::SandboxStatus) -> serde_json::Value {
fn render_help_topic(topic: LocalHelpTopic) -> String { fn render_help_topic(topic: LocalHelpTopic) -> String {
match topic { match topic {
LocalHelpTopic::Status => "Status LocalHelpTopic::Status => "Status
Usage claw status Usage claw status [--output-format <format>]
Purpose show the local workspace snapshot without entering the REPL Purpose show the local workspace snapshot without entering the REPL
Output model, permissions, git state, config files, and sandbox status Output model, permissions, git state, config files, and sandbox status
Formats text (default), json
Related /status · claw --resume latest /status" Related /status · claw --resume latest /status"
.to_string(), .to_string(),
LocalHelpTopic::Sandbox => "Sandbox LocalHelpTopic::Sandbox => "Sandbox
Usage claw sandbox Usage claw sandbox [--output-format <format>]
Purpose inspect the resolved sandbox and isolation state for the current directory Purpose inspect the resolved sandbox and isolation state for the current directory
Output namespace, network, filesystem, and fallback details Output namespace, network, filesystem, and fallback details
Formats text (default), json
Related /sandbox · claw status" Related /sandbox · claw status"
.to_string(), .to_string(),
LocalHelpTopic::Doctor => "Doctor LocalHelpTopic::Doctor => "Doctor
Usage claw doctor Usage claw doctor [--output-format <format>]
Purpose diagnose local auth, config, workspace, sandbox, and build metadata Purpose diagnose local auth, config, workspace, sandbox, and build metadata
Output local-only health report; no provider request or session resume required Output local-only health report; no provider request or session resume required
Formats text (default), json
Related /doctor · claw --resume latest /doctor" Related /doctor · claw --resume latest /doctor"
.to_string(), .to_string(),
LocalHelpTopic::Acp => "ACP / Zed LocalHelpTopic::Acp => "ACP / Zed
Usage claw acp [serve] Usage claw acp [serve] [--output-format <format>]
Aliases claw --acp · claw -acp Aliases claw --acp · claw -acp
Purpose explain the current editor-facing ACP/Zed launch contract without starting the runtime Purpose explain the current editor-facing ACP/Zed launch contract without starting the runtime
Status discoverability only; `serve` is a status alias and does not launch a daemon yet Status discoverability only; `serve` is a status alias and does not launch a daemon yet
Formats text (default), json
Related ROADMAP #64a (discoverability) · ROADMAP #76 (real ACP support) · claw --help" Related ROADMAP #64a (discoverability) · ROADMAP #76 (real ACP support) · claw --help"
.to_string(), .to_string(),
} }