Skip to content

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

docs: add at-a-glance examples to config documentation (#826)

Maximilian Rooseafbb9ee3c50
diff --git a/.claude-plugin/skills/worktrunk/reference/config.md b/.claude-plugin/skills/worktrunk/reference/config.md
index f5d3cc522..57413422a 100644
--- a/.claude-plugin/skills/worktrunk/reference/config.md
+++ b/.claude-plugin/skills/worktrunk/reference/config.md
@@ -35,6 +35,28 @@ wt config show
| **User config** | `~/.config/worktrunk/config.toml` | Worktree path template, LLM commit configs, etc | ✗ |
| **Project config** | `.config/wt.toml` | Project hooks, dev server URL | ✓ |
+**User config** — personal preferences:
+
+```toml
+# ~/.config/worktrunk/config.toml
+worktree-path = ".worktrees/{{ branch | sanitize }}"
+
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+**Project config** — shared team settings:
+
+```toml
+# .config/wt.toml
+[post-create]
+deps = "npm ci"
+
+[pre-merge]
+test = "npm test"
+```
+
---
<!-- USER_CONFIG_START -->
diff --git a/docs/content/config.md b/docs/content/config.md
index 44ea4a997..4744f600f 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -43,6 +43,28 @@ wt config show
| **User config** | `~/.config/worktrunk/config.toml` | Worktree path template, LLM commit configs, etc | ✗ |
| **Project config** | `.config/wt.toml` | Project hooks, dev server URL | ✓ |
+**User config** — personal preferences:
+
+```toml
+# ~/.config/worktrunk/config.toml
+worktree-path = ".worktrees/{{ branch | sanitize }}"
+
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+**Project config** — shared team settings:
+
+```toml
+# .config/wt.toml
+[post-create]
+deps = "npm ci"
+
+[pre-merge]
+test = "npm test"
+```
+
---
<!-- USER_CONFIG_START -->
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index c25961e04..d084c627b 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1498,6 +1498,28 @@ wt config show
| **User config** | `~/.config/worktrunk/config.toml` | Worktree path template, LLM commit configs, etc | ✗ |
| **Project config** | `.config/wt.toml` | Project hooks, dev server URL | ✓ |
+**User config** — personal preferences:
+
+```toml
+# ~/.config/worktrunk/config.toml
+worktree-path = ".worktrees/{{ branch | sanitize }}"
+
+[commit-generation]
+command = "llm"
+args = ["-m", "claude-haiku-4.5"]
+```
+
+**Project config** — shared team settings:
+
+```toml
+# .config/wt.toml
+[post-create]
+deps = "npm ci"
+
+[pre-merge]
+test = "npm test"
+```
+
---
<!-- USER_CONFIG_START -->
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 c77dee88f..b21f830c1 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -75,6 +75,24 @@ 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 ✓
+User config — personal preferences:
+
+ # ~/.config/worktrunk/config.toml
+ worktree-path = ".worktrees/{{ branch | sanitize }}"
+ 
+ [commit-generation]
+ command = "llm"
+ args = ["-m", "claude-haiku-4.5"]
+
+Project config — shared team settings:
+
+ # .config/wt.toml
+ [post-create]
+ deps = "npm ci"
+ 
+ [pre-merge]
+ test = "npm test"
+
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Worktrunk User Configuration