ephemera dev is run for things that keep going: a dev server, a watcher, a REPL. It keeps the sandbox alive, forwards ports to your laptop, and sends each file you change as you save it, so hot reload works as usual.
127.0.0.1: the host reaches it over vsock, and the CLI carries it to your laptop over the same TLS connection as everything else.
Edits
While the session runs, the CLI watches your worktree and sends each change: new and edited files, and deletions. The same rule applies as forrun: files git would track, plus anything you named with --include. Nothing flows back. Files the dev server writes stay in the sandbox and go with it.
Several branches on one port
Run a dev server in each of your worktrees, all on port 3000. With-p 3000, the first session starts a small local router, and each session gets its own address named after its git branch:
localhost:3000 shows the newest one. To choose:
--name names the session instead of the branch, and gives the sandbox the same name. Without it, the session is the branch and the sandbox gets a made-up name like amber-dune-42, so two checkouts of one branch don’t clash. The router exits 30 seconds after the last session ends.
To skip the router and bind a local port for one session only, give both sides: -p 8080:3000 serves the sandbox’s port 3000 at localhost:8080.
Network
A dev server usually needs to install packages, soephemera dev takes the same --allow and --net flags as run. Blocked connections are reported as they happen:
How long it lives
Until you press Ctrl-C, or until--timeout runs out:
--setup, the install step is saved as a snapshot, so the next ephemera dev skips it.
Flags
dev takes every flag run does, plus:
The full list is in the CLI reference.