Release Notes
Improved
-
Hooks accept the same
--KEY=VALUEsmart routing as aliases:wt hook pre-merge --branch=foo --yesbinds{{ branch }}when the template references it; unreferenced--KEY=VALUEtokens and everything after--forward as{{ args }}, now available in hook templates.wt hook --helplists every hook type.--var KEY=VALUEstill works but emits a deprecation warning pointing at the new form. (#2313) -
-vprints resolved template variables for every hook and alias: Before each◎ Running …line,wtshows atemplate variables:block listing every variable in scope for that hook type or alias and the value it resolved to for this invocation. Vars in scope but unpopulated render as(unset)— which is how e.g.target_worktree_pathsurfaces duringwt switch -on hooks that don't receive it. Aliasargsrenders shell-escaped so the table matches what{{ args }}substitutes below. Works in foreground, background hook pipelines, and alias expansion. (#2316, #2324, #2328, thanks @nicolasff for reporting #2309) -
O(1) upstream lookup in alias/hook template context:
Branch::upstream()triggered afor-each-refscanning every local branch — amortized across bulk consumers likewt list, but wasted work for alias/hook template dispatch, which only needs the current branch. A newupstream_single()runs a scopedfor-each-ref refs/heads/<branch>, so the parent-side alias dispatch is fully O(1) in branch count. Noticeable on machines with slow fork cost (macOS Gatekeeper, AV, slow FS). (#2337, thanks @markjaquith for reporting #2322)
Fixed
-
Symbolic switch targets (
-,@,^) resolve before pre-switch hooks fire:wt switch -previously built the pre-switch hook context from the raw-argument, so{{ target }}and{{ target_worktree_path }}were wrong or unset. Symbolic targets are now resolved to the concrete branch name before the hook context is built, so hooks see the destination worktree correctly. (#2310, thanks @nicolasff for reporting #2309) -
Typo errors across
wt,wt step, andwt config alias show/dry-runshare one format: Four typo surfaces previously split across clap-nativeerror:/tip:output (exit 2) and custom anyhow gutters (exit 1). All four now render the same clap-native layout —config alias show/dry-runsay "alias" / "aliases" instead of "subcommand" / "subcommands" since the positional is an alias name. Thewt <typo>andwt step <typo>paths also now runfinish_commandcleanup, so diagnostic dumps and ANSI resets still fire. (#2306, #2307, #2308)
Documentation
-
Extending and hook guides consolidated: Recipes on
extending.mdandhook.mdwere trimmed, overlapping sections (pre-start vs post-start, copy-ignored variants, pipeline forms) folded together, template-engine scope clarified, and dev-server / database / target-specific hook recipes moved to Tips & Patterns. (#2314, #2315, #2317, #2318, #2319, #2321, #2323, #2326, #2329, #2333) -
Render fixes: Tables inside
<details>blocks pick up the site's table styling (#2325); alternate pages excluded from the sitemap with trailing slashes on nav links (#2320); the[Aliases]help link renamed to[Extending Worktrunk guide]so it reads as a doc pointer rather than a self-reference in terminal help (#2330).
Internal
- Zola link regex handles code spans in link text: The skill-sync regex rejected
[`…code…`](@/…)links, silently shipping dead@/…mdreferences into skill reference files. The regex now balances code spans, and a post-transform guardrail panics on any leftover@/…mdso future misses fail loudly. (#2327)
Install worktrunk 0.41.0
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/max-sixty/worktrunk/releases/download/v0.41.0/worktrunk-installer.sh | sh && wt config shell installInstall prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://github.com/max-sixty/worktrunk/releases/download/v0.41.0/worktrunk-installer.ps1 | iex"; git-wt config shell installInstall prebuilt binaries via Homebrew
brew install worktrunk && wt config shell installDownload worktrunk 0.41.0
| File | Platform | Checksum |
|---|---|---|
| worktrunk-aarch64-apple-darwin.tar.xz | Apple Silicon macOS | checksum |
| worktrunk-x86_64-apple-darwin.tar.xz | Intel macOS | checksum |
| worktrunk-x86_64-pc-windows-msvc.zip | x64 Windows | checksum |
| worktrunk-aarch64-unknown-linux-musl.tar.xz | ARM64 MUSL Linux | checksum |
| worktrunk-x86_64-unknown-linux-musl.tar.xz | x64 MUSL Linux | checksum |
Install via Cargo
cargo install worktrunk && wt config shell installInstall via Winget (Windows)
winget install max-sixty.worktrunk && git-wt config shell installInstall via AUR (Arch Linux)
paru worktrunk-bin && wt config shell install