Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Restore visual hierarchy for help headers (#638)

Maximilian Roos93acd3531cd0
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.md
index 78619d2ff..1b92daa51 100644
--- a/.claude-plugin/skills/worktrunk/reference/config.md
+++ b/.claude-plugin/skills/worktrunk/reference/config.md
@@ -78,7 +78,31 @@ worktree-path = "../worktrees/{{ repo }}/{{ branch | sanitize }}"
worktree-path = "../{{ branch | sanitize }}"
```
-## List command defaults
+## LLM commit messages
+
+Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+
+Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
+
+```toml
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+Using [aichat](https://github.com/sigoden/aichat):
+
+```toml
+[commit-generation]
+command = "aichat"
+args = ["-m", "claude:claude-haiku-4.5"]
+```
+
+See [Custom prompt templates](#custom-prompt-templates) for inline template options.
+
+## Commands
+
+### List
Persistent flag values for `wt list`. Override on command line as needed.
@@ -89,7 +113,7 @@ branches = false # Include branches without worktrees (--branches)
remotes = false # Include remote-only branches (--remotes)
```
-## Commit defaults
+### Commit
Shared by `wt step commit`, `wt step squash`, and `wt merge`.
@@ -98,7 +122,7 @@ Shared by `wt step commit`, `wt step squash`, and `wt merge`.
stage = "all" # What to stage before commit: "all", "tracked", or "none"
```
-## Merge command defaults
+### Merge
All flags are on by default. Set to false to change default behavior.
@@ -111,7 +135,7 @@ remove = true # Remove worktree after merge (--no-remove to keep)
verify = true # Run project hooks (--no-verify to skip)
```
-## Select command defaults
+### Select
Pager behavior for `wt select` diff previews.
@@ -123,29 +147,7 @@ Pager behavior for `wt select` diff previews.
# pager = "delta --paging=never"
```
-## LLM commit messages
-
-Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
-
-Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
-
-```toml
-[commit-generation]
-command = "llm"
-args = ["-m", "claude-haiku-4.5"]
-```
-
-Using [aichat](https://github.com/sigoden/aichat):
-
-```toml
-[commit-generation]
-command = "aichat"
-args = ["-m", "claude:claude-haiku-4.5"]
-```
-
-See [Custom Prompt Templates](#custom-prompt-templates) for inline template options.
-
-## Approved commands
+### Approved commands
Commands approved for project hooks. Auto-populated when approving hooks on first run, or via `wt hook approvals add`.
@@ -156,11 +158,11 @@ approved-commands = ["npm ci", "npm test"]
For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at `<repo>/.config/wt.toml`. Run `wt config create --project` to create one, or see <https://worktrunk.dev/hook/>.
-## Custom prompt templates
+### Custom prompt templates
Templates use [minijinja](https://docs.rs/minijinja/) syntax.
-### Commit template
+#### Commit template
Available variables:
@@ -206,7 +208,7 @@ Branch: {{ branch }}
```
<!-- DEFAULT_TEMPLATE_END -->
-### Squash template
+#### Squash template
Available variables (in addition to commit template variables):
@@ -251,7 +253,7 @@ Combine these commits into a single commit message.
---
-## Project config
+## Worktrunk Project Configuration
The project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.
diff --git a/dev/config.example.toml b/dev/config.example.toml
index 014d621a9..f0a4160cb 100644
--- a/dev/config.example.toml
+++ b/dev/config.example.toml
@@ -36,7 +36,27 @@
# # Creates: ~/code/project/feature-auth (sibling to .git)
# worktree-path = "../{{ branch | sanitize }}"
#
-# ## List command defaults
+# ## LLM commit messages
+#
+# Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+#
+# Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
+#
+# [commit-generation]
+# command = "llm"
+# args = ["-m", "claude-haiku-4.5"]
+#
+# Using [aichat](https://github.com/sigoden/aichat):
+#
+# [commit-generation]
+# command = "aichat"
+# args = ["-m", "claude:claude-haiku-4.5"]
+#
+# See [Custom prompt templates](#custom-prompt-templates) for inline template options.
+#
+# ## Commands
+#
+# ### List
#
# Persistent flag values for `wt list`. Override on command line as needed.
#
@@ -45,14 +65,14 @@
# branches = false # Include branches without worktrees (--branches)
# remotes = false # Include remote-only branches (--remotes)
#
-# ## Commit defaults
+# ### Commit
#
# Shared by `wt step commit`, `wt step squash`, and `wt merge`.
#
# [commit]
# stage = "all" # What to stage before commit: "all", "tracked", or "none"
#
-# ## Merge command defaults
+# ### Merge
#
# All flags are on by default. Set to false to change default behavior.
#
@@ -63,7 +83,7 @@
# remove = true # Remove worktree after merge (--no-remove to keep)
# verify = true # Run project hooks (--no-verify to skip)
#
-# ## Select command defaults
+# ### Select
#
# Pager behavior for `wt select` diff previews.
#
@@ -73,25 +93,7 @@
# # Example:
# # pager = "delta --paging=never"
#
-# ## LLM commit messages
-#
-# Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
-#
-# Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
-#
-# [commit-generation]
-# command = "llm"
-# args = ["-m", "claude-haiku-4.5"]
-#
-# Using [aichat](https://github.com/sigoden/aichat):
-#
-# [commit-generation]
-# command = "aichat"
-# args = ["-m", "claude:claude-haiku-4.5"]
-#
-# See [Custom Prompt Templates](#custom-prompt-templates) for inline template options.
-#
-# ## Approved commands
+# ### Approved commands
#
# Commands approved for project hooks. Auto-populated when approving hooks on first run, or via `wt hook approvals add`.
#
@@ -100,11 +102,11 @@
#
# For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at `<repo>/.config/wt.toml`. Run `wt config create --project` to create one, or see <https://worktrunk.dev/hook/>.
#
-# ## Custom prompt templates
+# ### Custom prompt templates
#
# Templates use [minijinja](https://docs.rs/minijinja/) syntax.
#
-# ### Commit template
+# #### Commit template
#
# Available variables:
#
@@ -148,7 +150,7 @@
# """
# <!-- DEFAULT_TEMPLATE_END -->
#
-# ### Squash template
+# #### Squash template
#
# Available variables (in addition to commit template variables):
#
diff --git a/docs/content/config.md b/docs/content/config.md
index 25cc6e1e4..746d66312 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -86,7 +86,31 @@ worktree-path = "../worktrees/{{ repo }}/{{ branch | sanitize }}"
worktree-path = "../{{ branch | sanitize }}"
```
-## List command defaults
+## LLM commit messages
+
+Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+
+Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
+
+```toml
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+Using [aichat](https://github.com/sigoden/aichat):
+
+```toml
+[commit-generation]
+command = "aichat"
+args = ["-m", "claude:claude-haiku-4.5"]
+```
+
+See [Custom prompt templates](#custom-prompt-templates) for inline template options.
+
+## Commands
+
+### List
Persistent flag values for `wt list`. Override on command line as needed.
@@ -97,7 +121,7 @@ branches = false # Include branches without worktrees (--branches)
remotes = false # Include remote-only branches (--remotes)
```
-## Commit defaults
+### Commit
Shared by `wt step commit`, `wt step squash`, and `wt merge`.
@@ -106,7 +130,7 @@ Shared by `wt step commit`, `wt step squash`, and `wt merge`.
stage = "all" # What to stage before commit: "all", "tracked", or "none"
```
-## Merge command defaults
+### Merge
All flags are on by default. Set to false to change default behavior.
@@ -119,7 +143,7 @@ remove = true # Remove worktree after merge (--no-remove to keep)
verify = true # Run project hooks (--no-verify to skip)
```
-## Select command defaults
+### Select
Pager behavior for `wt select` diff previews.
@@ -131,29 +155,7 @@ Pager behavior for `wt select` diff previews.
# pager = "delta --paging=never"
```
-## LLM commit messages
-
-Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
-
-Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
-
-```toml
-[commit-generation]
-command = "llm"
-args = ["-m", "claude-haiku-4.5"]
-```
-
-Using [aichat](https://github.com/sigoden/aichat):
-
-```toml
-[commit-generation]
-command = "aichat"
-args = ["-m", "claude:claude-haiku-4.5"]
-```
-
-See [Custom Prompt Templates](#custom-prompt-templates) for inline template options.
-
-## Approved commands
+### Approved commands
Commands approved for project hooks. Auto-populated when approving hooks on first run, or via `wt hook approvals add`.
@@ -164,11 +166,11 @@ approved-commands = ["npm ci", "npm test"]
For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at `<repo>/.config/wt.toml`. Run `wt config create --project` to create one, or see <https://worktrunk.dev/hook/>.
-## Custom prompt templates
+### Custom prompt templates
Templates use [minijinja](https://docs.rs/minijinja/) syntax.
-### Commit template
+#### Commit template
Available variables:
@@ -214,7 +216,7 @@ Branch: {{ branch }}
```
<!-- DEFAULT_TEMPLATE_END -->
-### Squash template
+#### Squash template
Available variables (in addition to commit template variables):
@@ -259,7 +261,7 @@ Combine these commits into a single commit message.
---
-## Project config
+## Worktrunk Project Configuration
The project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 35ec89a83..e0ffd63a8 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1478,7 +1478,31 @@ worktree-path = "../worktrees/{{ repo }}/{{ branch | sanitize }}"
worktree-path = "../{{ branch | sanitize }}"
```
-## List command defaults
+## LLM commit messages
+
+Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+
+Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
+
+```toml
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+Using [aichat](https://github.com/sigoden/aichat):
+
+```toml
+[commit-generation]
+command = "aichat"
+args = ["-m", "claude:claude-haiku-4.5"]
+```
+
+See [Custom prompt templates](#custom-prompt-templates) for inline template options.
+
+## Commands
+
+### List
Persistent flag values for `wt list`. Override on command line as needed.
@@ -1489,7 +1513,7 @@ branches = false # Include branches without worktrees (--branches)
remotes = false # Include remote-only branches (--remotes)
```
-## Commit defaults
+### Commit
Shared by `wt step commit`, `wt step squash`, and `wt merge`.
@@ -1498,7 +1522,7 @@ Shared by `wt step commit`, `wt step squash`, and `wt merge`.
stage = "all" # What to stage before commit: "all", "tracked", or "none"
```
-## Merge command defaults
+### Merge
All flags are on by default. Set to false to change default behavior.
@@ -1511,7 +1535,7 @@ remove = true # Remove worktree after merge (--no-remove to keep)
verify = true # Run project hooks (--no-verify to skip)
```
-## Select command defaults
+### Select
Pager behavior for `wt select` diff previews.
@@ -1523,29 +1547,7 @@ Pager behavior for `wt select` diff previews.
# pager = "delta --paging=never"
```
-## LLM commit messages
-
-Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
-
-Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
-
-```toml
-[commit-generation]
-command = "llm"
-args = ["-m", "claude-haiku-4.5"]
-```
-
-Using [aichat](https://github.com/sigoden/aichat):
-
-```toml
-[commit-generation]
-command = "aichat"
-args = ["-m", "claude:claude-haiku-4.5"]
-```
-
-See [Custom Prompt Templates](#custom-prompt-templates) for inline template options.
-
-## Approved commands
+### Approved commands
Commands approved for project hooks. Auto-populated when approving hooks on first run, or via `wt hook approvals add`.
@@ -1556,11 +1558,11 @@ approved-commands = ["npm ci", "npm test"]
For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at `<repo>/.config/wt.toml`. Run `wt config create --project` to create one, or see <https://worktrunk.dev/hook/>.
-## Custom prompt templates
+### Custom prompt templates
Templates use [minijinja](https://docs.rs/minijinja/) syntax.
-### Commit template
+#### Commit template
Available variables:
@@ -1606,7 +1608,7 @@ Branch: {{ branch }}
```
<!-- DEFAULT_TEMPLATE_END -->
-### Squash template
+#### Squash template
Available variables (in addition to commit template variables):
@@ -1651,7 +1653,7 @@ Combine these commits into a single commit message.
---
-## Project config
+## Worktrunk Project Configuration
The project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.
diff --git a/src/md_help.rs b/src/md_help.rs
index 14037ffa2..7606250fb 100644
--- a/src/md_help.rs
+++ b/src/md_help.rs
@@ -87,19 +87,35 @@ pub(crate) fn render_markdown_in_help_with_width(help: &str, width: Option<usize
continue;
}
- // Horizontal rules (---, ***, ___) render as blank line for visual separation
+ // Horizontal rules (---, ***, ___) render as visible divider
+ // No extra newlines - markdown source already has blank lines around ---
+ //
+ // TODO: We use `---` dividers instead of H1 headers because H1s break web docs
+ // (pages already have a title from frontmatter). This decouples visual hierarchy
+ // from heading semantics. Alternatives considered:
+ // - Strip H1s during doc sync (demote to H2 for web)
+ // - Treat `---` + H2 combo as "major section" (render H2 as UPPERCASE when preceded by ---)
+ // - Use marker comments like `<!-- major -->` before H2
+ // See git history for discussion.
if trimmed == "---" || trimmed == "***" || trimmed == "___" {
- result.push('\n');
+ let dimmed = Style::new().dimmed();
+ let rule_width = width.unwrap_or(40);
+ let rule: String = "─".repeat(rule_width);
+ result.push_str(&format!("{dimmed}{rule}{dimmed:#}\n"));
i += 1;
continue;
}
// Outside code blocks, render markdown headers (never wrapped)
- // Visual hierarchy: H1 > H2 > H3
+ // Visual hierarchy: H1 > H2 > H3 > H4
// - 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("### ") {
+ // - H4: Bold (nested subsections like "Commit template")
+ 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()
@@ -516,11 +532,21 @@ mod tests {
assert!(!result.contains("\u{1b}[1m")); // Not bold
}
+ #[test]
+ fn test_render_markdown_in_help_h4() {
+ let result = render_markdown_in_help("#### Nested");
+ // H4 should be bold (no color)
+ assert!(result.contains("Nested"));
+ assert!(result.contains("\u{1b}[1m")); // Bold
+ assert!(!result.contains("\u{1b}[32m")); // Not green
+ }
+
#[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 ---
+ // Horizontal rule becomes visible divider line
assert!(!result.contains("---"));
+ assert!(result.contains("────────────────────────────────────────"));
assert!(result.contains("before"));
assert!(result.contains("Section"));
}
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_create.snap b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
index 6f7443af8..a1ef70adf 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -84,7 +84,27 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# # Creates: ~/code/project/feature-auth (sibling to .git)
# worktree-path = "../{{ branch | sanitize }}"
#
- # ## List command defaults
+ # ## LLM commit messages
+ #
+ # Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+ #
+ # Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
+ #
+ # [commit-generation]
+ # command = "llm"
+ # args = ["-m", "claude-haiku-4.5"]
+ #
+ # Using [aichat](https://github.com/sigoden/aichat):
+ #
+ # [commit-generation]
+ # command = "aichat"
+ # args = ["-m", "claude:claude-haiku-4.5"]
+ #
+ # See [Custom prompt templates](#custom-prompt-templates) for inline template options.
+ #
+ # ## Commands
+ #
+ # ### List
#
# Persistent flag values for `wt list`. Override on command line as needed.
#
@@ -93,14 +113,14 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# branches = false # Include branches without worktrees (--branches)
# remotes = false # Include remote-only branches (--remotes)
#
- # ## Commit defaults
+ # ### Commit
#
# Shared by `wt step commit`, `wt step squash`, and `wt merge`.
#
# [commit]
# stage = "all" # What to stage before commit: "all", "tracked", or "none"
#
- # ## Merge command defaults
+ # ### Merge
#
# All flags are on by default. Set to false to change default behavior.
#
@@ -111,7 +131,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# remove = true # Remove worktree after merge (--no-remove to keep)
# verify = true # Run project hooks (--no-verify to skip)
#
- # ## Select command defaults
+ # ### Select
#
# Pager behavior for `wt select` diff previews.
#
@@ -121,25 +141,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# # Example:
# # pager = "delta --paging=never"
#
- # ## LLM commit messages
- #
- # Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
- #
- # Using [llm](https://github.com/simonw/llm) (install: `pip install llm llm-anthropic`):
- #
- # [commit-generation]
- # command = "llm"
- # args = ["-m", "claude-haiku-4.5"]
- #
- # Using [aichat](https://github.com/sigoden/aichat):
- #
- # [commit-generation]
- # command = "aichat"
- # args = ["-m", "claude:claude-haiku-4.5"]
- #
- # See [Custom Prompt Templates](#custom-prompt-templates) for inline template options.
- #
- # ## Approved commands
+ # ### Approved commands
#
# Commands approved for project hooks. Auto-populated when approving hooks on first run, or via `wt hook approvals add`.
#
@@ -148,11 +150,11 @@ Creates ~/.config/worktrunk/config.toml with the following content:
#
# For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at `<repo>/.config/wt.toml`. Run `wt config create --project` to create one, or see <https://worktrunk.dev/hook/>.
#
- # ## Custom prompt templates
+ # ### Custom prompt templates
#
# Templates use [minijinja](https://docs.rs/minijinja/) syntax.
#
- # ### Commit template
+ # #### Commit template
#
# Available variables:
#
@@ -196,7 +198,7 @@ Creates ~/.config/worktrunk/config.toml with the following content:
# """
# <!-- DEFAULT_TEMPLATE_END -->
#
- # ### Squash template
+ # #### Squash template
#
# Available variables (in addition to commit template variables):
#
diff --git a/tests/snapshots/integration__integration_tests__help__help_config_long.snap b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
index d4c608d58..3c68e4e38 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -71,7 +71,7 @@ Show current configuration and file locations:
User config ~/.config/worktrunk/config.toml Worktree path template, LLM commit configs, etc ✗
Project config .config/wt.toml Project hooks, dev server URL ✓
-
+────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Worktrunk User Configuration
@@ -111,7 +111,27 @@ Controls where new worktrees are created. Paths are relative to the repository r
# Creates: ~/code/project/feature-auth (sibling to .git)
worktree-path = "../{{ branch | sanitize }}"
-List command defaults
+LLM commit messages
+
+Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
+
+Using llm (install: pip install llm llm-anthropic):
+
+ [commit-generation]
+ command = "llm"
+ args = ["-m", "claude-haiku-4.5"]
+
+Using aichat:
+
+ [commit-generation]
+ command = "aichat"
+ args = ["-m", "claude:claude-haiku-4.5"]
+
+See Custom prompt templates for inline template options.
+
+Commands
+
+List
Persistent flag values for wt list. Override on command line as needed.
@@ -120,14 +140,14 @@ Persistent flag values for wt list. Override on command line as needed.
branches = false # Include branches without worktrees (--branches)
remotes = false # Include remote-only branches (--remotes)
-Commit defaults
+Commit
Shared by wt step commit, wt step squash, and wt merge.
[commit]
stage = "all" # What to stage before commit: "all", "tracked", or "none"
-Merge command defaults
+Merge
All flags are on by default. Set to false to change default behavior.
@@ -138,7 +158,7 @@ All flags are on by default. Set to false to change default behavior.
remove = true # Remove worktree after merge (--no-remove to keep)
verify = true # Run project hooks (--no-verify to skip)
-Select command defaults
+Select
Pager behavior for wt select diff previews.
@@ -148,25 +168,7 @@ Pager behavior for wt select diff previews.
# Example:
# pager = "delta --paging=never"
-LLM commit messages
-
-Generate commit messages automatically during merge. Requires an external CLI tool. See <https://worktrunk.dev/llm-commits/> for setup details and template customization.
-
-Using llm (install: pip install llm llm-anthropic):
-
- [commit-generation]
- command = "llm"
- args = ["-m", "claude-haiku-4.5"]
-
-Using aichat:
-
- [commit-generation]
- command = "aichat"
- args = ["-m", "claude:claude-haiku-4.5"]
-
-See Custom Prompt Templates for inline template options.
-
-Approved commands
+Approved commands
Commands approved for project hooks. Auto-populated when approving hooks on first run, or via wt hook approvals add.
@@ -175,11 +177,11 @@ Commands approved for project hooks. Auto-populated when approving hooks on firs
For project-specific hooks (post-create, post-start, pre-merge, etc.), use a project config at <repo>/.config/wt.toml. Run wt config create --project to create one, or see <https://worktrunk.dev/hook/>.
-Custom prompt templates
+Custom prompt templates
Templates use minijinja syntax.
-Commit template
+Commit template
Available variables:
@@ -221,7 +223,7 @@ Default template:

"""
-Squash template
+Squash template
Available variables (in addition to commit template variables):
@@ -259,9 +261,9 @@ Default template:

"""
+────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-
-Project config
+Worktrunk Project Configuration
The project config defines lifecycle hooks and project-specific settings. This file is checked into version control and shared across the team.
@@ -294,7 +296,7 @@ The [ci] section overrides CI platform detection for GitHub Enterprise o
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 integration
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_long.snap b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
index 47eaa3d97..51cab067c 100644
--- a/tests/snapshots/integration__integration_tests__help__help_list_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_list_long.snap
@@ -149,7 +149,7 @@ The Status column has multiple subcolumns. Within each, only the first matching
Rows are dimmed when safe to delete (_ same commit with clean working tree or ⊂ content integrated).
-
+────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
JSON output
diff --git a/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap b/tests/snapshots/integration__integration_tests__help__help_list_narrow_80.snap
index 15d357a87..6c0a4a8d5 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
@@ -164,7 +164,7 @@ symbol is shown (listed in priority order):
Rows are dimmed when safe to delete (_ same commit with clean working tree or ⊂
content integrated).
-
+────────────────────────────────────────────────────────────────────────────────
JSON output