Repository navigation
Releases: cruzzed/wtbs
Release list
0.5.1 — issue sweep: env strap double-run, valet parked-path symlinks
Fixes from v0.5.0 dogfooding. Suite: 165/165 bats green.
Fixed
- #18 — declaring the project env strap in
straps:ran it twice per lifecycle (and fataled dry-run on fresh projects). The core-managedenvstrap is now filtered from the declared-strap resolution with a warning;run_env_strapremains its single runner. - #19 — the valet strap's short-name symlink landed in
dirname(worktree), which valet never scans when repos are reached through a symlink in a parked dir.valet-sitenow discovers the parked path that serves the main repo from the valet config'spaths[]and places/removes the symlink there (falling back to the worktree parent;unsecurecleans both locations).
Verified / closed
- #17 —
destroyalready removes the per-branch state file and registry row; a regression test pins it. Residue on the reporter's synced tree came from their sync setup (deletions resurrected) — closed as an environment quirk. - #13 — long valet names taking nginx down was fixed in 0.4.0 by
valet-site's deterministic short-name truncation; closing as completed.
0.5 — straps own env writing; copy becomes a residue mirror
Breaking clean break from the 0.4 config surface (ADRs 0007–0008). Suite: 159 bats tests green.
Env writing moves to straps (ADR-0007)
- The
env:block is deleted from the core config. Straps own every .env write, via the new core-lent helpers (source "$WTBS_LIB_DIR/strap-lib.sh"):wtbs_env_set,wtbs_state_set,wtbs_state_get— all dry-run aware. - Bundled db straps write
DB_DATABASEdirectly; the project's own keys belong to the project env strap (.wtbs/straps/env/, scaffolded automatically). - On activation, activated bundled straps are published into the project's
.wtbs/straps/— the project owns its copies; bundled becomes seed material. Skip with--no-publish/publish: false.
Copy becomes a git-aware residue mirror (ADR-0008)
copy: [file, …]lists are gone. All untracked files (including gitignored ones like.env) mirror from the main repo into the worktree, seed-only (never overwrites).- Exclusions via
copy.ignore:in the yml and/or a.wtbsignorefile (gitignore-style, both honored)..gitand.wtbs/always skipped.
Migrating from 0.4: env: entries become wtbs_env_set lines in .wtbs/straps/env/create; drop your copy: list and add copy.ignore: for node_modules/vendor/… instead. Legacy keys fail fast with pointers.
0.4 — straps are self-contained directories
Clean-break rewrite around the strap model (ADRs 0001–0006):
- Technology-blind core: the core owns nouns (worktree, branch, names, state), never verbs — anything stack-specific lives in straps.
- Straps are self-contained directories (scripts + private strap.yml), activated by name with optional params:
straps: [valet, "auto-ports(serve:8000)"]. - Ports de-cored into the auto-ports strap; the offset column left the core registry.
- One-directional attachment: the boot attaches to the project, never vice versa.
- Renamed worktree-bootstrap → wtbs (transitional shim installed).
Note: tagged retroactively — 0.4 shipped on the v0.4 branch without a release.
0.3
What's new
exec: run commands inside a worktree from the main repo
worktree-bootstrap feature/x test # shorthand
worktree-bootstrap exec feature/x runserver # explicit form
worktree-bootstrap exec feature/x # list presets + aliasesCommands run with the worktree as cwd, its .env exported, and its .venv/bin / vendor/bin / node_modules/.bin on PATH. Exit codes propagate — composes with scripts, CI, and coding agents driving many worktrees in parallel.
Resolution order:
.wtbs/<name>preset script (Django-management-command style; worktree checkout shadows the main repo's). Extra args arrive as"$@"; the template context is exported asWTBS_*env vars (WTBS_PORT_SERVE,WTBS_DB_NAME,WTBS_SITE, …) instead of template rendering, and trailing CR is stripped socore.autocrlf=truecheckouts can't corrupt presets.aliases:one-liners in.worktree-bootstrap.yml, rendered with the same template tokens ascommands.*; extra args appended.- Raw command run verbatim (still template-rendered).
Other changes
- For
exec/shorthand, global flags (--dry-run,--main-repo,--config) must come before the worktree name; everything after passes through verbatim. - README: project vision ("make worktrees as convenient as working in the parent project") and the agentic parallel-development use case.
- Examples and built-in defaults scrubbed of project-specific details:
examples/pixalink.yml→ genericlaravel.yml,archive/removed,copy_from_maindefaults to just.env,name_prefixdefault changedexplore_→wt_. - 15 new bats tests; full suite green (94/94).
Full Changelog: v0.2.0...v0.3.0
0.2
Summary
Release 0.2 — resolves all nine open issues.
- #1 —
createcreates the branch when it doesn't exist yet (git worktree add -b), with optional--base <ref>and a clear info message - #2 — scriptable DB lifecycle:
database.create/database.dropcommands (rendered with the full template context) replace driver dispatch when present; first-classdriver: nonedisables DB handling silently; unknown drivers fail cleanly instead ofcommand not found - #3 —
create --dry-runrenders the full plan: resolved driver, db name, renderedenv_updates, allocated offset/ports, and every install/build/serve/destroy command — with no side effects (registry untouched) - #4 — global flags accepted in any position (
create --dry-run feature/xworks) - #5 — report reflects what actually happened: skipped DB steps shown as
skipped (<reason>), unreferenced ports grouped as allocated-but-unused;name_prefixdefault documented - #6 — no unconditional Laravel env keys:
APP_PORT/FORWARD_DB_PORT/VITE_PORTonly apply as defaults when noenv_updatesare defined;DB_DATABASEonly written for real drivers - #7 — template context expanded:
{db_name},{worktree_root},{main_repo}, and{env.KEY}references to existing env values (dry-run resolves them against the main repo's.env) - #8 — preflight fails fast when hook scripts referenced in
commands.*/database.*are missing from the worktree checkout - #9 —
destroyrunsgit worktree pruneso branches are deletable immediately; new--delete-branchflag
Tests
- 11 new bats tests (78 total, all passing): flags-in-any-position, full dry-run plan, preflight fail-fast, prune/delete-branch, command-based DB lifecycle,
driver: none, unknown-driver handling, template context,{env.KEY}refs - README and
--helpupdated for all new behavior
Closes #1, closes #2, closes #3, closes #4, closes #5, closes #6, closes #7, closes #8, closes #9