Stabilize each worktree
List existing worktrees, assign ports once, and keep branch runtime state separate.
Worktrees for agents and PM loops
runtree keeps each branch isolated with its own port, logs, browser, and editor entrypoint. Run your branch, let an agent work on another, then share the right preview with a PM without changing CI.
Install
macOS and Linux, no daemon, no container dependency.
curl -fsSL https://raw.githubusercontent.com/EmilienDreyfus/runtree/main/install.sh | sh
What each worktree gets
List existing worktrees, assign ports once, and keep branch runtime state separate.
Keep your branch running while Codex, Cursor, or Claude Code works in another isolated worktree.
Expose a live branch to PM or QA when feedback matters, without changing your CI flow.
Why this exists
Each new branch means another manual port hunt and another fragile terminal tab.
The moment an AI agent owns one worktree, your editor, logs, and URLs need stronger isolation.
You should not need a CI detour to let a PM validate one branch before the final integration pass.
Interactive CLI demo
$ runtree init --name newProject --run-command "npm run dev -- --port {port}"
initialized newProject at /repo/.runtree.yaml
$ runtree ls
imported 3 worktrees
INSTANCE BRANCH STATUS PORT PID WORKTREE
main main stopped 8100 0 /repo
checkout-copy checkout-copy stopped 8101 0 /repo-checkout-copy
agent-login-fix agent-login-fix stopped 8102 0 /repo-agent-login-fix
$ runtree up checkout-copy
running checkout-copy on http://127.0.0.1:8101 (pid 48211)
$ runtree web checkout-copy
http://127.0.0.1:8101
$ runtree expose checkout-copy
public URL: https://newproject-checkout-copy--team.tunnel.runtree.dev
One config captures the run command and port range.
Every worktree gets a predictable local slot.
stable baseline
ready for PM review
owned by an AI agent
The PM branch has its own process, logs, and port.
Agent work stays isolated until you need it.
Open the exact branch without remembering ports.
Editor and log surfaces stay attached to the same instance.
Stable URL for the branch that needs product feedback.
Your normal CI and release flow stay unchanged.
For dev teams that already feel the pressure
Keep shipping while an agent explores a risky branch without stealing your main runtime.
Show an architecture refactor locally, with logs and browser state isolated enough to be trusted.
Share a live branch when the product question is ready, without waiting for a full preview pipeline.
Start with local worktrees
runtree makes worktrees usable first: stable ports, logs, browser, and editor entrypoints. Sharing is optional until a branch is ready for review.
Install
macOS and Linux, no daemon, no container dependency.
curl -fsSL https://raw.githubusercontent.com/EmilienDreyfus/runtree/main/install.sh | sh