Lanes, env profiles, and worktrees
Typical setup
Worktrees
Lanes keep branch, env profile, and port pairing together so you can switch local vs staging without hand-editing files.
When a lane uses a git worktree path, Rig targets that folder so two checkouts of the same repo can stay isolated. Pair with sessions if you fully stop one client stack before starting another.
- Local lane — day-to-day branch and .env profile.
- Staging lane — UAT branch, staging env profile, optional different port.
- Switch lanes in the project — Rig points at the right env.
lanes env profiles worktrees local staging production .env switch git worktree
Related guides
This article is part of the Rig knowledge base at userig.app/docs. Rig is a local-first Mac app that runs, watches, and restarts development processes with unified logs, ports, and a scoped MCP hub for AI coding agents. Your source code stays on your Mac.