Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
docs(cli): render --format help as terse inline possible-values (#3108)
Maximilian Roos41d5ef7349e1
diff --git a/docs/content/config.md b/docs/content/config.mdindex 03362775f..4fa158892 100644--- a/docs/content/config.md+++ b/docs/content/config.md@@ -631,11 +631,8 @@ Usage: <b><span class=c>wt config show</span></b> <span class=c>[OPTIONS]</span><b><span class=c>--format</span></b><span class=c> <FORMAT></span>Output format (text, json)- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>diff --git a/docs/content/merge.md b/docs/content/merge.mdindex 28e4983e6..3382a0f4a 100644--- a/docs/content/merge.md+++ b/docs/content/merge.md@@ -144,11 +144,8 @@ Usage: <b><span class=c>wt merge</span></b> <span class=c>[OPTIONS]</span> <spanJSON prints structured result to stdout after merge completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>diff --git a/docs/content/remove.md b/docs/content/remove.mdindex 2d7e4a30e..3d1d0bf94 100644--- a/docs/content/remove.md+++ b/docs/content/remove.md@@ -127,11 +127,8 @@ Usage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <spaJSON prints structured result to stdout after removal completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>diff --git a/docs/content/step.md b/docs/content/step.mdindex 3b9b8569b..9daca6e97 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -161,11 +161,8 @@ Usage: <b><span class=c>wt step commit</span></b> <span class=c>[OPTIONS]</span>JSON prints structured result to stdout after the commit completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>@@ -256,11 +253,8 @@ Usage: <b><span class=c>wt step squash</span></b> <span class=c>[OPTIONS]</span>JSON prints structured result to stdout after the squash completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>@@ -481,11 +475,8 @@ Usage: <b><span class=c>wt step copy-ignored</span></b> <span class=c>[OPTIONS]<JSON prints structured result to stdout after the copy completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>@@ -645,11 +636,8 @@ Usage: <b><span class=c>wt step for-each</span></b> <span class=c>[OPTIONS]</spa<b><span class=c>--format</span></b><span class=c> <FORMAT></span>Output format (text, json)- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=c>-h</span></b>, <b><span class=c>--help</span></b>Print help (see a summary with '-h')@@ -796,11 +784,8 @@ Usage: <b><span class=c>wt step prune</span></b> <span class=c>[OPTIONS]</span><b><span class=c>--format</span></b><span class=c> <FORMAT></span>Output format (text, json)- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=c>-h</span></b>, <b><span class=c>--help</span></b>Print help (see a summary with '-h')@@ -907,11 +892,8 @@ Usage: <b><span class=c>wt step relocate</span></b> <span class=c>[OPTIONS]</spaJSON prints structured result to stdout after the relocate completes.- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>diff --git a/docs/content/switch.md b/docs/content/switch.mdindex d48920f7a..30f1ec82d 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -205,11 +205,8 @@ Usage: <b><span class=c>wt switch</span></b> <span class=c>[OPTIONS]</span> <spaJSON prints structured result to stdout. Designed for tool integration (e.g., Claude CodeWorktreeCreate hooks).- Possible values:- - <b><span class=c>text</span></b>: Human-readable text output- - <b><span class=c>json</span></b>: JSON output-[default: text]+ [possible values: text, json]<b><span class=g>Global Options:</span></b><b><span class=c>-C</span></b><span class=c> <path></span>diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.mdindex 52c17e5fe..947b54b15 100644--- a/skills/worktrunk/reference/config.md+++ b/skills/worktrunk/reference/config.md@@ -632,11 +632,8 @@ Output:--format <FORMAT>Output format (text, json)- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/skills/worktrunk/reference/merge.md b/skills/worktrunk/reference/merge.mdindex 4744dc5fc..6003a64a8 100644--- a/skills/worktrunk/reference/merge.md+++ b/skills/worktrunk/reference/merge.md@@ -133,11 +133,8 @@ Automation:JSON prints structured result to stdout after merge completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/skills/worktrunk/reference/remove.md b/skills/worktrunk/reference/remove.mdindex 82d5200e4..3994d08fc 100644--- a/skills/worktrunk/reference/remove.md+++ b/skills/worktrunk/reference/remove.md@@ -125,11 +125,8 @@ Automation:JSON prints structured result to stdout after removal completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/skills/worktrunk/reference/step.md b/skills/worktrunk/reference/step.mdindex e791829db..7ce881379 100644--- a/skills/worktrunk/reference/step.md+++ b/skills/worktrunk/reference/step.md@@ -156,11 +156,8 @@ Automation:JSON prints structured result to stdout after the commit completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>@@ -255,11 +252,8 @@ Automation:JSON prints structured result to stdout after the squash completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>@@ -492,11 +486,8 @@ Automation:JSON prints structured result to stdout after the copy completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>@@ -672,11 +663,8 @@ Options:--format <FORMAT>Output format (text, json)- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]-h, --helpPrint help (see a summary with '-h')@@ -833,11 +821,8 @@ Options:--format <FORMAT>Output format (text, json)- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]-h, --helpPrint help (see a summary with '-h')@@ -952,11 +937,8 @@ Automation:JSON prints structured result to stdout after the relocate completes.- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/skills/worktrunk/reference/switch.md b/skills/worktrunk/reference/switch.mdindex ac9529813..84d7fc776 100644--- a/skills/worktrunk/reference/switch.md+++ b/skills/worktrunk/reference/switch.md@@ -200,11 +200,8 @@ Automation:JSON prints structured result to stdout. Designed for tool integration (e.g., Claude CodeWorktreeCreate hooks).- Possible values:- - text: Human-readable text output- - json: JSON output-[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex c7253bb95..c6a6e3d79 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -179,9 +179,7 @@ pub(crate) fn version_str() -> &'static str {/// Output format for commands with text + JSON modes (e.g., `wt switch`).#[derive(Debug, Clone, Copy, PartialEq, Eq, clap::ValueEnum)]pub(crate) enum SwitchFormat {- /// Human-readable text outputText,- /// JSON outputJson,}@@ -189,9 +187,7 @@ pub(crate) enum SwitchFormat {// unrelated codepaths to handle it. Consider a dedicated StatuslineFormat enum.#[derive(Debug, Clone, Copy, clap::ValueEnum)]pub(crate) enum OutputFormat {- /// Human-readable table formatTable,- /// JSON outputJson,/// Claude Code statusline mode (reads context from stdin)#[value(name = "claude-code")]diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snapindex eef9847c5..62980a649 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap@@ -47,12 +47,9 @@ Usage: [1m[36mwt config show[0m [36m[OPTIONS][0m[1m[32mOutput:[0m[1m[36m--format[0m[36m [0m[36m<FORMAT>[0mOutput format (text, json)-- Possible values:- - [1m[36mtext[0m: Human-readable text output- - [1m[36mjson[0m: JSON output[default: text]+ [possible values: text, json][1m[32mGlobal Options:[0m[1m[36m-C[0m[36m [0m[36m<path>[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap b/tests/snapshots/integration__integration_tests__help__help_md_merge.snapindex b907406cb..598b40488 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_merge.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_merge.snap@@ -79,12 +79,9 @@ Automation:Output formatJSON prints structured result to stdout after merge completes.-- Possible values:- - text: Human-readable text output- - json: JSON output[default: text]+ [possible values: text, json]Global Options:-C <path>diff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex 5dd296712..4295bb92e 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap@@ -79,12 +79,9 @@ Usage: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET][0mOutput format[0mJSON prints structured result to stdout after merge completes.[0m-- Possible values:- - [1m[36mtext[0m: Human-readable text output- - [1m[36mjson[0m: JSON output[default: text]+ [possible values: text, json][1m[32mGlobal Options:[0m[1m[36m-C[0m[36m [0m[36m<path>[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex 9870214a9..080c6d3b0 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -68,12 +68,9 @@ Usage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...[0mOutput format[0mJSON prints structured result to stdout after removal completes.[0m-- Possible values:- - [1m[36mtext[0m: Human-readable text output- - [1m[36mjson[0m: JSON output[default: text]+ [possible values: text, json][1m[32mGlobal Options:[0m[1m[36m-C[0m[36m [0m[36m<path>[0mdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex 1304723b7..92854ad44 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -98,12 +98,9 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m[BRANCH][0m [1m[36m[--Output format[0mJSON prints structured result to stdout. Designed for tool integration (e.g., Claude Code WorktreeCreate hooks).[0m-- Possible values:- - [1m[36mtext[0m: Human-readable text output- - [1m[36mjson[0m: JSON output[default: text]+ [possible values: text, json][1m[32mGlobal Options:[0m[1m[36m-C[0m[36m [0m[36m<path>[0m