Skip to content

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

Simplify demo hooks and remove redundant commands

Maximilian Roos3e2a79adb5cf
diff --git a/docs/demos/build b/docs/demos/build
index 7e55ef445..383a29658 100755
--- a/docs/demos/build
+++ b/docs/demos/build
@@ -87,19 +87,13 @@ args = ["-m", "claude-haiku-4.5"]
def prepare_docs_core(env: DemoEnv):
"""Set up repo for docs wt-core demo with hooks and billing branch."""
hooks_config = '''[post-start]
-deps = "npm install"
-build = "npm run build"
-dev = "npm run dev"
-db = "docker compose up -d postgres"
+dev = "npm run dev -- --port {{ branch | hash_port }}"
[pre-remove]
cleanup = "flyctl scale count 0"
'''
prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)
- _write_user_config(env, [
- "npm install", "npm run build", "npm run dev",
- "docker compose up -d postgres", "flyctl scale count 0"
- ])
+ _write_user_config(env, ["npm run dev -- --port {{ branch | hash_port }}", "flyctl scale count 0"])
_add_billing_branch(env)
@@ -118,13 +112,13 @@ def prepare_docs_select(env: DemoEnv):
def prepare_twitter_core(env: DemoEnv):
"""Standard setup with hooks config for most Twitter demos."""
hooks_config = '''[post-start]
-dev = "npm run dev"
+dev = "npm run dev -- --port {{ branch | hash_port }}"
[pre-remove]
cleanup = "flyctl scale count 0"
'''
prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)
- _write_user_config(env, ["npm run dev", "flyctl scale count 0"])
+ _write_user_config(env, ["npm run dev -- --port {{ branch | hash_port }}", "flyctl scale count 0"])
_add_billing_branch(env)
@@ -164,13 +158,13 @@ def prepare_twitter_hooks(env: DemoEnv):
"""Setup for wt-hooks demo - more hooks to showcase the feature."""
hooks_config = '''[post-start]
deps = "npm install"
-dev = "npm run dev"
+dev = "npm run dev -- --port {{ branch | hash_port }}"
[pre-remove]
cleanup = "flyctl scale count 0"
'''
prepare_demo_repo(env, REPO_ROOT, hooks_config=hooks_config)
- _write_user_config(env, ["npm install", "npm run dev", "flyctl scale count 0"])
+ _write_user_config(env, ["npm install", "npm run dev -- --port {{ branch | hash_port }}", "flyctl scale count 0"])
_add_billing_branch(env)
diff --git a/docs/demos/tapes/wt-core.tape b/docs/demos/tapes/wt-core.tape
index 6cb475005..1f8ed720c 100644
--- a/docs/demos/tapes/wt-core.tape
+++ b/docs/demos/tapes/wt-core.tape
@@ -52,27 +52,22 @@ Type "wt switch alpha"
Enter
Sleep 1s
-# 3. Show the hooks config (bat syntax highlighting via cat wrapper)
-Type "cat .config/wt.toml"
-Enter
-Sleep 2s
-
-# 4. Create new worktree with post-start
+# 3. Create new worktree with post-start
Type "wt switch --create api"
Enter
Sleep 2.5s
-# 5. Show full list with CI status
+# 4. Show full list with CI status
Type "wt list --full"
Enter
Sleep 3s
-# 6. Switch to billing (already merged)
+# 5. Switch to billing (already merged)
Type "wt switch billing"
Enter
Sleep 1.5s
-# 7. Remove the merged worktree (pre-remove hook runs)
+# 6. Remove the merged worktree (pre-remove hook runs)
Type "wt remove"
Enter
Sleep 5s