Skip to content

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

fix: use underscores in db_url var key examples (#1848)

Maximilian Roos0d7fe83130fd
diff --git a/docs/content/hook.md b/docs/content/hook.md
index a90ebc2b9..8a2d79c2a 100644
--- a/docs/content/hook.md
+++ b/docs/content/hook.md
@@ -341,7 +341,7 @@ post-start = [
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_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
""",
{ db = """
docker run -d --rm \
@@ -361,7 +361,7 @@ The first pipeline step derives names and ports from the branch name and stores
The connection string is accessible anywhere — not just in hooks:
-{{ terminal(cmd="DATABASE_URL=$(wt config state vars get db-url) npm start") }}
+{{ terminal(cmd="DATABASE_URL=$(wt config state vars get db_url) npm start") }}
## Progressive validation
diff --git a/docs/content/tips-patterns.md b/docs/content/tips-patterns.md
index 9d8307d32..4ce022d35 100644
--- a/docs/content/tips-patterns.md
+++ b/docs/content/tips-patterns.md
@@ -73,7 +73,7 @@ post-start = [
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_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
""",
{ db = """
docker run -d --rm \
@@ -95,7 +95,7 @@ The `('db-' ~ branch)` concatenation hashes differently than plain `branch`, so
The connection string is accessible anywhere — not just in hooks:
-{{ terminal(cmd="DATABASE_URL=$(wt config state vars get db-url) npm start") }}
+{{ terminal(cmd="DATABASE_URL=$(wt config state vars get db_url) npm start") }}
## Local CI gate
diff --git a/skills/worktrunk/reference/hook.md b/skills/worktrunk/reference/hook.md
index 980983e9e..2ed4d31ef 100644
--- a/skills/worktrunk/reference/hook.md
+++ b/skills/worktrunk/reference/hook.md
@@ -339,7 +339,7 @@ post-start = [
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_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
""",
{ db = """
docker run -d --rm \
@@ -360,7 +360,7 @@ The first pipeline step derives names and ports from the branch name and stores
The connection string is accessible anywhere — not just in hooks:
```bash
-$ DATABASE_URL=$(wt config state vars get db-url) npm start
+$ DATABASE_URL=$(wt config state vars get db_url) npm start
```
## Progressive validation
diff --git a/skills/worktrunk/reference/tips-patterns.md b/skills/worktrunk/reference/tips-patterns.md
index e6b1e0e12..647cdec71 100644
--- a/skills/worktrunk/reference/tips-patterns.md
+++ b/skills/worktrunk/reference/tips-patterns.md
@@ -66,7 +66,7 @@ post-start = [
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_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
""",
{ db = """
docker run -d --rm \
@@ -89,7 +89,7 @@ The `('db-' ~ branch)` concatenation hashes differently than plain `branch`, so
The connection string is accessible anywhere — not just in hooks:
```bash
-$ DATABASE_URL=$(wt config state vars get db-url) npm start
+$ DATABASE_URL=$(wt config state vars get db_url) npm start
```
## Local CI gate
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index d50127399..19c4f448f 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1452,7 +1452,7 @@ post-start = [
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_url='postgres://postgres:dev@localhost:{{ ('db-' ~ branch) | hash_port }}/{{ branch | sanitize_db }}'
""",
{ db = """
docker run -d --rm \
@@ -1473,7 +1473,7 @@ The first pipeline step derives names and ports from the branch name and stores
The connection string is accessible anywhere — not just in hooks:
```console
-$ DATABASE_URL=$(wt config state vars get db-url) npm start
+$ DATABASE_URL=$(wt config state vars get db_url) npm start
```
## Progressive validation