Skip to content

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

fix: add hook examples back to project config docs (#1853)

worktrunk-bot09332057f186
diff --git a/dev/wt.example.toml b/dev/wt.example.toml
index 4a142f351..3fbbc14e8 100644
--- a/dev/wt.example.toml
+++ b/dev/wt.example.toml
@@ -8,6 +8,10 @@
#
# Project hooks apply to this repository only. Format is the same as user hooks (https://worktrunk.dev/config/#hooks); see `wt hook --help` for hook types, execution order, and examples.
#
+# pre-start = "npm ci"
+# post-start = "npm run dev"
+# pre-merge = "npm test"
+#
# ## Dev server URL
#
# URL column in `wt list` (dimmed when port not listening):
diff --git a/docs/content/config.md b/docs/content/config.md
index da78e3ee4..9956e4698 100644
--- a/docs/content/config.md
+++ b/docs/content/config.md
@@ -368,6 +368,12 @@ Location: `.config/wt.toml` (checked into version control and shared with the te
Project hooks apply to this repository only. Format is the same as [user hooks](@/config.md#hooks); see `wt hook --help` for hook types, execution order, and examples.
+```toml
+pre-start = "npm ci"
+post-start = "npm run dev"
+pre-merge = "npm test"
+```
+
## Dev server URL
URL column in `wt list` (dimmed when port not listening):
diff --git a/skills/worktrunk/reference/config.md b/skills/worktrunk/reference/config.md
index 75c7e910c..e0ea995c0 100644
--- a/skills/worktrunk/reference/config.md
+++ b/skills/worktrunk/reference/config.md
@@ -367,6 +367,12 @@ Location: `.config/wt.toml` (checked into version control and shared with the te
Project hooks apply to this repository only. Format is the same as [user hooks](https://worktrunk.dev/config/#hooks); see `wt hook --help` for hook types, execution order, and examples.
+```toml
+pre-start = "npm ci"
+post-start = "npm run dev"
+pre-merge = "npm test"
+```
+
## Dev server URL
URL column in `wt list` (dimmed when port not listening):
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 6be4ef867..0c2e40d6e 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1944,6 +1944,12 @@ Location: `.config/wt.toml` (checked into version control and shared with the te
Project hooks apply to this repository only. Format is the same as [user hooks](@/config.md#hooks); see `wt hook --help` for hook types, execution order, and examples.
+```toml
+pre-start = "npm ci"
+post-start = "npm run dev"
+pre-merge = "npm test"
+```
+
## Dev server URL
URL column in `wt list` (dimmed when port not listening):
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 5d9154a25..2ce899a62 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_create.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_create.snap
@@ -330,6 +330,10 @@ With --project, creates .config/wt.toml in the current repositor
  #
  # Project hooks apply to this repository only. Format is the same as user hooks (https://worktrunk.dev/config/#hooks); see `wt hook --help` for hook types, execution order, and examples.
  #
+  # pre-start = "npm ci"
+  # post-start = "npm run dev"
+  # pre-merge = "npm test"
+  #
  # ## Dev server URL
  #
  # URL column in `wt list` (dimmed when port not listening):
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 702a86ad5..558a5a16a 100644
--- a/tests/snapshots/integration__integration_tests__help__help_config_long.snap
+++ b/tests/snapshots/integration__integration_tests__help__help_config_long.snap
@@ -367,6 +367,10 @@ Location: .config/wt.toml (checked into version control and shared with
Project hooks apply to this repository only. Format is the same as user hooks; see wt hook --help for hook types, execution order, and examples.
+  pre-start = "npm ci"
+  post-start = "npm run dev"
+  pre-merge = "npm test"
+
Dev server URL
URL column in wt list (dimmed when port not listening):