Skip to content

0.3

Choose a tag to compare

@cruzzed cruzzed released this 06 Sep 05:20
· 12 commits to master since this release
f2a4d4f

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 + aliases

Commands 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:

  1. .wtbs/<name> preset script (Django-management-command style; worktree checkout shadows the main repo's). Extra args arrive as "$@"; the template context is exported as WTBS_* env vars (WTBS_PORT_SERVE, WTBS_DB_NAME, WTBS_SITE, …) instead of template rendering, and trailing CR is stripped so core.autocrlf=true checkouts can't corrupt presets.
  2. aliases: one-liners in .worktree-bootstrap.yml, rendered with the same template tokens as commands.*; extra args appended.
  3. 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 → generic laravel.yml, archive/ removed, copy_from_main defaults to just .env, name_prefix default changed explore_ → wt_.
  • 15 new bats tests; full suite green (94/94).

Full Changelog: v0.2.0...v0.3.0