Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
feat: restore visual hierarchy and add section dividers
Maximilian Roos46827d2d4e4b
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.mdindex 091977ecc..ab007411f 100644--- a/.claude-plugin/skills/worktrunk/reference/config.md+++ b/.claude-plugin/skills/worktrunk/reference/config.md@@ -35,8 +35,10 @@ wt config show| **User config** | `~/.config/worktrunk/config.toml` | Personal settings, command defaults, approved project commands || **Project config** | `.config/wt.toml` | Lifecycle hooks, checked into version control |+---+<!-- USER_CONFIG_START -->-# Worktrunk User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -247,6 +249,8 @@ Combine these commits into a single commit message.<!-- DEFAULT_SQUASH_TEMPLATE_END --><!-- USER_CONFIG_END -->+---+## Project configThe project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.@@ -286,6 +290,8 @@ platform = "github" # or "gitlab"By default, the platform is detected from the remote URL. Use this when URL detection fails (e.g., `git.mycompany.com` instead of `github.mycompany.com`).+---+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:diff --git a/.claude-plugin/skills/worktrunk/reference/list.md b/.claude-plugin/skills/worktrunk/reference/list.mdindex 5ff549294..60dc5d3c7 100644--- a/.claude-plugin/skills/worktrunk/reference/list.md+++ b/.claude-plugin/skills/worktrunk/reference/list.md@@ -110,6 +110,8 @@ The Status column has multiple subcolumns. Within each, only the first matchingRows are dimmed when [safe to delete](https://worktrunk.dev/remove/#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+---+## JSON outputQuery structured data with `--format=json`:diff --git a/dev/config.example.toml b/dev/config.example.tomlindex 9ec13f3ed..014d621a9 100644--- a/dev/config.example.toml+++ b/dev/config.example.toml@@ -1,4 +1,4 @@-# # Worktrunk User Configuration+# ## Worktrunk User Configuration## Create with `wt config create`.#diff --git a/docs/content/config.md b/docs/content/config.mdindex 8fa285552..cccf4c59e 100644--- a/docs/content/config.md+++ b/docs/content/config.md@@ -43,8 +43,10 @@ wt config show| **User config** | `~/.config/worktrunk/config.toml` | Personal settings, command defaults, approved project commands || **Project config** | `.config/wt.toml` | Lifecycle hooks, checked into version control |+---+<!-- USER_CONFIG_START -->-# Worktrunk User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -255,6 +257,8 @@ Combine these commits into a single commit message.<!-- DEFAULT_SQUASH_TEMPLATE_END --><!-- USER_CONFIG_END -->+---+## Project configThe project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.@@ -294,6 +298,8 @@ platform = "github" # or "gitlab"By default, the platform is detected from the remote URL. Use this when URL detection fails (e.g., `git.mycompany.com` instead of `github.mycompany.com`).+---+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:diff --git a/docs/content/list.md b/docs/content/list.mdindex a26f86965..7b33a440c 100644--- a/docs/content/list.md+++ b/docs/content/list.md@@ -143,6 +143,8 @@ The Status column has multiple subcolumns. Within each, only the first matchingRows are dimmed when [safe to delete](@/remove.md#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+---+## JSON outputQuery structured data with `--format=json`:diff --git a/src/cli/mod.rs b/src/cli/mod.rsindex 8fd412c7e..025f69b9f 100644--- a/src/cli/mod.rs+++ b/src/cli/mod.rs@@ -477,6 +477,8 @@ The Status column has multiple subcolumns. Within each, only the first matchingRows are dimmed when [safe to delete](@/remove.md#branch-cleanup) (`_` same commit with clean working tree or `⊂` content integrated).+---+## JSON outputQuery structured data with `--format=json`:@@ -1433,8 +1435,10 @@ wt config show| **User config** | `~/.config/worktrunk/config.toml` | Personal settings, command defaults, approved project commands || **Project config** | `.config/wt.toml` | Lifecycle hooks, checked into version control |+---+<!-- USER_CONFIG_START -->-# Worktrunk User Configuration+## Worktrunk User ConfigurationCreate with `wt config create`.@@ -1645,6 +1649,8 @@ Combine these commits into a single commit message.<!-- DEFAULT_SQUASH_TEMPLATE_END --><!-- USER_CONFIG_END -->+---+## Project configThe project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.@@ -1684,6 +1690,8 @@ platform = "github" # or "gitlab"By default, the platform is detected from the remote URL. Use this when URL detection fails (e.g., `git.mycompany.com` instead of `github.mycompany.com`).+---+## Shell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:diff --git a/src/md_help.rs b/src/md_help.rsindex 163846b84..14037ffa2 100644--- a/src/md_help.rs+++ b/src/md_help.rs@@ -87,14 +87,27 @@ pub(crate) fn render_markdown_in_help_with_width(help: &str, width: Option<usizecontinue;}+ // Horizontal rules (---, ***, ___) render as blank line for visual separation+ if trimmed == "---" || trimmed == "***" || trimmed == "___" {+ result.push('\n');+ i += 1;+ continue;+ }+// Outside code blocks, render markdown headers (never wrapped)+ // Visual hierarchy: H1 > H2 > H3+ // - H1: UPPERCASE green (most prominent, rarely used)+ // - H2: Bold green (major sections like "Examples", "Columns")+ // - H3: Normal green (subsections like "CI status", "commit object")if let Some(header_text) = trimmed.strip_prefix("### ") {- let bold = Style::new().bold();- result.push_str(&format!("{bold}{header_text}{bold:#}\n"));- } else if let Some(header_text) = trimmed.strip_prefix("## ") {result.push_str(&format!("{green}{header_text}{green:#}\n"));+ } else if let Some(header_text) = trimmed.strip_prefix("## ") {+ let bold_green = Style::new()+ .bold()+ .fg_color(Some(Color::Ansi(AnsiColor::Green)));+ result.push_str(&format!("{bold_green}{header_text}{bold_green:#}\n"));} else if let Some(header_text) = trimmed.strip_prefix("# ") {- result.push_str(&format!("{green}{header_text}{green:#}\n"));+ result.push_str(&format!("{green}{}{green:#}\n", header_text.to_uppercase()));} else {// Prose text - wrap if width is specifiedlet formatted = render_inline_formatting(line);@@ -480,24 +493,36 @@ mod tests {#[test]fn test_render_markdown_in_help_h1() {let result = render_markdown_in_help("# Header");- // H1 should be green- assert!(result.contains("Header"));- assert!(result.contains("\u{1b}[")); // Has color codes+ // H1 should be UPPERCASE green+ assert!(result.contains("HEADER")); // Uppercase+ assert!(result.contains("\u{1b}[32m")); // Green}#[test]fn test_render_markdown_in_help_h2() {let result = render_markdown_in_help("## Section");+ // H2 should be bold green (anstyle emits separate codes)assert!(result.contains("Section"));- assert!(result.contains("\u{1b}[")); // Has color codes+ assert!(result.contains("\u{1b}[1m")); // Bold+ assert!(result.contains("\u{1b}[32m")); // Green}#[test]fn test_render_markdown_in_help_h3() {let result = render_markdown_in_help("### Subsection");+ // H3 should be green (no bold)assert!(result.contains("Subsection"));- // H3 is bold- assert!(result.contains("\u{1b}[1m")); // Bold+ assert!(result.contains("\u{1b}[32m")); // Green+ assert!(!result.contains("\u{1b}[1m")); // Not bold+ }++ #[test]+ fn test_render_markdown_in_help_horizontal_rule() {+ let result = render_markdown_in_help("before\n\n---\n\n## Section");+ // Horizontal rule becomes blank line, not literal ---+ assert!(!result.contains("---"));+ assert!(result.contains("before"));+ assert!(result.contains("Section"));}#[test]diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snapindex 2517a4c6c..6f7443af8 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap@@ -42,11 +42,11 @@ Usage: [1m[36mwt config create[0m [36m[OPTIONS][1m[36m-v[0m, [1m[36m--verbose[0m[36m...Show debug info (-v), or also write diagnostic report (-vv)-[32mUser config+[1m[32mUser configCreates [2m~/.config/worktrunk/config.toml[0m with the following content:- [2m# # Worktrunk User Configuration+ [2m# ## Worktrunk User Configuration[2m#[2m# Create with `wt config create`.[2m#@@ -236,7 +236,7 @@ Creates [2m~/.config/worktrunk/config.toml[0m with the following content:[2m# """[2m# <!-- DEFAULT_SQUASH_TEMPLATE_END -->-[32mProject config+[1m[32mProject configWith [2m--project[0m, creates [2m.config/wt.toml[0m in the current repository:diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snapindex fd3ab2bd8..facbd9f07 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap@@ -46,7 +46,7 @@ Usage: [1m[36mwt config[0m [36m[OPTIONS][0m [36m<COMMAND>Manages configuration, shell integration, and runtime settings.-[32mExamples+[1m[32mExamplesInstall shell integration (required for directory switching):@@ -64,14 +64,16 @@ Show current configuration and file locations:[2mwt config show-[32mConfiguration files+[1m[32mConfiguration filesFile Location Purpose────────────── ─────────────────────────────── ──────────────────────────────────────────────────────────────User config ~/.config/worktrunk/config.toml Personal settings, command defaults, approved project commandsProject config .config/wt.toml Lifecycle hooks, checked into version control-[32mWorktrunk User Configuration+++[1m[32mWorktrunk User ConfigurationCreate with [2mwt config create[0m.@@ -80,7 +82,7 @@ Location:- macOS/Linux: [2m~/.config/worktrunk/config.toml[0m (or [2m$XDG_CONFIG_HOME[0m if set)- Windows: [2m%APPDATA%\worktrunk\config.toml-[32mWorktree path template+[1m[32mWorktree path templateControls where new worktrees are created. Paths are relative to the repository root.@@ -109,7 +111,7 @@ Controls where new worktrees are created. Paths are relative to the repository r[2m# Creates: ~/code/project/feature-auth (sibling to .git)[2mworktree-path = "../{{ branch | sanitize }}"-[32mList command defaults+[1m[32mList command defaultsPersistent flag values for [2mwt list[0m. Override on command line as needed.@@ -118,14 +120,14 @@ Persistent flag values for [2mwt list[0m. Override on command line as needed.[2mbranches = false # Include branches without worktrees (--branches)[2mremotes = false # Include remote-only branches (--remotes)-[32mCommit defaults+[1m[32mCommit defaultsShared by [2mwt step commit[0m, [2mwt step squash[0m, and [2mwt merge[0m.[2m[commit][2mstage = "all" # What to stage before commit: "all", "tracked", or "none"-[32mMerge command defaults+[1m[32mMerge command defaultsAll flags are on by default. Set to false to change default behavior.@@ -136,7 +138,7 @@ All flags are on by default. Set to false to change default behavior.[2mremove = true # Remove worktree after merge (--no-remove to keep)[2mverify = true # Run project hooks (--no-verify to skip)-[32mSelect command defaults+[1m[32mSelect command defaultsPager behavior for [2mwt select[0m diff previews.@@ -146,7 +148,7 @@ Pager behavior for [2mwt select[0m diff previews.[2m# Example:[2m# pager = "delta --paging=never"-[32mLLM commit messages+[1m[32mLLM commit messagesGenerate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.@@ -164,7 +166,7 @@ Using aichat:See Custom Prompt Templates for inline template options.-[32mApproved commands+[1m[32mApproved commandsCommands approved for project hooks. Auto-populated when approving hooks on first run, or via [2mwt hook approvals add[0m.@@ -173,11 +175,11 @@ Commands approved for project hooks. Auto-populated when approving hooks on firsFor project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at [2m<repo>/.config/wt.toml[0m. Run [2mwt config create --project[0m to create one, or see <https://worktrunk.dev/hook/>.-[32mCustom prompt templates+[1m[32mCustom prompt templatesTemplates use minijinja syntax.-[1mCommit template+[32mCommit templateAvailable variables:@@ -219,7 +221,7 @@ Default template:[2m[2m"""-[1mSquash template+[32mSquash templateAvailable variables (in addition to commit template variables):@@ -257,7 +259,9 @@ Default template:[2m[2m"""-[32mProject config+++[1m[32mProject configThe project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.@@ -272,7 +276,7 @@ Create [2m.config/wt.toml[0m in the repository root:See [2mwt hook[0m for complete documentation on hook types, execution order, template variables, and JSON context.-[1mDev server URL+[32mDev server URLThe [2m[list][0m section adds a URL column to [2mwt list[0m:@@ -281,7 +285,7 @@ The [2m[list][0m section adds a URL column to [2mwt list[0m:URLs are dimmed when the port isn't listening.-[1mCI platform override+[32mCI platform overrideThe [2m[ci][0m section overrides CI platform detection for GitHub Enterprise or self-hosted GitLab with custom domains:@@ -290,7 +294,9 @@ The [2m[ci][0m section overrides CI platform detection for GitHub Enterprise oBy default, the platform is detected from the remote URL. Use this when URL detection fails (e.g., [2mgit.mycompany.com[0m instead of [2mgithub.mycompany.com[0m).-[32mShell integration+++[1m[32mShell integrationWorktrunk needs shell integration to change directories when switching worktrees. Install with:@@ -309,7 +315,7 @@ Or manually add to the shell config:Without shell integration, [2mwt switch[0m prints the target directory but cannot [2mcd[0m into it.-[1mSkip first-run prompt+[32mSkip first-run promptOn first run without shell integration, Worktrunk offers to install it. Suppress this prompt in CI or automated environments:@@ -319,11 +325,11 @@ Or via environment variable:[2mexport WORKTRUNK_SKIP_SHELL_INTEGRATION_PROMPT=true-[32mEnvironment variables+[1m[32mEnvironment variablesAll user config options can be overridden with environment variables using the [2mWORKTRUNK_[0m prefix.-[1mNaming convention+[32mNaming conventionConfig keys use kebab-case ([2mworktree-path[0m), while env vars use SCREAMING_SNAKE_CASE ([2mWORKTRUNK_WORKTREE_PATH[0m). The conversion happens automatically.@@ -337,13 +343,13 @@ For nested config sections, use double underscores to separate levels:Note the single underscore after [2mWORKTRUNK[0m and double underscores between nested keys.-[1mArray values+[32mArray valuesArray config values like [2margs = ["-m", "claude-haiku"][0m can be specified as a single string in environment variables:[2mexport WORKTRUNK_COMMIT_GENERATION__ARGS="-m claude-haiku"-[1mExample: CI/testing override+[32mExample: CI/testing overrideOverride the LLM command in CI to use a mock:@@ -351,7 +357,7 @@ Override the LLM command in CI to use a mock:[2mWORKTRUNK_COMMIT_GENERATION__ARGS="test: automated commit" \[2m wt merge-[1mOther environment variables+[32mOther environment variablesVariable Purpose───────────────────────────────── ─────────────────────────────────────────────────────────────────────────────────diff --git a/tests/snapshots/integration__integration_tests__help__help_config_show.snap b/tests/snapshots/integration__integration_tests__help__help_config_show.snapindex 99e3986a5..43e18010a 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_show.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_show.snap@@ -47,7 +47,7 @@ and project config ([2m.config/wt.toml[0m).If a config file doesn't exist, shows defaults that would be used.-[32mFull diagnostics+[1m[32mFull diagnosticsUse [2m--full[0m to run diagnostic checks:diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state.snap b/tests/snapshots/integration__integration_tests__help__help_config_state.snapindex 4bea8735c..95a441929 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state.snap@@ -52,7 +52,7 @@ Usage: [1m[36mwt config state[0m [36m[OPTIONS][0m [36m<COMMAND>State is stored in [2m.git/[0m (config entries and log files), separate from configuration files.Use [2mwt config show[0m to view file-based configuration.-[32mKeys+[1m[32mKeys- [1mdefault-branch[0m: The repository's default branch ([2mmain[0m, [2mmaster[0m, etc.)- [1mprevious-branch[0m: Previous branch for [2mwt switch -@@ -60,7 +60,7 @@ Use [2mwt config show[0m to view file-based configuration.- [1mmarker[0m: Custom status marker for a branch (shown in [2mwt list[0m)- [1mlogs[0m: Background operation logs-[32mExamples+[1m[32mExamplesGet the default branch:[2mwt config state default-branchdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snapindex df2a6e7ba..0500e6f05 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap@@ -46,14 +46,14 @@ Usage: [1m[36mwt config state ci-status[0m [36m[OPTIONS][0m [36m[COMMAND]Caches GitHub/GitLab CI status for display in [2mwt list[0m.-[32mHow it works+[1m[32mHow it works1. [1mPlatform detection[0m — From [2m[ci] platform[0m in project config, or detected from remote URL (github.com → GitHub, gitlab.com → GitLab)2. [1mCLI requirement[0m — Requires [2mgh[0m (GitHub) or [2mglab[0m (GitLab) CLI, authenticated3. [1mWhat's checked[0m — PRs/MRs first, then branch pipelines for branches with upstream4. [1mCaching[0m — Results cached 30-60 seconds per branch+commit-[32mStatus values+[1m[32mStatus valuesStatus Meaning───────── ───────────────────────────────────────diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snapindex 1e6ac9326..9ce34f833 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap@@ -51,7 +51,7 @@ Useful in scripts to avoid hardcoding [2mmain[0m or [2mmaster[0m:Without a subcommand, runs [2mget[0m. Use [2mset[0m to override, or [2mclear[0m then [2mget[0m to re-detect.-[32mDetection+[1m[32mDetectionWorktrunk detects the default branch automatically:diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snapindex a7e44b196..95c3735da 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap@@ -46,7 +46,7 @@ Usage: [1m[36mwt config state logs[0m [36m[OPTIONS][0m [36m[COMMAND]View and manage logs from background operations.-[32mWhat's logged+[1m[32mWhat's loggedOperation Log file────────────────── ───────────────────────────────────────@@ -55,17 +55,17 @@ View and manage logs from background operations.Source is [2muser[0m or [2mproject[0m depending on where the hook is defined.-[32mLocation+[1m[32mLocationAll logs are stored in [2m.git/wt-logs/[0m (in the main worktree's git directory).-[32mBehavior+[1m[32mBehavior- [1mOverwrites[0m — Same operation on same branch overwrites previous log- [1mPersists[0m — Logs from deleted branches remain until manually cleared- [1mShared[0m — All worktrees write to the same log directory-[32mExamples+[1m[32mExamplesList all log files:[2mwt config state logs getdiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snapindex ee3f24bc7..e78a3fbf9 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap@@ -47,7 +47,7 @@ Usage: [1m[36mwt config state marker[0m [36m[OPTIONS][0m [36m[COMMAND]Custom status text or emoji shown in the [2mwt list[0m Status column.-[32mDisplay+[1m[32mDisplayMarkers appear at the start of the Status column:@@ -56,13 +56,13 @@ Markers appear at the start of the Status column:[2mfeature 🚧↑ ~/code/myproject.feature[2mbugfix 🤖!↑⇡ ~/code/myproject.bugfix-[32mUse cases+[1m[32mUse cases- [1mWork status[0m — [2m🚧[0m WIP, [2m✅[0m ready for review, [2m🔥[0m urgent- [1mAgent tracking[0m — The Claude Code plugin sets markers automatically- [1mNotes[0m — Any short text: [2m"blocked"[0m, [2m"needs tests"-[32mStorage+[1m[32mStorageStored in git config as [2mworktrunk.state.<branch>.marker[0m. Set directly with:diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snapindex 8e223c221..f9d1d7a9c 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap@@ -47,7 +47,7 @@ Usage: [1m[36mwt config state previous-branch[0m [36m[OPTIONS][0m [36m[COMEnables [2mwt switch -[0m to return to the previous worktree, similar to [2mcd -[0m or [2mgit checkout -[0m.-[32mHow it works+[1m[32mHow it worksUpdated automatically on every [2mwt switch[0m. Stored in git config as [2mworktrunk.history[0m.diff --git a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snapindex a38c77109..c29968df0 100644--- a/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap+++ b/tests/snapshots/integration__integration_tests__help__help_hook_approvals.snap@@ -45,7 +45,7 @@ Usage: [1m[36mwt hook approvals[0m [36m[OPTIONS][0m [36m<COMMAND>Project hooks require approval on first run to prevent untrusted projects from running arbitrary commands.-[32mExamples+[1m[32mExamplesPre-approve all commands for current project:[2mwt hook approvals add@@ -56,6 +56,6 @@ Clear approvals for current project:Clear global approvals:[2mwt hook approvals clear --global-[32mHow approvals work+[1m[32mHow approvals workApproved commands are saved to user config. Re-approval is required when the command template changes or the project moves. Use [2m--yes[0m to bypass prompts in CI.diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snapindex 9af45c6d5..47eaa3d97 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap@@ -65,7 +65,7 @@ Show all worktrees with their status. The table includes uncommitted changes, diThe table renders progressively: branch names, paths, and commit hashes appear immediately, then status, divergence, and other columns fill in as background git operations complete. With [2m--full[0m, CI status fetches from the network — the table displays instantly and CI fills in as results arrive.-[32mExamples+[1m[32mExamplesList all worktrees:@@ -83,7 +83,7 @@ Output as JSON for scripting:[2m$ wt list --format=json-[32mColumns+[1m[32mColumnsColumn Shows─────── ─────────────────────────────────────────────────────────────────@@ -102,7 +102,7 @@ Output as JSON for scripting:Note: [2mmain↕[0m and [2mmain…±[0m refer to the default branch (header label stays [2mmain[0m for compactness). [2mmain…±[0m uses a merge-base (three-dot) diff.-[1mCI status+[32mCI statusThe CI column shows GitHub/GitLab pipeline status:@@ -118,7 +118,7 @@ The CI column shows GitHub/GitLab pipeline status:CI indicators are clickable links to the PR or pipeline page. Any CI dot appears dimmed when there are unpushed local changes (stale status). PRs/MRs are checked first, then branch workflows/pipelines for branches with an upstream. Local-only branches show blank. Results are cached for 30-60 seconds; use [2mwt config state[0m to view or clear.-[32mStatus symbols+[1m[32mStatus symbolsThe Status column has multiple subcolumns. Within each, only the first matching symbol is shown (listed in priority order):@@ -149,7 +149,9 @@ The Status column has multiple subcolumns. Within each, only the first matchingRows are dimmed when safe to delete ([2m_[0m same commit with clean working tree or [2m⊂[0m content integrated).-[32mJSON output+++[1m[32mJSON outputQuery structured data with [2m--format=json[0m:@@ -201,7 +203,7 @@ Query structured data with [2m--format=json[0m:statusline string Pre-formatted status with ANSI colorssymbols string Raw status symbols without colors (e.g., "!?↓")-[1mCommit object+[32mCommit objectField Type Description───────── ────── ───────────────────────────@@ -210,7 +212,7 @@ Query structured data with [2m--format=json[0m:message string Commit message (first line)timestamp number Unix timestamp-[1mworking_tree object+[32mworking_tree objectField Type Description───────── ─────── ───────────────────────────────────────@@ -221,7 +223,7 @@ Query structured data with [2m--format=json[0m:deleted boolean Has deleted filesdiff object Lines changed vs HEAD: {added, deleted}-[1mmain object+[32mmain objectField Type Description────── ────── ─────────────────────────────────────────────────────@@ -229,7 +231,7 @@ Query structured data with [2m--format=json[0m:behind number Commits behind the default branchdiff object Lines changed vs the default branch: {added, deleted}-[1mremote object+[32mremote objectField Type Description────── ────── ────────────────────────────@@ -238,7 +240,7 @@ Query structured data with [2m--format=json[0m:ahead number Commits ahead of remotebehind number Commits behind remote-[1mworktree object+[32mworktree objectField Type Description──────── ─────── ─────────────────────────────────────────────────────────────────────@@ -246,7 +248,7 @@ Query structured data with [2m--format=json[0m:reason string Reason for locked/prunable statedetached boolean HEAD is detached-[1mci object+[32mci objectField Type Description────── ─────── ─────────────────────────────────────────────────@@ -255,22 +257,22 @@ Query structured data with [2m--format=json[0m:stale boolean Local HEAD differs from remote (unpushed changes)url string URL to the PR/MR page-[1mmain_state values+[32mmain_state valuesThese values describe relation to the default branch.[2m"is_main"[0m [2m"would_conflict"[0m [2m"empty"[0m [2m"same_commit"[0m [2m"integrated"[0m [2m"diverged"[0m [2m"ahead"[0m [2m"behind"-[1mintegration_reason values+[32mintegration_reason valuesWhen [2mmain_state == "integrated"[0m: [2m"ancestor"[0m [2m"trees_match"[0m [2m"no_added_changes"[0m [2m"merge_adds_nothing"-[1mci.status values+[32mci.status values[2m"passed"[0m [2m"running"[0m [2m"failed"[0m [2m"conflicts"[0m [2m"no-ci"[0m [2m"error"Missing a field that would be generally useful? Open an issue at https://github.com/max-sixty/worktrunk.-[32mSee also+[1m[32mSee also- [2mwt select[0m — Interactive worktree picker with live previewdiff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snapindex e46a2045c..15d357a87 100644--- a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap+++ b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap@@ -70,7 +70,7 @@ immediately, then status, divergence, and other columns fill in as backgroundgit operations complete. With [2m--full[0m, CI status fetches from the network — thetable displays instantly and CI fills in as results arrive.-[32mExamples+[1m[32mExamplesList all worktrees:@@ -88,7 +88,7 @@ Output as JSON for scripting:[2m$ wt list --format=json-[32mColumns+[1m[32mColumnsColumn Shows─────── ─────────────────────────────────────────────────────────────────@@ -108,7 +108,7 @@ Output as JSON for scripting:Note: [2mmain↕[0m and [2mmain…±[0m refer to the default branch (header label stays [2mmain[0m forcompactness). [2mmain…±[0m uses a merge-base (three-dot) diff.-[1mCI status+[32mCI statusThe CI column shows GitHub/GitLab pipeline status:@@ -128,7 +128,7 @@ checked first, then branch workflows/pipelines for branches with an upstream.Local-only branches show blank. Results are cached for 30-60 seconds; use [2mwt[2mconfig state[0m to view or clear.-[32mStatus symbols+[1m[32mStatus symbolsThe Status column has multiple subcolumns. Within each, only the first matchingsymbol is shown (listed in priority order):@@ -164,7 +164,9 @@ symbol is shown (listed in priority order):Rows are dimmed when safe to delete ([2m_[0m same commit with clean working tree or [2m⊂[0mcontent integrated).-[32mJSON output+++[1m[32mJSON outputQuery structured data with [2m--format=json[0m:@@ -223,7 +225,7 @@ Query structured data with [2m--format=json[0m:symbols string Raw status symbols without colors (e.g.,"!?↓")-[1mCommit object+[32mCommit objectField Type Description───────── ────── ───────────────────────────@@ -232,7 +234,7 @@ Query structured data with [2m--format=json[0m:message string Commit message (first line)timestamp number Unix timestamp-[1mworking_tree object+[32mworking_tree objectField Type Description───────── ─────── ───────────────────────────────────────@@ -243,7 +245,7 @@ Query structured data with [2m--format=json[0m:deleted boolean Has deleted filesdiff object Lines changed vs HEAD: {added, deleted}-[1mmain object+[32mmain objectField Type Description────── ────── ─────────────────────────────────────────────────────@@ -251,7 +253,7 @@ Query structured data with [2m--format=json[0m:behind number Commits behind the default branchdiff object Lines changed vs the default branch: {added, deleted}-[1mremote object+[32mremote objectField Type Description────── ────── ────────────────────────────@@ -260,7 +262,7 @@ Query structured data with [2m--format=json[0m:ahead number Commits ahead of remotebehind number Commits behind remote-[1mworktree object+[32mworktree objectField Type Description──────── ─────── ───────────────────────────────────────────────────────────@@ -269,7 +271,7 @@ Query structured data with [2m--format=json[0m:reason string Reason for locked/prunable statedetached boolean HEAD is detached-[1mci object+[32mci objectField Type Description────── ─────── ─────────────────────────────────────────────────@@ -278,25 +280,25 @@ Query structured data with [2m--format=json[0m:stale boolean Local HEAD differs from remote (unpushed changes)url string URL to the PR/MR page-[1mmain_state values+[32mmain_state valuesThese values describe relation to the default branch.[2m"is_main"[0m [2m"would_conflict"[0m [2m"empty"[0m [2m"same_commit"[0m [2m"integrated"[0m [2m"diverged"[0m [2m"ahead"[2m"behind"-[1mintegration_reason values+[32mintegration_reason valuesWhen [2mmain_state == "integrated"[0m: [2m"ancestor"[0m [2m"trees_match"[0m [2m"no_added_changes"[0m[2m"merge_adds_nothing"-[1mci.status values+[32mci.status values[2m"passed"[0m [2m"running"[0m [2m"failed"[0m [2m"conflicts"[0m [2m"no-ci"[0m [2m"error"Missing a field that would be generally useful? Open an issue athttps://github.com/max-sixty/worktrunk.-[32mSee also+[1m[32mSee also- [2mwt select[0m — Interactive worktree picker with live previewdiff --git a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap b/tests/snapshots/integration__integration_tests__help__help_merge_long.snapindex 46352aa31..c1e12dbe4 100644--- a/tests/snapshots/integration__integration_tests__help__help_merge_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_merge_long.snap@@ -74,7 +74,7 @@ Usage: [1m[36mwt merge[0m [36m[OPTIONS][0m [36m[TARGET]Merge the current branch into the target branch, defaulting to the main branch. Unlike [2mgit merge[0m, this merges the current branch into a target (rather than a target into the current branch). Similar to clicking "Merge pull request" on GitHub.-[32mExamples+[1m[32mExamplesMerge to the default branch:@@ -96,7 +96,7 @@ Skip committing/squashing (rebase still runs unless --no-rebase):[2mwt merge --no-commit-[32mPipeline+[1m[32mPipeline[2mwt merge[0m runs these steps:@@ -110,7 +110,7 @@ Skip committing/squashing (rebase still runs unless --no-rebase):Use [2m--no-commit[0m to skip committing uncommitted changes and squashing; rebase still runs by default and can rewrite commits unless [2m--no-rebase[0m is passed. Useful after preparing commits manually with [2mwt step[0m. Requires a clean working tree.-[32mLocal CI+[1m[32mLocal CIFor personal projects, pre-merge hooks open up the possibility of a workflow with much faster iteration — an order of magnitude more small changes instead of fewer large ones.@@ -122,7 +122,7 @@ The full workflow: start an agent (one of many) on a task, work elsewhere, retur[2mtest = "cargo test"[2mlint = "cargo clippy"-[32mSee also+[1m[32mSee also- [2mwt step[0m — Run individual operations (commit, squash, rebase, push)- [2mwt remove[0m — Remove worktrees without mergingdiff --git a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap b/tests/snapshots/integration__integration_tests__help__help_remove_long.snapindex a85ed827d..bb3776d27 100644--- a/tests/snapshots/integration__integration_tests__help__help_remove_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_remove_long.snap@@ -64,7 +64,7 @@ Usage: [1m[36mwt remove[0m [36m[OPTIONS][0m [36m[BRANCHES]...Removes worktrees and their branches (if merged), returning to the main worktree. Defaults to removing the current worktree.-[32mExamples+[1m[32mExamplesRemove current worktree:@@ -83,7 +83,7 @@ Force-delete an unmerged branch:[2mwt remove -D experimental-[32mBranch cleanup+[1m[32mBranch cleanupBy default, branches are deleted when merging them would add nothing. This works with squash-merge and rebase workflows where commit history differs but file changes match.@@ -99,7 +99,7 @@ The 'same commit' check uses the local default branch; for other checks, 'targetBranches showing [2m_[0m or [2m⊂[0m are dimmed as safe to delete.-[32mForce flags+[1m[32mForce flagsWorktrunk has two force flags for different situations:@@ -114,11 +114,11 @@ Worktrunk has two force flags for different situations:Without [2m--force[0m, removal fails if the worktree contains untracked files. Without [2m-D[0m, removal keeps branches with unmerged changes. Use [2m--no-delete-branch[0m to keep the branch regardless of merge status.-[32mBackground removal+[1m[32mBackground removalRemoval runs in the background by default (returns immediately). Logs are written to [2m.git/wt-logs/{branch}-remove.log[0m. Use [2m--foreground[0m to run in the foreground.-[32mSee also+[1m[32mSee also- [2mwt merge[0m — Remove worktree after merging- [2mwt list[0m — View all worktreesdiff --git a/tests/snapshots/integration__integration_tests__help__help_step_long.snap b/tests/snapshots/integration__integration_tests__help__help_step_long.snapindex 430372df9..7ccbedf23 100644--- a/tests/snapshots/integration__integration_tests__help__help_step_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_step_long.snap@@ -48,7 +48,7 @@ Usage: [1m[36mwt step[0m [36m[OPTIONS][0m [36m<COMMAND>Run individual git workflow operations: commits, squashes, rebases, and pushes.-[32mExamples+[1m[32mExamplesCommit with LLM-generated message:@@ -61,7 +61,7 @@ Manual merge workflow with review between steps:[2mwt step rebase[2mwt step push-[32mOperations+[1m[32mOperations- [2mcommit[0m — Stage and commit with LLM-generated message- [2msquash[0m — Squash all branch commits into one with LLM-generated message@@ -70,7 +70,7 @@ Manual merge workflow with review between steps:- [2mcopy-ignored[0m — Copy gitignored files between worktrees- [2mfor-each[0m — [experimental] Run a command in every worktree-[32mSee also+[1m[32mSee also- [2mwt merge[0m — Runs commit → squash → rebase → hooks → push → cleanup automatically- [2mwt hook[0m — Run configured hooksdiff --git a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap b/tests/snapshots/integration__integration_tests__help__help_switch_long.snapindex 14ad9bbdc..20dc161c4 100644--- a/tests/snapshots/integration__integration_tests__help__help_switch_long.snap+++ b/tests/snapshots/integration__integration_tests__help__help_switch_long.snap@@ -86,18 +86,18 @@ Usage: [1m[36mwt switch[0m [36m[OPTIONS][0m [36m<BRANCH>[0m [1m[36m[--Worktrees are addressed by branch name; paths are computed from a configurable template. Unlike [2mgit switch[0m, this navigates between worktrees rather than changing branches in place.-[32mExamples+[1m[32mExamples[2mwt switch feature-auth # Switch to worktree[2mwt switch - # Previous worktree (like cd -)[2mwt switch --create new-feature # Create new branch and worktree[2mwt switch --create hotfix --base production-[32mCreating a branch+[1m[32mCreating a branchThe [2m--create[0m flag creates a new branch from the [2m--base[0m branch (defaults to default branch). Without [2m--create[0m, the branch must already exist.-[32mCreating worktrees+[1m[32mCreating worktreesIf the branch already has a worktree, [2mwt switch[0m changes directories to it. Otherwise, it creates one, running hooks.@@ -113,7 +113,7 @@ When creating a worktree, worktrunk:[2mwt switch --create fix --base release # New branch from release[2mwt switch --create temp --no-verify # Skip hooks-[32mShortcuts+[1m[32mShortcutsShortcut Meaning──────── ─────────────────────────────@@ -125,7 +125,7 @@ When creating a worktree, worktrunk:[2mwt switch ^ # Default branch worktree[2mwt switch --create fix --base=@ # Branch from current HEAD-[32mWhen wt switch fails+[1m[32mWhen wt switch fails- [1mBranch doesn't exist[0m — Use [2m--create[0m, or check [2mwt list --branches- [1mPath occupied[0m — Another worktree is at the target path; switch to it or remove it@@ -133,7 +133,7 @@ When creating a worktree, worktrunk:To change which branch a worktree is on, use [2mgit switch[0m inside that worktree.-[32mSee also+[1m[32mSee also- [2mwt select[0m — Interactive worktree selection- [2mwt list[0m — View all worktrees