// one box per branch
Run every branch in its own dev sandbox.
devbox starts one isolated Ubuntu sandbox for each git worktree. Each box has a desktop you can open in
your browser, Pi, Chromium for OAuth, and a copy of your host gh credentials. Run branches side
by side on the same ports, either locally or on Vercel.
npx @gannonh/dbx init writes its config to your repo ·
full install instructions ↓
Run branches side by side
Each worktree gets its own sandbox and network namespace. Three branches can all bind port 5173 without sharing files, processes, or state. Uncommitted changes stay in the local worktree.
- one sandbox and network namespace per git worktree
- standard devcontainer format, also supported by Codespaces and Cursor
- manage each box with
--attach,--stop, or--rm
A desktop in your browser
Each box runs Xvfb, fluxbox, x11vnc, and noVNC. Open the desktop in a browser tab to use Electron apps
and Chromium. xdg-open opens URLs in the box's Chromium. OAuth consent pages stay inside the
box and remain visible over noVNC.
- open the box's desktop in your browser
- run Chromium and OAuth flows inside the box
- open Vercel displays with a one-time access code
Pi included by default
devbox installs Pi and copies its configuration from your host ~/.pi, excluding sessions
and npm cache. The generated provision.sh also has disabled install blocks for Claude Code
and Codex. The box receives a copy of your host gh token for clone, push, and PR commands.
- Pi enabled by default, with Claude Code and Codex blocks included
- host
gh auth tokencopied into the box ~/.piconfiguration copied without sessions or npm cache- dotenv values loaded only when you pass
--env
Choose local Docker or Vercel Sandbox
devbox saves your provider choice for this repository until you pass --provider again.
The CLI
setup & boot
npx @gannonh/dbx initwrite .devbox/ and .devcontainer/ to this reponpx @gannonh/dbx <branch>start a local box and open its shell--provider vercelstart the box in a Vercel Sandbox--env PATHload dotenv values for this runlifecycle
--attachre-enter a running box--stopstop it and keep the worktree and container--rmremove the container, worktree, and branch--listlist local devbox containersaccess
--urlprint current provider routes--openopen the first route in a browser--passwordprint the Vercel display access code--expose-ports 5173publish app ports on a Vercel boxWhat devbox accesses
files
init writes .devbox/ and .devcontainer/. devbox stores its own state under ~/.local/state. Delete the two repo directories to undo init.
execution
The local provider runs Docker build and exec using your devcontainer config. It also runs shell hooks from .devbox/provision.sh. Both files live in your repo.
credentials
devbox copies your host gh token into the box for pushes and GitHub commands. It also copies Pi config from ~/.pi, excluding sessions and npm cache. It loads project dotenv values only when you pass --env.
network
Boxes pull base images and install project dependencies. Vercel also clones your GitHub origin and publishes the routes you approve. devbox sends no telemetry.
Install
requirements
- OrbStack or any Docker runtime. OrbStack provides
<container>.orb.localURLs - @devcontainers/cli, installed with
npm i -g @devcontainers/cli - gh authenticated on the host with
gh auth login - git 2.45+
- optional: host
~/.piif you use the Pi agent