documentation

Branch previews

Any git branch of a site's repo can serve on its own URL — a full worktree beside the site, same database, without touching the checkout you are working in.

Using previews

agent-local branches SLUG            # branches of the site's repo
agent-local worktree SLUG BRANCH     # serve one → https://BRANCH.SLUG.test
agent-local worktrees SLUG           # list previews
agent-local worktree SLUG BRANCH --remove

The repo is found automatically: the site's work dir, or the docroot itself (LocalWP-style checkouts keep .git in app/public). Nothing is copied — the preview is a real git worktree, so it is cheap.

A preview shares the site's database. A branch with migrations runs them against real data; remove the preview when you are done and the branch itself is untouched.