Skip to content

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

docs(hook): name the set-vars step in Databases example (#2132)

Maximilian Roosb3b591bc2c9d
diff --git a/docs/content/hook.md b/docs/content/hook.md
index c75113027..aac10f776 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -332,12 +332,12 @@ Each worktree can have its own database. A pipeline sets up the container name a
```toml
post-start = [
- """
+ { set-vars = """
wt config state vars set \
container='{{ repo }}-{{ branch | sanitize }}-postgres' \
port='{{ ('db-' ~ branch) | hash_port }}' \
db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
- """,
+ """ },
{ db = """
docker run -d --rm \
--name {{ vars.container }} \
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index 81af74ec7..50f562ca7 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -330,12 +330,12 @@ Each worktree can have its own database. A pipeline sets up the container name a
```toml
post-start = [
- """
+ { set-vars = """
wt config state vars set \
container='{{ repo }}-{{ branch | sanitize }}-postgres' \
port='{{ ('db-' ~ branch) | hash_port }}' \
db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
- """,
+ """ },
{ db = """
docker run -d --rm \
--name {{ vars.container }} \
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index a972936aa..e71b370a1 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1519,12 +1519,12 @@ Each worktree can have its own database. A pipeline sets up the container name a
```toml
post-start = [
- """
+ { set-vars = """
wt config state vars set \
container='{{ repo }}-{{ branch | sanitize }}-postgres' \
port='{{ ('db-' ~ branch) | hash_port }}' \
db_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
- """,
+ """ },
{ db = """
docker run -d --rm \
--name {{ vars.container }} \