byre is open source on GitHub -- pjlsergeant/byre

Volumes & state

The container is throwaway; your state is not. Every byre develop runs a fresh container and removes it on exit – what carries over is the project’s image and its named volumes:

  • Cache volumes (node_modules, build caches) are disposable. Losing one costs a re-download; templates set up the obvious ones.
  • State volumes (.claude, .codex) are precious: the agent’s login, history, and scratch. Anything that would delete one names it first and asks.
  • Machine-wide volumes hold shared agent logins – one per user per machine, used by every project that opts in. That’s how shared auth makes one login serve every box.

Agents log in once, inside the box, and the login lands in the agent’s state volume – byre never reads or copies host credentials; nothing crosses unless you enable it, and what you enable, byre status shows.

Which hammer

Four verbs touch built state, from lightest to heaviest:

VerbVolumesImageHost-side configUse it when
byre developuntouchedrebuilt only on config change (cached)untouchedevery day
byre rebuilduntouchedrebuilt with --no-cacheuntouchedpull fresh upstream tool versions
byre resetproject volumes wiped (named first; confirm)untoucheduntouchedagent state is wedged; start the box’s contents over
byre forgetproject volumes wipedremoved~/.byre/projects/<id>/ removedremove all trace of byre for this directory

All four leave your project tree alone – forget removes byre’s host-side state, never files in the project. reset and forget act across every installed engine, name everything they’re about to delete, and require confirmation (--force skips it).

Machine volumes are never touched silently. reset and forget exclude them and say so – the machine-wide agent login must never die as a side effect of resetting one project. To delete one deliberately: clear it from the Volume data section of byre config (which refuses while any byre session is running).

Moved or renamed the project directory? The identity is derived from the path, so the old image and volumes would be orphaned – byre rehome <old-id> migrates them onto the new path. Bare byre rehome lists likely candidates: stored projects whose recorded path no longer exists.

Worktree boxes share these volumes, and that is the point – two sessions on one repo, one agent login, one cache. If a volume holds data that cannot take two writers, declare sharing = "exclusive" on it and byre develop will refuse to start the second box rather than corrupt it, naming the worktree that is holding it.

Declaring your own volumes, engine-side naming, one-time seeds, and the sharing contract: the configuration reference.