[Question] Is there a way to list all the ports interpolated in the wt.toml file?
We have several ports configured, basically for next and supabase, something like:
env = "cd ./control_plane_ui && echo 'PORT={{ branch | hash_port }}\nNEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:{{ ('supabase-api-' ~ branch) | hash_port }}\nSUPABASE_API_PORT={{ ('supabase-api-' ~ branch) | hash_port }}\nSUPABASE_DB_PORT={{ ('db-' ~ branch) | hash_port }}\nSUPABASE_STUDIO_PORT={{ ('studio-' ~ branch) | hash_port }}' >> .env.local"
It would be ideal to be able to see the ports when running wt list, but I understand that would clutter the view.
How about inside wt config state?
v interesting!
what would you like the view to look like? how about if we allowed arbitrary text in wt list; would they all fit?
we could def put this elsewhere, but maybe we can fit it in
or possibly there's a general solution to allowing status text, either in list or somewhere else
I would love something like the custom format in docker CLI:
$ docker ps --format '{{.Names}}'
supabase_db_control_plane_ui
supabase_studio_control_plane_ui
supabase_pg_meta_control_plane_ui
supabase_rest_control_plane_ui
supabase_kong_control_plane_ui
so you can customize it for your needs.
Or just having it on the JSON output, so I can create an alias/script parsing that output.
we could definitely do something like that
could you try wt list --output=json | jq $expr to try some cases?
(or maybe jq is actually sufficient for that case? would still need to add for the multiple urls case though)
maybe this is some notion of storing arbitrary state per worktree and then being able to display / query it?
maybe this is some notion of storing arbitrary state per worktree and then being able to display / query it?
Yes! I was playing a bit with ideas (while Claude was working on other stuff 😅) and I saw I can do this for all worktrees:
$ wt step for-each -- echo '{{ branch }},{{ branch | hash_port }},{{ ("supabase-api-" ~ branch) | hash_port }},{{ ("db-" ~ branch) | hash_port }}'
◎ Running in main...
main,12107,14260,16406
◎ Running in auto/customizing-tool-parameters...
auto/customizing-tool-parameters,16066,16739,14573
◎ Running in log-alias...
log-alias,19471,18599,17463
but found no way to run it on a single branch.
For us maybe just having the option to run that in a single branch could be enough, but I like the idea of wt config state.
Two draft PRs addressing this:
- #1004 —
wt step evalfor evaluating template expressions on a single branch - #1006 —
wt config state kvfor storing/retrieving arbitrary per-branch data, also available in templates via{{ kv.key }}
Together these cover both computed values (wt step eval '{{ branch | hash_port }}') and stored values (wt config state kv set env staging → {{ kv.env }}).
This was written by Claude Code on behalf of @max-sixty
feedback on those two PR would be v welcome!
Both PRs linked by the maintainer are now merged:
wt step eval(PR #1004) — merged 2026-03-16wt config state vars(PR #1006, commit 69edc3a3) — merged 2026-03-30
Together these provide two ways to access interpolated values: wt step eval '{{ branch | hash_port }}' for computed template values, and wt config state vars for storing/retrieving arbitrary per-branch variables in all template contexts.