Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
refactor: improve CLI help text and documentation
Maximilian Roos0340924d4739
diff --git a/docs/content/hook.md b/docs/content/hook.mdindex 4ddf48181..3d5612edd 100644--- a/docs/content/hook.md+++ b/docs/content/hook.md@@ -477,7 +477,7 @@ fi## Command reference{% terminal() %}-wt hook - Run hooks independently+wt hook - Run configured hooksUsage: <b><span class=c>wt hook</span></b> <span class=c>[OPTIONS]</span> <span class=c><COMMAND></span>diff --git a/docs/content/remove.md b/docs/content/remove.mdindex 390e59d43..7d854db62 100644--- a/docs/content/remove.md+++ b/docs/content/remove.md@@ -71,7 +71,7 @@ Removal runs in the background by default (returns immediately). Logs are writte## Command reference{% terminal() %}-wt remove - Remove worktree and branch (if merged)+wt remove - Remove worktree; delete branch if mergedUsage: <b><span class=c>wt remove</span></b> <span class=c>[OPTIONS]</span> <span class=c>[BRANCHES]...</span>diff --git a/docs/content/step.md b/docs/content/step.mdindex b2bfcdd51..0c86748e0 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -39,12 +39,12 @@ wt step push## See also- [wt merge](@/merge.md) — Runs commit → squash → rebase → hooks → push → cleanup automatically-- [wt hook](@/hook.md) — Run hooks independently+- [wt hook](@/hook.md) — Run configured hooks## Command reference{% terminal() %}-wt step - Run individual workflow operations+wt step - Run individual operationsUsage: <b><span class=c>wt step</span></b> <span class=c>[OPTIONS]</span> <span class=c><COMMAND></span>diff --git a/src/cli.rs b/src/cli.rsindex b28539671..d058bcd22 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -863,7 +863,7 @@ wt config state logsClear,}-/// Run individual workflow operations+/// Run individual operations#[derive(Subcommand)]pub enum StepCommand {/// Commit changes with LLM commit message@@ -1003,7 +1003,7 @@ Note: This command is experimental and may change in future versions.},}-/// Run hooks independently+/// Run configured hooks#[derive(Subcommand)]pub enum HookCommand {/// Show configured hooks@@ -1440,7 +1440,7 @@ WORKTRUNK_COMMIT_GENERATION__ARGS="test: automated commit" \action: ConfigCommand,},- /// Run individual workflow operations+ /// Run individual operations#[command(name = "step",after_long_help = r#"Run individual git workflow operations: commits, squashes, rebases, and pushes.@@ -1474,7 +1474,7 @@ wt step push## See also- [wt merge](@/merge.md) — Runs commit → squash → rebase → hooks → push → cleanup automatically-- [wt hook](@/hook.md) — Run hooks independently+- [wt hook](@/hook.md) — Run configured hooks<!-- subdoc: for-each -->"#@@ -1484,7 +1484,7 @@ wt step pushaction: StepCommand,},- /// Run hooks independently+ /// Run configured hooks#[command(name = "hook",after_long_help = r#"Shell commands that run at key points in the worktree lifecycle.@@ -2392,7 +2392,7 @@ To change which branch a worktree is on, use `git switch` inside that worktree.verify: bool,},- /// Remove worktree and branch (if merged)+ /// Remove worktree; delete branch if merged#[command(after_long_help = r#"Removes worktrees and their branches (if merged), returning to the main worktree. Defaults to removing the current worktree.diff --git a/tests/snapshots/integration__integration_tests__help__help_md_root.snap b/tests/snapshots/integration__integration_tests__help__help_md_root.snapindex 0470ea804..f68b241b5 100644--- a/tests/snapshots/integration__integration_tests__help__help_md_root.snap+++ b/tests/snapshots/integration__integration_tests__help__help_md_root.snap@@ -10,6 +10,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -22,12 +23,12 @@ Usage: wt [OPTIONS] [COMMAND]Commands:config Manage configuration and shell integration- step Run individual workflow operations- hook Run hooks independently+ step Run individual operations+ hook Run configured hooksselect Interactive worktree selectorlist List worktrees and their statusswitch Switch to a worktree- remove Remove worktree and branch (if merged)+ remove Remove worktree; delete branch if mergedmerge Merge worktree into target branchOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_no_args.snap b/tests/snapshots/integration__integration_tests__help__help_no_args.snapindex 6bd167591..6b9cdf469 100644--- a/tests/snapshots/integration__integration_tests__help__help_no_args.snap+++ b/tests/snapshots/integration__integration_tests__help__help_no_args.snap@@ -9,6 +9,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -23,12 +24,12 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[32mCommands:[1m[36mconfig[0m Manage configuration and shell integration- [1m[36mstep[0m Run individual workflow operations- [1m[36mhook[0m Run hooks independently+ [1m[36mstep[0m Run individual operations+ [1m[36mhook[0m Run configured hooks[1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and their status[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch (if merged)+ [1m[36mremove[0m Remove worktree; delete branch if merged[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex 6473a9bf3..f811bf010 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -11,6 +11,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -19,7 +20,7 @@ exit_code: 0----- stdout ---------- stderr ------wt remove - Remove worktree and branch (if merged)+wt remove - Remove worktree; delete branch if mergedUsage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...diff --git a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap b/tests/snapshots/integration__integration_tests__help__help_remove_short.snapindex ca10b2765..7d066ee6a 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_short.snap@@ -11,6 +11,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -19,7 +20,7 @@ exit_code: 0----- stdout ---------- stderr ------wt remove - Remove worktree and branch (if merged)+wt remove - Remove worktree; delete branch if mergedUsage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...diff --git a/tests/snapshots/integration__integration_tests__help__help_root_long.snap b/tests/snapshots/integration__integration_tests__help__help_root_long.snapindex 155fbf5cf..8842ffd60 100644--- a/tests/snapshots/integration__integration_tests__help__help_root_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_root_long.snap@@ -10,6 +10,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -24,12 +25,12 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[32mCommands:[1m[36mconfig[0m Manage configuration and shell integration- [1m[36mstep[0m Run individual workflow operations- [1m[36mhook[0m Run hooks independently+ [1m[36mstep[0m Run individual operations+ [1m[36mhook[0m Run configured hooks[1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and their status[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch (if merged)+ [1m[36mremove[0m Remove worktree; delete branch if merged[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_root_short.snap b/tests/snapshots/integration__integration_tests__help__help_root_short.snapindex e39a042c3..1c79e575d 100644--- a/tests/snapshots/integration__integration_tests__help__help_root_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_root_short.snap@@ -10,6 +10,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -24,12 +25,12 @@ Usage: [1m[36mwt[0m [36m[OPTIONS][0m [36m[COMMAND][1m[32mCommands:[1m[36mconfig[0m Manage configuration and shell integration- [1m[36mstep[0m Run individual workflow operations- [1m[36mhook[0m Run hooks independently+ [1m[36mstep[0m Run individual operations+ [1m[36mhook[0m Run configured hooks[1m[36mselect[0m Interactive worktree selector[1m[36mlist[0m List worktrees and their status[1m[36mswitch[0m Switch to a worktree- [1m[36mremove[0m Remove worktree and branch (if merged)+ [1m[36mremove[0m Remove worktree; delete branch if merged[1m[36mmerge[0m Merge worktree into target branch[1m[32mOptions:diff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snapindex 5b3b74eeb..8177b0d3c 100644--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap@@ -11,6 +11,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -19,7 +20,7 @@ exit_code: 0----- stdout ---------- stderr ------wt step - Run individual workflow operations+wt step - Run individual operationsUsage: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>@@ -71,4 +72,4 @@ Manual merge workflow with review between steps:[32mSee also- wt merge — Runs commit → squash → rebase → hooks → push → cleanup automatically-- wt hook — Run hooks independently+- wt hook — Run configured hooksdiff --git a/tests/snapshots/integration__integration_tests__help__help_step_short.snap b/tests/snapshots/integration__integration_tests__help__help_step_short.snapindex 01201dd18..4f9466ca2 100644--- a/tests/snapshots/integration__integration_tests__help__help_step_short.snap+++ b/tests/snapshots/integration__integration_tests__help__help_step_short.snap@@ -11,6 +11,7 @@ info:GIT_EDITOR: ""RUST_LOG: warnSOURCE_DATE_EPOCH: "1735776000"+ TERM: alacrittyWORKTRUNK_CONFIG_PATH: /nonexistent/test/config.tomlWORKTRUNK_TEST_SKIP_URL_HEALTH_CHECK: "1"---@@ -19,7 +20,7 @@ exit_code: 0----- stdout ---------- stderr ------wt step - Run individual workflow operations+wt step - Run individual operationsUsage: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>