Repository navigation
Releases
v0.11.1
A call a sandbox's config marks as asked now waits for your answer instead of failing, and tags, releases and ref deletions always ask. Sentry credentials reach only the orgs they name, devsandbox ps lists instances like the dashboard, and terminal questions are answered from a list. Existing sentry credentials need their orgs, with the sentry feature 1.3.0.
Added
-
Permission requests: an asked scope waits for your answer instead of failing. A call needing a scope in a sandbox's
access.<kind>.ask(or one in no scope of an unfenced claim) is now held, up to the claim'shold(2 minutes by default), while you answer from the dashboard's modal, the desktop popup ordevsandbox access pending|approve|deny:--for once(the default),instance(this instance until itsrm) oralways(a rule on the credential incredentials.toml, which you can also write by hand). A deny is kept, so a retrying agent is refused at once;devsandbox access revoke R-…drops a kept answer or rule. An agent refused while a request is pending can rundevsbd access wait R-…in the sandbox and retry once it's answered. An instance gets at most three open requests, so volume can't wear you down.devsandbox access pending devsandbox access approve R-7Q2M9XK4TB0D --for instance
-
Tags, releases and ref deletions always ask. With gh's claim, deleting a branch, creating, moving or deleting a tag (REST
git/refsor GraphQLcreateRef/updateRef/deleteRef) and publishing a release are asked every time, on each tag or ref, even when the scope allows them (creating or moving a branch isn't): answered once or for this instance on that one target, never always, and no rule opens them. A draft release isn't asked until it's published, so gh's draft-then-publish is one question. Pushes over git aren't asked yet.
Changed
-
Sentry credentials reach only the orgs they name. A Sentry token spans every org its account is in; now a
sentrycredential names the orgs sandboxes may use, withdevsandbox login --org <slug>(repeatable, each checked with the token), and the broker refuses calls naming any other org, by slug or id. The org list sentry gets shows only those orgs, andaccess.sentry.orgsin a sandbox's config narrows it further. A credential naming none has every org call refused, so an existingsentrycredential needs its orgs: log in a new one under a new name (devsandbox login sentry-my-org --feature ghcr.io/devsandboxes/features/sentry:1 --org my-org) or addorgs = ["my-org"]to its entry incredentials.toml. Needs the sentry feature 1.3.0, which also drops the routes that listed other orgs' projects and app installations.[sandbox.web.access.sentry] orgs = ["my-org"]
-
devsandbox pslists sandbox instances, like the dashboard. One row per instance with its sandbox, status, uptime and CPU/memory (plus PROFILE when one has a profile, MACHINE when machines are registered, their rows included);-aadds stopped ones. Services are indevsandbox services ls.ps --jsonprints whatstatus --jsondid, sostatsandstatusare gone, and so are thecontainers.list/containers.statsAPI methods (and the npm package'sstats()/status();ps()returns the snapshot).devsandbox ps -a
-
The dashboard's Detail panel keeps what a build said. An instance's warnings and notes from its last
run,rebuildorstart(the identity summary, the GitHub fence, everywarning:) stay on it and show under its details, next to whether the browser sandbox is on and its GitHub fence. The details lay out in two columns when they fit. -
Terminal questions are answered from a list. Every yes/no and menu on a TTY (
login's claim review, machine trust,rm, the identity question) is a list you pick from, defaulting to the safe answer, so a stray key can't approve.loginshows a claim as a folded tree of routes and scopes, and asks which login method to use when several work instead of picking one silently.
Fixed
- VS Code no longer hands a claimed sandbox your logins when it can avoid it.
devsandbox vscodeand the dashboard'sostartcodewithout your ssh-agent or git credential helper for an instance with a credential claim, and open it without asking when no other VS Code window could leak them (checked on Linux). Otherwise the dashboard now asks before opening, and:codetakes--allow-credential-leaklike the CLI. - A misspelled top-level table is an error:
[sandboxx.web]used to load
as an empty config with no warning; nowdevsandboxnames the unknown
table, as it already did for unknown keys inside a sandbox.
Commits
- f524850 docs(ps): archive the ps-daemon plan, its content now lives in snapshot-and-json
- 60db185 fix(ps): read the daemon's federated snapshot like the dashboard, since a local collection plus per-machine calls skipped the merge's rules and the poll's cached stats
- 3c44075 docs(prompts): close the terminal prompts plan, its content now lives in cli-prompts and the credentials reference
- 29e72e3 feat(prompts): answer every cli yes/no and menu from a list, so machine trust, rm and the identity question read like login's and default to the safe answer
- 506b0c8 feat(login): ask which login method to use on a terminal when several work, since the silent pick hid that a browser or paste login was there
- 0d0d8f5 feat(login): review a claim as a folded tree and answer approve/refuse from a list, so never routes and scopes read at a glance and a stray key can't approve
- f1577df feat(ask): select, fold and review prompts redrawn in place on a tty, so questions can show folded details and take a picked answer instead of a typed y/N
- 5e94871 docs(prompts): plan styled, foldable, pick-from-list tty prompts
- 8d7bdb3 feat(tui): keep a build's warnings and notes on the instance and show them in a two-column detail, since they were lost once the build log scrolled by
- dadaa35 feat(ps): list sandbox instances with their usage like the dashboard, since a raw container listing plus separate stats and status verbs said less with more commands
- f55a539 fix(vscode): start code without the ssh-agent and git credential helper for a claimed instance, and let the dashboard open one anyway like the cli
- 08889c0 feat(broker): ask a person for tags, releases and ref deletions whatever the scope allows, since no rule should publish for them
- d238f50 feat(devsbd): access wait blocks on a permission request, so an agent retries its call once it's answered
- 76a0b0b feat(tui): a modal answers permission requests as they open, and a desktop popup names the command, so a held call needn't time out
- 81a8aa9 feat(access): pending, approve and deny answer permission requests from the terminal
- 8084400 feat(api): list and answer permission requests over access.pending and access.decide, local clients only
- 1f9e5f8 feat(broker): keep this-instance, always and deny answers, so an answered ask isn't asked again
- 88865ed feat(broker): hold an asked call for its permission request instead of refusing it, so an answer lets it through
- f206473 docs(broker): split permission requests into what's built now and what waits on pushes, links and agents
- 4a7c96d feat(sentry): follow features/sentry 1.3.0's org fence, checked end to end, so existing credentials learn they need orgs
- 727f9db feat(login): --org names a sentry credential's orgs, checked with the token, and access ls shows them, since a credential naming none has its org routes refused
- e5b0985 feat(broker): enforce the org fence and cut org lists to it, so a sentry token reaches only the orgs its credential names
- 731ee26 feat(credentials): a claim can fence an org path variable, so a credential and a config can name the orgs it reaches
- 1ca365c docs(sentry): plan the org fence, since the shipped claim's tokens reach every org the account is in
- fc2f518 docs(credentials): record what 0.11.0 shipped with: sentry's claim spans orgs, the broker is http/1.1 only, drains cut broker streams
- 3ca4b57 fix(config): refuse an unknown top-level table, so a typo like [sandboxx] isn't silently ignored
- 3028a4b docs(site): close the site refresh and release plan
v0.11.0
Sandboxes can use gh, git and Sentry's CLI without ever holding your tokens: devsandbox's credential broker keeps them on the host and spends them only on what each sandbox's config allows, gh and git only on the sandbox's own repos. Features now update their tools on a schedule, with no rebuild and no sandbox able to swap them, and host git no longer follows anything a sandbox can write. The features gh 1.3.1, zidane 2.1.1 and sentry 1.2.1 need this release.
Added
-
Sentry's CLI without its token in the sandbox. The new
ghcr.io/devsandboxes/features/sentryfeature installs Sentry'ssentryCLI and claims asentrycredential. The sandbox gets a phantomSENTRY_AUTH_TOKEN, and its calls tosentry.ioand the region hosts reach devsandbox's credential broker on the host, which checks each against the claim's scopes (issues, events, releases, uploads, alerts, dashboards, …), swaps the phantom for the real token and calls Sentry. Deleting an org, project or team and minting tokens are refused whatever the config. Any feature can claim a credential the same way, in itscustomizations.devsandbox.credentials, either intercepting its hosts or giving the tool a loopback base URL. -
gh without its token in the sandbox, fenced to the sandbox's repos. The new
ghcr.io/devsandboxes/features/ghfeature installs the GitHub CLI and claims agithubcredential: gh, git and anything else callingapi.github.comreach GitHub through devsandbox's credential broker with a phantom token. Calls on the sandbox's own repos (its folders' remotes plusaccess.github.repos) get the real token, scoped per sandbox (repo.read,pr.write,pr.merge,issues.write,git.push,releases.write,actions.read,actions.write, …); other repos are read anonymously and never written; GraphQL writes are checked by every id they name. Deploy keys, webhooks, runner tokens, secret writes and other routes that would plant access are refused whatever the config. Use it instead ofghcr.io/devcontainers/features/github-cli. gh runs from a shared dir the sandboxes mount read-only, kept current by feature updates (below), so no sandbox can swap the gh the others run.devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --profile work
-
devsandbox loginanddevsandbox access approve.loginstores a credential's secret on this host and approves the claim of the feature it's for, which it shows you first. A feature release that changes its claim needs approving again, withaccess approve, which shows what changed, or whenrunasks.--profilelimits a credential to the sandboxes of those profiles.devsandbox login sentry-work --feature ghcr.io/devsandboxes/features/sentry:1 --profile work
-
devsandbox loginby device code or browser. A claim that lists thedeviceorbrowserlogin gets its token by OAuth:loginshows a code to enter at the provider's page (works on a headless box), or opens the provider's login page and takes the redirect on a loopback port.--methodpicks among the claim's methods, and--client-idlogs in to your own OAuth app (a GitHub App you made) instead of the feature's, or names the app when the feature ships none:features/ghoffers GitHub's device flow that way. The token, its refresh token and expiries are kept on the host, and the broker renews the token before it expires (or when the provider rejects it, replaying the call), so tools in the sandbox never see it change. A credential whose renewal is refused is marked broken until you log in again.devsandbox login github --method device --client-id Iv1.0123456789abcdef
-
devsandbox access lsandaccess revoke.lslists this host's credentials: who they're granted to, whether the token is pasted or OAuth and when it expires (never the token), the approved and pending claim versions, and the instances using each, with the version they run and whether it's approved. Versions nothing uses are marked.revokedeletes a credential's secret and entry, or with--versiondrops one claim version, showing first which instances lose access.devsandbox access ls sentry-work devsandbox access revoke sentry-work --version 3f2a1b
-
GitHub tokens that stay narrow, and a warning before they expire.
devsandbox loginfor a GitHub credential takes fine-grained PATs (github_pat_…) and GitHub App user tokens (ghu_…) and refuses classic PATs, which reach every repo you can; gh's own OAuth token only with--broad(below).access.github.asin a sandbox's config picks which kind of token a sandbox takes, within the kinds the credential offers (asincredentials.toml,["user"]by default).access lsshows when a credential expires and warns two weeks ahead, and in its last week you get a desktop notice once a day while sandboxes use it. -
GitHub logins that land on the right token. For a pasted token,
loginopens GitHub's fine-grained token page prefilled with a name, a description and the permissions the claim's granted scopes need, so you only select the repos;--ownerprefills the user or org that owns it. Before storing any token,loginchecks it against the provider and says whose it is (… as alice), so a work credential can't silently be your personal account. Login pages open in the browser of the credential's profile, where its account is signed in.devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --owner my-org
-
login --broadfor orgs that allow neither a GitHub App nor fine-grained tokens. It makes a broad credential, which takes gh's own OAuth token (gho_…, by gh's device login or pasted), after a confirmation naming its reach: the repo fence still refuses writes outside the sandbox's repos, but GraphQL reads aren't fenced, so a sandbox can read every repo the account can. Narrow tokens stay the default, and a credential is broad or not from its first login.devsandbox login github --feature ghcr.io/devsandboxes/features/gh:1 --broad
-
Feature updates keep tools current with no setup and no rebuild. A feature can declare updates (
customizations.devsandbox.updates): a command baked in its image that refreshes a${sharedVolumes}dir its sandboxes mount read-only, gh's binary for one. The daemon runs each due update when it starts and then hourly, every 7 days unless the feature or the config's[updates]says otherwise, in a throwaway container from the sandbox's features image with only that dir writable: no sandbox can swap the binary the others run, and no feature code runs on the host. A failure is retried after 6 h and posts an Inbox notice; each run's output is inlogs/next tostate.toml.devsandbox update <name>runs one now, and a version after the name pins or rolls back. An image runs the updates it was built with, so a feature release that moves its updater reaches an image at its next rebuild. Not on Apple's container yet.[updates] gh = "1d"
devsandbox update gh 2.60.0
-
runasks to approve a changed claim. When a feature release changes a credential claim,runon a terminal shows what changed and asks, instead of refusing and sending you toaccess approve; a yes approves it and the run goes on. Off a terminal (--json,-d, the dashboard,rebuild, a machine's run) it still refuses. -
access.<kind>in a sandbox's config picks the credential a claim takes (credential) and narrows what the sandbox may do with it (scopes). Edits apply to the next call, no rebuild.[sandbox.web.access.sentry] credential = "sentry-work" scopes = ["releases.write", "uploads"]
-
Intercept-mode credential claims. A feature whose claim intercepts its hosts (gh's
api.github.com, say) now works with the tool as it ships: the sandbox getsHTTPS_PROXYpointing at the helper, which hands only the claimed hosts to the broker and dials everything else itself (through the proxy the container already had, if any). The broker's per-host certificates chain to this host's member CA, whichruninstalls into the container's system CA bundle (update-ca-certificates,update-ca-trust, or the bundle itself) and names inNODE_EXTRA_CA_CERTS,DENO_CERT,REQUESTS_CA_BUNDLEandAWS_CA_BUNDLE. A new claimed host reissues the CA and reinstalls it in the running sandboxes; a stopped one gets it atstart.runwarns whenremoteEnvor--envsets a proxy variable, which would bypass the route. -
Each folder's remotes are recorded at its first
run. Before a folder's first container,runreads its git remotes (any host; host paths,file://andext::URLs dropped) intostate.tomland prints the GitHub repos among them: the repos a sandbox's GitHub credential will be fenced to. The record is never re-read, so a remote a sandbox adds or rewrites later never counts, andrmkeeps it.access.github.reposadds repos;devsandbox access forget <folder> <repo>drops one (instances take it at their next start or rebuild);access lslists each folder's fence.devsandbox access forget ~/src/app someone/planted-repo -
The broker enforces the repo fence, git over HTTPS included. A claim that declares a
fencegets its credential only on repos in the sandbox's fence: its folders' recorded repos plusaccess.<kind>.repos. Outside the fence a read goes to GitHub without a credential, as a stranger's would (public repos and git dependencies work), markeddevsandbox-fence: outside; a write or agit pushis refused before git sends anything, namingaccess.<kind>.repos, and so is an upstream 401, so git never prompts for a password. Claim routes take{repo}(owner/repo, case-insensitive,.gitdropped) and a?service=style query constraint, so git's fetch and push map to their own scopes. -
...
v0.10.0
A config can now belong to the whole fleet and keep running on an always-on server while the host it was written on is off. Links a sandbox opens land in your desktop browser, picked per profile. Sandboxes and services get NVIDIA GPUs from hostRequirements.gpu, and placement sends them to a machine that lends one. Members run the build the fleet's authority pins.
Added
-
A config every machine runs. On the fleet's authority (the host of its first
machine add), arun,rebuildorstartsigns the config's next version when it changed and sends it to every machine, which installs its own copy. Machines keep the latest signed version while the authority is offline and build only from an exact copy of it, so a copy edited in place is refused and restored. The verb's output names any machine that didn't get it, and running the verb again retries those. Arun box/<sandbox>from the authority also brings the sandbox's repos tobox, uncommitted work included.devsandbox machine add box --control-plane # on the authority, signs its configs for box devsandbox run web # on the authority, signs a changed config and sends it devsandbox run box/web # from the laptop, even with the authority off
-
A laptop can drive a server. A laptop joining with
devsandbox machine add boxgets its join proposed to the authority, which approves it withdevsandbox machine approve <id>. A host with no container runtime is a clean driver. The dashboard saysno runtime, nothing is placed on it, and a barerun <sandbox>goes to the machine that runs it. -
Links opened in a sandbox open on your desktop.
xdg-open,$BROWSER,webbrowser, Node'sopenand CLI logins openhttp(s)URLs in the host's browser. AlocalhostURL or OAuth callback gets a port forward first (marked(open)in the Ports tab, stopped after 10 minutes idle), so dev servers andgh auth loginwork. A link opens on the host that last attached to the instance with a terminal, so a server sandbox youexecinto from your laptop opens on the laptop. The dashboard's status line says what happened to each link, anddevsbd open <url>does the same from scripts. -
Profiles pick that browser. Declare them in the config, list the ones a sandbox allows, choose one at
runand switch it any time without a restart. Each host maps profiles to browsers in its ownprofiles.tomlnext tostate.toml.ps,inspectand the dashboard show an instance's profile and flag one its sandbox no longer allows.[profiles.work] [profiles.personal] [sandbox.web] folder = "../web" image = "node:22" profiles = ["work", "personal"]
# ~/.local/share/devsandbox/profiles.toml [work] open = ["google-chrome", "--profile-directory=Profile 2"]
devsandbox run web --profile personal devsandbox profile web work # or P / :profile in the dashboard -
GPUs.
hostRequirements.gpu = trueon a sandbox or a service gives its container every NVIDIA GPU (docker's--gpus allwith thenvidiaruntime, else the CDI spec on docker or podman). When none is usable,runstops before building, and"optional"warns and runs without.run --placeputs a sandbox that requires a GPU only on a machine that lends one, and prefers one for an optional GPU.[sandbox.ml] folder = "../ml" image = "pytorch/pytorch" hostRequirements.gpu = true
-
devsandbox machine allowsets what work placed on this host may use, instead of editing[allow]inmember.toml. Only the host itself can.machine addasks the machine what to lend over your ssh session, or takes--allow,--allow-bindand--allow-local-env.devsandbox machine allow --gpus on --bind-add ~/datasets devsandbox machine add box --allow gpus --allow-bind /srv/data -
Members run the build the authority pins. The authority signs its build into the membership log, and members download that release and check its sha256 before running it (a source build only with
dev-builds = trueinmember.tomlorfulltrust), so a compromised control plane can't push code.machine lsshows a machine behind the pin and why.devsandbox machine upgrade <m>copies this build over a machine's over ssh, for the control plane the authority no longer follows. -
Sessions in the dashboard. An instance's helper sessions show as rows under it.
aorenterattaches,Kends one, andaon the instance picks a detached one.devsandbox exec web --end <id>ends a session from the CLI. A terminal over a fleet link to an instance with a non-root user is now a session too, so a dropped link no longer ends it. -
A warning when a nested docker can't work from a shell. On rootless docker with runc before 1.4.1,
exec'd processes land outside the container's cgroup, so a docker-in-dockerdockerdstarted from a shell fails.run,startandinspectnow say so. Upgrade the host's runc.
Changed
- The fleet's hub is now its control plane, the Kubernetes name for the role. It is
control_plane = "self" | "<name>"inmember.toml,devsandbox machine control-plane <m>moves it,machine add --control-planepicks it for a new fleet, and the API andindex.d.tscall itcontrol_plane. machine addpicks no config roots (--configis gone). A machine's roots are the ones its daemon lists, kept live as it installs signed copies. A command on a machine with no root given uses its signed copy, else its~/.devsandboxes.- The docs site is much shorter. Machines moved to
/docs/machines, the basics are on the quick start, the two services examples are one/examples/servicespage, and the Features and VS Code examples are gone (their content lives in the quick start, the devcontainer port guide and the dashboard tour).
Fixed
- Ctrl-D in the dashboard no longer removes an instance. One-key actions ignored modifiers, so Ctrl-D (a shell habit, or the EOF a closing terminal sends) counted as
d, and Alt-Y answered a confirm. Letters and symbols now fire bare or with Shift only. Ctrl-C and Ctrl-] keep working, and a focused terminal still gets every Ctrl key. - A pipeline whose command starts the daemon no longer hangs. The daemon kept any fd the CLI had inherited, so
devsandbox … | catcould wait forever on a pipe the daemon held. It now starts with only its own stdio. devsandbox exec web zidanefrom a terminal gets a terminal. A command given toexecran without-i -tunless asked, so a TUI drew at 80x24, saw no input and left its terminal replies on screen. From a terminal it now gets-i -tand a resumable session, and piped stdio stays plain.- The dashboard shows a fleet config's sandboxes once, with every host's instances under one group, instead of again per machine. The instances detail panel grows to fit, so the drift line no longer falls off.
- Service networks no longer break DNS on rootless docker. A new service network covering a host route, gateway or nameserver is recreated on a free
/24of10.200.0.0/16, with a warning.devsandbox gcnow removes unused service networks on docker too. - Caches, shell history,
${sharedVolumes}mounts andworktree-linkno longer keep a sandbox home underrun --place. A placed instance starts them empty on the worker, and a "not placed" note lists each tie once. - Upgrading the authority first no longer locks it out of an older control plane or silently downgrades it.
- Attaching without an id takes an attached session too, and a session's creator sees the program's first output.
- A machine's root removed there leaves the dashboard without a daemon restart, and a root that errors no longer sticks as a permanent error.
Commits
- ec10147 docs(site): cover sessions, the driver laptop, ctrl chords and gpus, merge the services examples, drop the features and vscode ones and cut the docs by 40%
- 1d17cda docs(agents): list the profile, rename, vscode, status and fleet-link command files
- b3929a2 chore(comments): drop machine add's roots claim and history wording from machine.rs
- 2fc8199 docs(plans): move parked and proposed plans to explore and mark fleet planned, so active holds only agreed work
- 4026122 docs(cli): list profile, machine allow/control-plane/approve, exec sessions and controlPlane where the reference and cli skill still lacked them
- ac68b55 fix(serve): start the lazy daemon with every fd above stdio close-on-exec, so a pipeline whose command starts it no longer hangs on a pipe the daemon inherited
- 2ad5bcc fix(tui): fire one-key actions only bare or with shift, so ctrl-d out of shell habit or a closing pty's eof no longer removes the instance under the cursor
- 83a6ee8 docs(status): park terminal replies echoed after exec returns, since nothing flushes pending tty input
- cf69da4 docs(site): cover profiles, links, gpus, lending, control plane and pinned builds, move machines to /docs/machines, and trim docs, examples and architecture to what a reader skims
- 5f9ad03 docs(machines): a machine verb runs over an api stream on the link, not an ssh of its own
- 8a44299 docs(cli): exec's help says a command from a terminal gets -i -t, machine roots' help drops add picking roots, and the control-plane plan marks the rename shipped
- b717513 fix(fleet): list a sandbox's tie once even when repeated apart, and show ${instance} paths as , so not-placed notes don't repeat or name a literal instance dir
- aba5e49 docs(status): record the hand-run gpu check on docker cdi and what is still unverified
- 9ce5bcd docs(gpus): close the gpu plan: adrs for spec-compatible gpus and lent-gpu placement, follow-ups parked
- c308945 feat(machine): ask at machine add what the target lends, applied over its own ssh session
- 855d759 feat(machine): set worker all...
v0.9.0
One user model on every runtime: inside a sandbox you are a user with your host uid/gid, so workspace files come out owned by you on rootful docker, rootless docker, rootless podman and VM-backed runtimes alike. Browsers keep their own sandbox wherever it can work, and tools are told when it can't. Interactive exec sessions survive a dropped connection: --attach gets the program back, and a machine's terminal reconnects by itself. Machines become one fleet: members with their own keys and trust, a hub, routing through other members, run --place to send a sandbox where there's room and devsandbox fetch to bring the work back. Fleet is experimental in 0.9.0: its commands, config, files and the protocol between machines may change between releases with no migration, so don't use it for anything you can't redo. Its entries are grouped under Experimental: fleet below.
Behaviour change: sandboxes run as the host user by default (identity = "host"). The config's remoteUser (else containerUser, else the image's USER) is adopted with your host uid/gid, keeping its name, home and shell. A config that assumes root in the container (mounts or paths under /root, a root remoteUser/containerUser) can break under it, so run, start and rebuild now offer to update it first (the dashboard asks too), and identity = "image" keeps the old behaviour. Existing instances keep the user they were created with until rebuilt (devsandbox rebuild --force <name>).
[sandbox.legacy]
identity = "image" # users as written, no remappingMachines added with 0.8.0 must be added again with machine add: their old links are refused (see Experimental: fleet).
Added
- Sandboxes run as the host user, planned per runtime mode.
runprobes the runtime's user-namespace mode (rootful, rootless docker, rootless podman, VM-backed) once per runtime context, picks how to create and exec the container so the adopted account ends up with your ids, and prints the plan in one line (identity: rootful: exec as vscode, remapped to 1000:1000) plus any warning. On rootless docker, where root is the host user, execs run as root withHOMEset to the account's home. With no account to adopt, the sandbox runs as root with a warning recommending thecommon-utilsfeature. A docker socket mount gets the right group, and SELinux-enforcing hosts get their binds relabelled.--reprobeonrunandrebuildprobes the mode again.
devsandbox run web --reprobe-
identityconfig field.identity = "host"(default) or"image"(users taken literally, as before). When it's unset,updateRemoteUserUID = falsemeans"image", so devcontainer configs that opt out of uid remapping keep doing so. -
Updating configs that mount into
/root. Beforerun,startandrebuild, on a terminal, devsandbox lists the config entries that break under host identity and asks[u]pdate / [c]ontinue as is (don't ask again) / [s]kip this time. Update rewrites the config file in place, comments and layout kept:/rootbecomes${containerEnv:HOME}, a root user is removed (or kept withidentity = "image"), and it names the instances that now need a rebuild. A YAML config gets the edits to make by hand. Off a terminal, underrun --jsonand from autostart,runprints one warning line instead. The dashboard flags these sandboxes in its header (N sandboxes use /root (U to update)) and Detail panel, and offers the same update when it opens, onU, and beforerun,startandrebuild. Machines' configs are checked on the machine. API:config.findings,config.migrate,config.ack(docs/reference/api.md, Config). -
${containerEnv:NAME}. Resolves at create, once the image is built, from the sandbox'scontainerEnv, else the image'sENV, else forHOMEthe home of the account the container runs as. It works inmounts,shell-rc, feature mounts,containerEnvandremoteEnv, so a mount can land in the user's home whoever that is, andPATH = "${containerEnv:PATH}:/opt/bin"extends the image'sPATH.
mounts = ["source=${sharedVolumes}/gh,target=${containerEnv:HOME}/.config/gh,type=bind"]- Browsers keep their sandbox. Docker sandboxes are created with devsandbox's seccomp profile: docker's default plus user namespaces for unprivileged processes, which Chromium's and Electron's own sandbox needs (podman already allows it). That opens kernel surface docker's default closes;
userns = falsekeeps docker's default profile. Where execs run as root (rootless docker, root images),chrome,chromiumandgoogle-chromego through a wrapper that starts the real browser at a non-root uid;DEVSANDBOX_CHROME(andCHROME_PATH,CHROME_BIN,PUPPETEER_EXECUTABLE_PATH) point at it, so a Playwright script passesexecutablePath: process.env.DEVSANDBOX_CHROMEandchromiumSandbox: true. Root plans also silence pip's and bundler's root warnings.
[sandbox.web]
userns = false-
Tools are told whether a browser sandbox works. Each new container checks whether a browser sandbox can start there, and
runsays so (browser sandbox: on, oroff (<why>); sandbox-off knobs set). Where it works, every exec getsDEVSANDBOX_BROWSER_SANDBOX=1; where it doesn't, the tools' sandbox-off knobs (PUPPETEER_DANGEROUS_NO_SANDBOX,ELECTRON_DISABLE_SANDBOX,QTWEBENGINE_DISABLE_SANDBOX,PLAYWRIGHT_MCP_SANDBOX=false,CHROMIUM_FLAGS=--no-sandbox). Keys you set incontainerEnvorremoteEnvwin.inspectprints the verdict; instances created before this saynot recordeduntil rebuilt. -
Resumable
execsessions. On an instance with the helper, a ttyexecruns in a session that outlives the client: if the terminal or connection goes, the program keeps running, andexec --attachgets back to it (the one detached session, a pick list when there are several, or--attach=<id>).--sessionslists them,--session <id>runs in a named one, attaching if it's live. Dashboard terminals run in sessions too, so a shell closed with the dashboard can be reattached from the CLI; the Detail panel showssessions: N (M detached)and the row a▣Nbadge. Ended sessions are cleaned up after a few minutes; detached ones stay until removed.
devsandbox exec web --sessions
devsandbox exec web --attach
devsandbox exec web --attach=1790000000-a1b2-
Machine terminals reconnect. A tty
execon a machine's instance, and a dashboard terminal tab on one, reattach to their session when the connection drops (connection lost, reconnecting… (Ctrl-C to stop), backing off up to 10 s), instead of ending the program's terminal. To keep the connection's own failure apart, a program there that exits 255 reports 254. -
exec --service <name>opens a terminal in a service container the instance uses (its command, else a login shell).
Fixed
- Feature mounts under
${sharedVolumes}work on a first run. A feature's bind mount whose source is under${sharedVolumes}is now created when missing, like a config mount, instead of skipped with a warning. Other missing feature sources are still skipped. cacheswork for a non-root user. Cache mounts now go to/var/cache/devsandbox/<name>instead of/root/…, which a non-rootremoteUsercouldn't reach. The tools find them through their env vars as before.- Same-named sandboxes in two config roots no longer clobber each other's images, nor does sandbox
foo-featclobber sandboxfoo's features image. Built images are tagged per config root, one prefix per kind (devsandbox-img-<root>-<sandbox>,devsandbox-feat-<root>-<sandbox>,devsandbox-img-svc-<root>-<service>), so the firstrunorrebuildafter upgrading builds them again; images under the old tags are left fordocker image prune. ${localEnv:NAME:default}uses its default. An unsetNAMEnow expands todefault(everything after the:) instead of empty; a set one, even to empty, to its value.${containerEnv:NAME:default}works the same.- Running devsandbox as root on rootful docker or podman works. Instead of failing to remap the adopted account to uid 0, execs run as root with
HOMEset to the account's home, as on rootless docker. - The dashboard's build log follows a running build, refreshing within about 100 ms instead of only on snapshots.
- Dashboard prefills no longer fail as ambiguous.
r's prefill and tab completion, andp's port prefills, write a local name a machine also has as@/<name>, so the line submits. - Machines' rows stay current. A late update from a machine could bring back a root that was dropped, or overwrite a newer snapshot with older rows.
- A signal no longer fails a command talking to the host daemon. An interrupted read of the daemon's reply is retried instead of failing the command.
Experimental: fleet
Everything in this group may change between releases (commands, member.toml, the fleet's files next to state.toml, the protocol between machines) with no migration. Don't use it for anything you can't redo.
-
One link per pair of machines, under the machine's trust. Everything done on a machine (CLI commands, verbs, terminals, port forwards, the ssh agent) rides one held link instead of an ssh connection per use; ssh carries only that link and
machine add's probe. Links from before this release are refused until both ends have keys and a signed member list, so add 0.8.0 machines again. What a link reaches is the machine's ownmachine trust(workerby default): a machine you drive freely needsmachine trust fullthere. -
Machines form one fleet around a hub.
machine addjoins fleets: the machine joins this host's fleet, this host joins the machine's, or (neither in one) the two start one with this host as hub,--hubmaking the target the hub instead; two different fleets are refused. A laptop joins an ...
v0.8.0
Machines: sandboxes on your other hosts, over ssh, in the same CLI and dashboard, with your ssh-agent relayed only where you allow it. No more half-built sandboxes: an instance is recorded from the moment run starts, a failure leaves it listed as failed with its error, and Ctrl-C undoes the whole run. Every run, rebuild and start keeps a build log, and the dashboard runs them in the background instead of handing them the screen. run, rebuild, start, stop, rm and service rebuild now run in the host daemon, so a build outlives the terminal that started it, and -d leaves it running. The dashboard gets everything it shows from the daemon too.
Behaviour change: a failed run now leaves an instance to rm. Before, only a failing lifecycle command (postCreateCommand, …) kept its container, and a run that failed earlier (worktree, image build, container create) left its worktree, branch and services behind with no instance pointing at them. Now every failure keeps a failed instance; devsandbox rm <name> removes all of it, or devsandbox rebuild <name> retries.
devsandbox rebuild web-4 # retry a failed run
devsandbox rm web-4 # or remove everything it madeAdded
machine addinstalls devsandbox on the machine. When the machine has no devsandbox or another version,machine addoffers to copy this one there (to~/.local/bin/devsandbox, or over the old one);--auto-installskips the question and is needed off a TTY. A devsandbox in~/.local/binis found even when the machine's login shell doesn't put it onPATH.devsandbox --versionprints the version.
devsandbox machine add me@my-server --auto-install- Machines: sandboxes on other hosts, over ssh.
devsandbox machine add <ssh target>registers a host running devsandbox (its config roots are offered to pick from, or pass--config '<path there>');machine lsshows each one's state,machine rmforgets it. Their sandboxes and instances then show in the dashboard next to yours, in a MACHINE column, and every key works on them, terminals included. On the CLI a name is looked up on every machine: one match is used wherever it is,my-server/testor@/test(this host) picks when it's ambiguous. Verbs run on the machine with its login shell's environment. Your ssh-agent reaches a machine only if you ask:machine add --agent,machine set <name> --agent on|off, oraon the dashboard's Machines tab (5, listed while a machine is registered: each machine's target, link state, agent and version) (off by default, takes effect at once), relayed by devsandbox rather thanssh -A. A login shell that prints a banner no longer makes the machine unreachable.exec,logs,inspect,doneandrenamerun there overssh.--machine <name>runs a command without a name there (ps,ls,stop --all, …). A machine that's down keeps its last rows, markedunreachable. Not yet on machines: VS Code, the Inbox. Adding a machine means trusting it. Details:docs/machines.md.
devsandbox machine add me@my-server
devsandbox run api # `api` is only defined on my-server
devsandbox exec test # an instance there: over ssh
devsandbox stop my-server/test # qualified, when `test` exists here too- Port forwards into a machine's sandboxes.
devsandbox port my-server/web 3000opens a port of an instance on a machine on this host, andport --machine my-server --service redis 6379one of its global services. In the dashboard,pon a machine's row does the same; the Ports tab lists those forwards with a MACHINE column, and like local ones they're kept by the host daemon and come back after it restarts. Each forward is tunnelled over your ownsshto the machine, reconnecting if it drops. A machine'sforwardPortsstay on that machine: forwards into it are only the ones you ask for here. The machine needs this devsandbox version. Details:docs/architecture/daemon/forwards.md, Remote bridges.
devsandbox port my-server/web 3000
devsandbox port --machine my-server --service redis 6379-
Forwards show the listening process without
lsof. The process listening on a forwarded port (node (pid 412)) now comes from the in-container helper, so it shows in images that have nolsof, and on a machine's forwards too. Running instances pick up the new helper when restarted. -
API: forwards into machines.
forwards.addtakesmachine(the forward still binds on this host;diris the config root there),forwards.listtakesmachines: trueto include them, and forward rows carrymachine. Details:docs/reference/api.md, Forwards. -
API: machines.
machines.probe|add|list|get|rm,roots.list, amachineparam that runs a quick call or a verb on a machine,machines: trueoninstances.watch(rows taggedmachine, plus each machine's link state),instances.resolveandsandboxes.list(every machine's matches), andfoundoninstances.resolve's answer. Details:docs/api.md, Machines. -
-d/--detachonrun,rebuildandstart. Returns as soon as the instance is registered and prints its name (run -d --json: the run record); the build goes on in the host daemon. Follow it withdevsandbox logs --build <name> --follow, or watch its row in the dashboard.
devsandbox run -d web --branch fix/login-
API: the verbs as methods.
run,rebuild,start,stop,rmandservices.rebuildstream their output and phase over the API, plusinstances.resolve,instances.cancelandsandboxes.list. Details:docs/api.md, Verbs. -
API: everything the dashboard shows.
instances.listtakes adepth(disk,listingorfull, to skip the runtime or just its stats) and also answersthread_children. New:instances.procsandinstances.signal(an instance's processes and tracked runs; SIGTERM/SIGKILL one),instances.buildLog,instances.rename,instances.done,containers.logsandcontainers.inspect(devsandbox containers only),sandboxes.getandservices.get(a config as written and resolved).instances.changednow also fires when an instance is created, removed, renamed, marked done or changes step. Details:docs/api.md. -
API:
instances.watch. A client watching a config root gets its snapshot pushed asinstances.snapshotevery 2 s (cpu/mem every 7 s), from one poll shared by every watcher; the dashboard uses it, so two dashboards cost the runtime no more than one.stop,rmandservices.rebuildtakedetach(a hang-up leaves them running),run,rebuildandstarttaketty(run on a pty of that size), andinstances.buildLogtakesansi(keep the colours). Details:docs/api.md. -
status --jsonandls --jsonsandbox rows gaindispatcherandworktree_branch: whether the sandbox is a dispatcher, and its resolvedworktree-branch. Details:docs/json-output.md. -
Build logs.
run,rebuildandstartwrite their whole output, the containers' build and lifecycle commands included, to a log per instance (~/.local/share/devsandbox/logs/<instance id>/build.log; the one before is kept asbuild.1.log, andrmdeletes both).devsandbox logs --build <name>prints it;--followkeeps printing until the instance is done building. The command's error, if it failed, is the last line. Builds run on a terminal of their own when you're on one (or start them from the dashboard), so docker's progress display and colours show as they used to, live and in the dashboard's build log (b), which also scrolls with the mouse wheel. Piped,logs --buildprints plain text.
devsandbox logs --build web-4 --followps,status --jsonand the dashboard show where an instance is. While it's being made, an instance's status is its step (preparing,building,creating, then the lifecycle command running, likepostCreateCommand), andfailedwhen it stopped partway; the dashboard's Detail panel shows the failed step and error.status --jsonrows carry it asphase({"state": "in-flight", "step": "building"}or{"state": "failed", "step": …, "error": …}), absent once the instance is ready;ps --jsonrows of instances with a container too. Details:docs/json-output.md.
Changed
-
run,rebuild,start,stop,rmandservice rebuildrun in the host daemon. The command startsdevsandbox serveif needed, hands it the work and prints its output as it comes, exiting as before. Closing the terminal, or losing the ssh session, no longer stops a build; Ctrl-C still cancels it (the rollback's output shows, exit 130), and a second one stops it at once. Prompts (the sandbox picker, an ambiguous name,rm's branch question) still happen in your terminal. If no daemon answers, onewarning:line and the command runs in your terminal as before (on Windows it always does, with no daemon). -
The dashboard is a client of the host daemon. Everything it shows comes from
devsandbox serveand every action goes to it, so it needs the daemon (it starts one when it opens, as before). If the daemon goes away, the last tree stays on screen marked stale with the reason, and actions say the daemon is needed. On Windows, which has no daemon, the dashboard isn't available for now. It no longer runs an autostart pass of its own when it opens; the daemon's covers every config root that has instances. -
The dashboard no longer takes over the screen for
stop,rmor a service'srebuild. They run in the daemon, and the status line says how they ended, or why not (e.g.rmrefusing a dirty worktree).rm's question about deleting the branch is ay/npopup;escremoves nothing. Quitting the dashboard while one of them is still going leaves it running. -
son a stopped instance starts it likedevsandbox start. It used to be a bare container start; it now al...
v0.7.1
Critical fix: upgrade if you run more than one instance of the same repo. A git worktree prune or git gc inside one sandbox could delete git's records of every other instance's worktree, leaving them with fatal: not a git repository. devsandbox now locks the worktrees it creates. After upgrading, run devsandbox start once on each existing instance to lock its worktree (safe on a running one), and devsandbox rebuild it to also get the git gc guard. This release also adds local-folder features and fixes a few host-daemon start and shutdown issues.
devsandbox start <instance>Added
- Local-folder features. A
featureskey starting with./,../or/is a feature folder (devcontainer-feature.json+install.sh) resolved against the config dir, so a config can ship its own feature without publishing it to a registry. Options,containerEnv,installsAfter,mounts,privilegedandentrypointwork as for OCI features. Editing a file in the folder marks the sandbox's instances as drifted, sodevsandbox rebuildpicks the change up, anddevsandbox lswarns when the folder or itsdevcontainer-feature.jsonis missing.
[template.base.features."./features/toolkit"]
ripgrep = trueFixed
- Critical:
git worktree pruneinside a sandbox no longer breaks the other instances' worktrees. A container sees the repo's worktree records but not the other checkouts, so a prune (orgit gc) there deleted their records and left each one withfatal: not a git repository. devsandbox now locks the worktrees it creates, so prune and gc skip them; existing instances get locked on their nextstart. An instance whose record was already pruned gets a warning onstartinstead; git won't work in it until the record is restored. Containers also getgc.worktreePruneExpire=never(after a rebuild for existing ones), sogit gcleaves worktrees you made yourself alone too. Details:docs/worktree-locking.md. devsandbox rebuildstarts the host daemon, likerunandstart. A rebuilt dispatcher orinbox = trueinstance with no dashboard open and no daemon running had no host, so itsdevsbdcontrol commands exited75until some other command started one.- An upgrade or
devsandbox serve shutdownno longer brings back the old daemon. A dispatcher's child op still running while the daemon shut down could start a fresh daemon from the old binary, which then kept running instead of the new one (or undid the shutdown). - The "no host connected" error says how to get one. Control commands that exit
75now suggest running anydevsandboxcommand (ordevsandbox serve install) instead of opening the dashboard, which no longer serves them.
Commits
- 6a9f65a chore(site): add pnpm shot to screenshot built pages
- 029b3ac fix(site): tidy the architecture diagrams' joins and index list
- 23ba27b docs(changelog): note the serve drain race and no-host hint fixes
- 5f1d597 docs(changelog): note that rebuild now starts the host daemon
- 8c2b83e docs(devsbd): point the no-host hint at the daemon, not the dashboard
- 2977de1 fix(serve): never lazy-start a daemon from a dispatcher child op
- 138d46b fix(rebuild): start the host daemon after a rebuild
- 7ae7921 fix(worktree): lock sandbox worktrees so a prune inside a container can't break the others
- 454e99e docs(site): add unlinked /architecture pages for contributors
- 002dda3 docs(features): document local-folder features
- fc97df0 feat(features): support local-folder features
v0.7.0
A per-user host daemon now keeps notifications, dispatchers and port forwards working with the dashboard closed, and serves an API that editors, GUIs and the new npm connect() client can drive. Sandboxes can keep one Inbox thread per item: a header with a state and buttons, and a conversation of messages, forms and your replies, answered from the dashboard, the new devsandbox inbox command or any API client, with events streamed back as they happen. The Inbox becomes a list of what's waiting on you rather than a log, and instances can be marked done instead of removed. VS Code can open straight at a file and line.
Added
- A host daemon keeps devsandbox live with the dashboard closed.
devsandbox serveis a per-user background process that now owns the connection to every running sandbox's helper: the ssh-agent relay, notifications and desktop popups, dispatcher control commands and port forwards. You don't start it: the dashboard,run,startand the commands that relay your ssh-agent start it when needed, and it exits 10 minutes after its last user left (a dashboard, a forward, a running dispatcher orinbox = truesandbox). A newer devsandbox takes over from an older daemon by itself.devsandbox serve installruns it from login as a systemd user unit (Linux) or a LaunchAgent (macOS), for sandboxes the container runtime restarts on boot; an upgrade repoints the installed unit at the new binary, andserve uninstallremoves it. To keep it from idling without a unit, usedevsandbox serve --keep-aliveor~/.local/share/devsandbox/daemon.config.toml.exec,startandrunno longer start an ssh-agent bridge of their own: one bridge per container, relaying the agent of whichever session last ran a command. Details:docs/serve.md.
# ~/.local/share/devsandbox/daemon.config.toml
[serve]
keep-alive = truedevsandbox serve install-
Port forwards outlive the dashboard. Ports-tab forwards and every sandbox's
forwardPortsnow run in the host daemon, so closing the dashboard no longer drops them, and every open dashboard shows the same ones. Forwards you add are saved in~/.local/share/devsandbox/forwards.tomland come back on the same host port after a daemon restart or a reboot, untildstops them.devsandbox portstill forwards in the foreground until you stop it. -
Inbox threads. A sandbox that declares
inbox = truecan keep one thread per item in the Inbox (a PR, an email to answer).devsbd thread putsets its header: a title, a link, a state (needs-you,activeordone), a status, the child instance it's about, up to 9 buttons and an optional reply box (compose, with ahintline under it saying what sending does). A put that changes nothing is ignored (no unread mark, no popup), so a sandbox can simply re-send all its threads on every pass; a desktop popup only fires when a thread entersneeds-you, and state and status changes show as one-line markers in the thread.devsbd thread sendadds a message under the header: markdown and key/valuefieldsblocks, identified by an id of your choosing, so re-sending the same message is free and sending changed content edits it in place;devsbd thread withdrawtakes one back. Everything is queued likenotify, so it works with no daemon running.devsbd thread rmdrops a thread,devsbd thread ls [--feed]lists yours back, messages included.dispatcheralone only grants the child commands, so a dispatcher that wants threads declares both. A rejected put or send shows up as an error notification from your instance, with the reason. Full reference:docs/automations-guide.md.
[sandbox.pr-dispatcher]
dispatcher = { spawn = ["web"] }
inbox = truedevsbd thread put --json '{"key":"pr-123","title":"#123 fix login","state":"needs-you","status":"review replies","child":"pr-123","actions":[{"id":"retry","label":"Retry"},{"id":"done","label":"Done","done":true}],"compose":{"hint":"Starts a run with your message"}}'
devsbd thread send --json '{"thread":"pr-123","id":"run-1","blocks":[{"type":"markdown","text":"Addressed 3 of 4 comments, **1 needs your call**."}]}'-
Forms in messages. A message can carry a form: choice, text and yes/no questions, with defaults (a text default is how you offer a draft for editing). The dashboard pins open forms under the thread's header:
tabbetween questions,spaceto pick,eto edit a text answer,enterto see what will be sent andenteragain to submit. Half-filled answers are saved as you go, so they survive a restart and show the same in every dashboard. Submitting sends onesubmitevent with every answer, defaults filled in, and the thread shows what you answered (you answered "<title>"over eachlabel: value) where you'll read the owner's reply to it. A question can follow up another (under), shown indented under it, and only be asked while one of its options is picked (when): a reply text that only matters for "Post the reply" is hidden, not required and sent asnullwhen you pick "Don't reply". -
devsandbox inboxanswers threads from a shell.lsandshow(with--json) read the Inbox without the daemon;reply,act,submit,doneandreopenanswer a thread, named<owner>/<key>or by the idlsshows. The owner gets the same events as from the dashboard.
devsandbox inbox ls --view needs-you
devsandbox inbox reply pr-dispatcher/pr-123 "Rebase it first"- An API for editors and GUIs. The host daemon serves a JSON-lines API on a unix socket: the Inbox (threads, replies, actions, forms, done/reopen, notifications), instances, port forwards, and change notifications.
devsandbox api --stdiorelays it over stdin/stdout for clients that can only spawn a process; it exits 0 when its input ends and 75 only when the daemon hung up first. The npm package'sconnect()wraps it with typedinbox,instancesandforwardsmethods and events. Whoever can open the socket can act as you on every sandbox, likedocker.sock. Reference:docs/api.md.
const api = await devsandbox.connect({ name: 'my-tool' });
await api.subscribe(['inbox']);
const [t] = await api.inbox.list('needs-you');-
Thread buttons that act right away. A button can carry a built-in host action that runs in the dashboard with no round trip: open VS Code on the thread's child (at a file and line), a terminal, its logs, a port forward, a link, or
rmwith the usual confirm. On a stopped child, VS Code, the terminal and the forward start it first (the button says(stopped)); logs don't, since a stopped container's log says why it stopped. The target is always the thread's child or the thread's owner itself, never another instance, and there is no arbitrary host command. -
Events: your answers, back to the thread's owner. Every other button, a reply, a form submission, marking a thread done and reopening it become events the owner reads with
devsbd events(JSON lines, each naming itsthread).--wait SECSreturns as soon as there's one;--followkeeps a stream open and prints each event the moment it happens, with a ping after 30 s of quiet, and a newer follower from the same instance replaces the older one, so two copies of a loop never both act on a click.--thread KEYnarrows either to one thread. Delivery is at least once: events stay until the owner acks them withdevsbd events ack <id>…after saving its own state.devsbd featureslists the newer verbs a helper has (thread-send,events-follow, …), so a script can check before using them.
devsbd events --follow
devsbd events ack e-1790900001-3f2a- Done instances. An instance marked done keeps its container, worktree and runs, and shows dimmed with a
✓in the dashboard and(done)inps, until you remove it. Mark it withdevsandbox done <instance>, a thread's Done, or a dispatcher'sdevsbd done <key>; clear it withdevsandbox undone,uon the thread, or a dispatcher'sensurereusing it.devsbd ls,ps --jsonandstatus --jsonreportdone. npm:done(name)/undone(name), anddoneon instance rows. dremoves the selected instance in the dashboard. Likes, it acts right away with no prompt: it runsrm, which still refuses a dirty worktree and asks before deleting the branch.
devsandbox done web-pr-123devsandbox vscode --gotoopens VS Code at a file and line. The path is relative to the instance's workspace folder. It opens (or focuses) the window as before, then has the in-container helper open the file in that window, waiting up to 30 s for it to attach; if that fails, the window still opens and the output says why the line was dropped. In the dashboard::code <instance> --goto path:line.
devsandbox vscode web-2 --goto src/main.rs:42:7- Select and copy text with the mouse in the dashboard. Drag in any pane to select text inside it, without borders or the panes next to it. Releasing copies it to your clipboard (copy on select, on by default); with that setting off,
ctrl-shift-corcmd-ccopies it, and so doesctrl-cover a selection, for terminals that send that key plain or keepctrl-shift-cfor their own copy (Alacritty, GNOME Terminal, kitty and most Linux terminals: there the dashboard tells youctrl-c). The copy goes through your terminal (OSC 52), so it works over SSH and from a container; under tmux, enableallow-passthrough. Inbox threads copy as rendered, with bullets, quotes, tables and links as shown and wrapped lines joined back, and dragging past the edge scrolls so a long message copies whole; the config, help and logs views work the same way.shift-drag still gives your terminal's own selection. In the integrated terminal, apps that use the mouse (vim, tmux, zidane) now get your clicks, drags and hover, and what they copy to the clipboard now reaches yours (a setting turns tha...
v0.6.0
The config file is now devsandboxes.toml, and it can be written in YAML too; an existing config.toml is renamed for you. Extra folders get their own worktree when someone else owns the checkout, rm --force clears out stuck instances, dispatchers can see which branches are in use, and the dashboard opens instantly and keeps its Inbox across restarts while putting far less load on dockerd.
Added
- YAML configs.
devsandboxes.yaml(or.yml) works in place ofdevsandboxes.toml: same keys,extendsmerging and validation, only the syntax differs. A sandbox hashes the same in either format, so converting a config doesn't mark instances for rebuild. Keep one config file per config dir; with more than one, devsandbox stops with an error.
sandbox:
web:
folder: ../web
image: mcr.microsoft.com/devcontainers/base:ubuntu
services: [database]devsbd branches <sandbox>tells a dispatcher which branches are already checked out. It prints a JSON list of every branch in a worktree of the sandbox's repo and who holds it: one of the dispatcher's own children, another instance, the base checkout, or a worktree devsandbox doesn't know. It reads git on the host each time, so agit switchinside an instance is seen. With--ahead, each row also gets the number of commitsorigindoesn't have yet, and local branches that are ahead but not checked out are listed too. A dispatcher can use it to leave alone PRs that someone is working on locally. The sandbox must be in the dispatcher'sspawn. Running dispatchers pick up the new helper when restarted.
devsbd branches web --aheadrm --force(-f) removes an instance whatever state it's in. A worktree with uncommitted or untracked changes is removed anyway, changes discarded, instead ofrmrefusing. A step that fails (a worktree git won't remove, a repo the host refuses to run git in) prints a warning andrmcarries on, so the instance still leaves the list. Whatever couldn't be removed stays on disk. The branch of a worktree that was left in place is kept. In the dashboard::rm --force <instance>. npm:rm(name, { force: true }).
devsandbox rm --force web-2- The dashboard's Instances tree has a TYPE column when a sandbox is a dispatcher. Instances of a dispatcher sandbox read
dispatcher, the others-. Without any dispatcher in the config the column isn't shown.
Changed
-
The config file is now
devsandboxes.toml. An existingconfig.tomlis renamed the next timedevsandboxruns in its config dir (with a notice on stderr), and is read as-is until then. Aconfig.tomlwith nosandbox,templateorservicestable isn't a devsandbox config and is left alone. -
Inbox times say how long ago a notification came in. The TIME column reads
just now,12s ago,5 min ago,3h ago,1 day ago, …6 days ago, then the date and time (Oct 2 14:32) once a notification is a week old. Before, it showed only the time of day, so yesterday's notifications looked like today's. The Detail pane shows the date and time. -
foldersentries get their own git worktree when the checkout belongs to someone else. If an extra folder is a git repo and it's another sandbox'sfolder, or another instance already mounts it, the instance now gets a worktree of it, detached at that checkout'sHEAD. Before, the instance mounted the live checkout, so the owner switching branches changed what the instance saw. The worktree is kept acrossrebuildand removed byrm. Dispatcher children always get one. To keep the old live view for an entry, write it as a table withworktree = "never", or use"always"to force a worktree:
[sandbox.web]
folder = "../web"
folders = { "/workspaces/api" = "../api", "/workspaces/.shared" = { path = "../.shared", worktree = "never" } }-
A sandbox's own
foldernow also gets a worktree when another instance mounts that folder directly as afoldersentry. -
The Inbox keeps its history. Notifications are saved in
inbox.tomlnext tostate.toml, so they survive closing the dashboard;d/Dremove them from the file too. A notification with the same--keyno longer replaces the earlier one: it becomes the head of a thread, with the older ones folded under it (→to show them). With more than one instance sending, the Inbox groups them per instance, foldable like the Instances tree. The limit is now 200 notifications per instance (was 50, and 200 overall). -
worktree-linkno longer migrates oldshared-files/<sandbox>/stores. The automatic move only relinked the instance being run, so every other instance on the same repo was left with dangling links. A link into an old store is now skipped with a warning that shows where the file should go. Move it there, delete the old link, andrebuild. -
The dashboard opens instantly and fills in as the runtime answers. The tree is drawn from
state.tomland the config right away, statuses (…until then) arrive with the first container listing, and CPU/MEM after that. Before, the dashboard waited about 1.5s fordocker statsand showed "no sandboxes defined" meanwhile. -
The dashboard puts much less load on dockerd. CPU/MEM now refresh every 7s instead of every 2s (statuses still every 2s), the runtime version is asked once, and process lists are only fetched while the Instances tab is open. Instance drift is read from the container listing instead of two
docker inspects per instance.
Fixed
-
Listing containers no longer makes dockerd compute their disk sizes. Every
ls,ps,gc, autostart pass and dashboard refresh asked for container sizes as a side effect of the output format, which spiked dockerd's CPU every 2s while the dashboard was open and made each listing take ~300ms instead of ~20ms. -
Opening VS Code no longer clears an instance's extensions.
devsandbox vscodeand the dashboard'soread the sandbox config from the current directory, not from the instance's own config directory. Run from anywhere else, the extensions list was rewritten as empty, so VS Code didn't install anything. They now read the instance's own config. If that config still can't be read, the list is left as it was. Instances already hit by this get their list back the next time you open VS Code from the new version. -
An
rmthat failed partway can be retried. A worktree an earlierrmhad already removed made the nextrmfail too; it is now pruned instead. -
The dashboard no longer warns about mount sources
runcreates itself.shared-volumespaths and per-instance mount sources that don't exist yet are made byrun, so a sandbox with no instance no longer shows them as problems. -
VS Code labels the primary workspace root by its folder name, matching the extra
foldersroots, instead of the instance name.
Commits
- 3a63926 feat(config): read devsandboxes.toml (or .yaml/.yml) and rename a legacy config.toml, so the config file is recognizable on its own and can be written in yaml
- b25563f feat(tui): show inbox times as how long ago, then date and time after a week, so older notifications don't pass for today's
- 16e793a feat(tui): accept --force on the :rm prompt so the dashboard can remove instances the cli's rm --force can
- 2b0bb63 feat(npm): let rm pass --force so node callers can remove instances with uncommitted changes or failed teardown steps
- 647b127 feat(rm): add --force so an instance can be removed despite uncommitted worktree changes or failed teardown steps
- aa50d82 docs(changelog): note the dashboard startup, dockerd load and type column changes
- 3aacc06 perf(tui): collect stats every 7s, ask the runtime version once and fetch processes only on the instances tab to cut idle dockerd load
- bff0cf7 perf(docker): list containers with an explicit ps template so the cli stops asking dockerd to compute every container's disk size
- fe376b0 perf(tui): render the tree from state and config before asking the runtime, and read instance drift from ps labels instead of two inspects per instance
- 376bdb6 fix(tui): show the tree right away on startup instead of a false 'no sandboxes' message while docker stats samples
- 092958d fix(tui): size the services column to its content when type is shown so the type column sits beside it, not at the far edge
- 8dcbfd2 fix(tui): stop warning about shared-volumes and per-instance mount sources that run creates before any instance exists
- b0ad91f feat(tui): add a type column to the instances tree so dispatcher instances stand out from the ones they spawn
- e7239b9 fix: update changelog and cleanup plan
- 20d8f6a docs(dispatch): document devsbd branches in the automations guide, design and changelog so dispatcher authors know to check branch holders before acting
- f2a9e43 feat(devsbd): expose the branches op as devsbd branches [--ahead] so dispatcher scripts can call it
- 985f9ef feat(dispatch): add a read-only branches control op so a dispatcher can see which branches are checked out, and unpushed, before touching a PR
- 1a723d4 docs(dispatcher): plan a devsbd branches op so dispatchers can tell which branches are in use
- 2a485c4 fix(vscode): resolve extensions from the instance's config root and keep the registered ones when it can't be resolved, so opening from another directory no longer wipes them
- 11081b9 feat(tui): persist the inbox and thread keyed notifications per instance
- f655b58 fix(vscode): label the primary workspace root by its directory name, so it matches the extra folders instead of showing the instance name
- 3975498 fix(rm): prune instead of remove a worktree a previous rm already removed, so an rm that failed later can be retried
- deb0e1a fix(config): hash folders tables that restate the default like the plain string, so moving an entry to the table form isn't drift
- c2acba2 docs(folders): document per-entry ...
v0.5.0
Sandboxes can now start themselves after a reboot and run unattended dispatcher scripts that create, drive and clean up their own child instances. Messages from inside containers show up in the dashboard and as desktop notifications. See docs/automations-guide.md. run --json, a command-less exec and exact-name matching make devsandbox easier to drive from scripts and other programs, and the docs now live at devsandboxes.com.
Added
autostart: a sandbox's instances come up once per boot, when the dashboard opens or after your firstdevsandbox run/start. A sandbox with no instance yet gets one; dispatcher children are left to their dispatcher.autostart = "runtime": docker and podman restart the containers themselves at boot (--restart unless-stopped), with no devsandbox process needed. Podman also needspodman-restart.serviceenabled. On Applecontainerit behaves liketrue. Changingautostartnever marks an instance as drifted; the nextstartapplies it in place.
[sandbox.triage]
folder = "../triage"
autostart = "runtime" # or true- Boot hook: new containers run
devsbd booton every start, which brings back the helper daemon and, in runtime mode,postStartCommand(output in/run/devsandbox/boot.log). Containers created before this needdevsandbox rebuild --forceto get it. devsbd notify: any sandbox can send the user a message. It is queued inside the container until a dashboard is open, then shown in the new Inbox tab (unread badges on instance rows,enteropens anhttp(s)link,d/Ddismiss) and as a desktop notification (notify-send/osascript).
devsbd notify --level warn --key pr-123 --link https://github.com/o/r/pull/123 "PR 123 needs you"- Dispatchers: a sandbox that declares
dispatchercan manage child instances throughdevsbd, while the dashboard is open. Children are named<sandbox>-<key>, always get their own worktree, are marked⇠ <dispatcher>in the TUI, and outlive the dispatcher. Host-side operations log to<data>/devsandbox/logs/dispatch-*.log. Exit codes: 75 when no dashboard is connected, 77 when denied.spawn = ["*"]means every sandbox in the config root except other dispatchers, and it grants their mounts, docker socket and privileges. Children can never be dispatchers themselves.max-instancesdefaults to 10 and counts stopped children too.--branchaccepts plain branch names only ([A-Za-z0-9._/-]) and is used literally, with no${…}expansion.--envrefuses names that could take over processes in the child:PATH,HOME,SHELL,LD_*,DYLD_*,GIT_*,NODE_OPTIONS,PYTHON*and similar. Its values are kept across adevsandbox rebuildof the child, including whenensurerecreates a missing container. On an existing child,ensure --envreplaces the saved values, and every command devsandbox runs in the child (exec, dashboard terminals,devsbd execruns, lifecycle commands) uses them from then on, over a same-namedremoteEnv; already-running processes keep the old ones until a rebuild.
[sandbox.pr-dispatcher]
folder = "../pr-dispatcher"
autostart = "runtime"
dispatcher = { spawn = ["web"], max-instances = 10 } # "*" = any non-dispatcher sandbox
postStartCommand = "nohup ./loop.sh >loop.log 2>&1 &"devsbd ensure web --key pr-123 --branch feat/x # create or start web-pr-123
devsbd exec pr-123 --detach -- zidane -p "babysit PR 123"
devsbd run logs pr-123 <id> --follow
devsbd ls; devsbd stop pr-123; devsbd rm pr-123- Runs: commands started with
devsbd execare tracked in the child (id, log, exit status). Follow them withdevsbd run ls|logs|wait, clean them up withdevsbd run rm(--forcekills a running one) anddevsbd run prune --keep N; the TUI shows a child's last runs under its processes. devsbdis onPATHin containers (/usr/local/bin/devsbd).forwardPorts: while the dashboard is open it forwards each running instance's configured ports to127.0.0.1, the same waydevsandbox portdoes (no container restart). Each instance keeps its host ports across dashboard restarts, and a port already taken moves to the next free one up. A global service's port is forwarded once, however many instances list it. In the Ports tab these rows are marked(config);dstops one until the dashboard reopens.
[sandbox.api]
services = ["db"]
# 3000, "db:5432" as in devcontainer.json; "8080:3000" / "15432:db:5432" pick the host port
forwardPorts = [3000, "8080:3000", "db:5432"]run --json: prints one{"schema": 1, "data": {...}}document for the new instance (name,instance_id,sandbox,container,workspace,folder,base_folder,worktree,branch; the last twonullwithout a worktree). Everything child processes print (image builds,docker run, git, lifecycle hooks, autostart) goes to stderr, so stdout parses as-is for programmatic and GUI callers.exec <name>without a command opens a login shell (zsh, else bash, else sh), the same one the dashboard's terminal opens. With neither-inor-tgiven it runs with-i, plus-twhen stdin is a TTY, so it works as is from a terminal or a pty (node-pty); explicit flags are used as given.- npm:
execArgv(name, cmd?, { tty, interactive })returns{ file, args }for spawningdevsandbox execyourself (node-pty,child_process.spawn) without shell quoting. rm --delete-branch/rm --keep-branchanswer the "delete branch?" question without prompting, so scripts and other callers without a TTY can clean up the branchruncreated.--delete-branchdeletes it like answering yes (git branch -D, so unmerged commits go too);--keep-branchkeeps it. Branchesrunreused rather than created are always kept. With neither flag,rmstill asks on a TTY and keeps the branch otherwise. npm:rm(name, { deleteBranch }), wheretrue/falsepass--delete-branch/--keep-branch.- Docs site at devsandboxes.com: a quick start, a playable tour of the dashboard, the full
config.tomlreference, the Node API reference, ten worked examples (parallel coding agents, shared and per-instance services, package caches, ssh-agent andgit push, babysitting pull requests, porting adevcontainer.json, …), full-text search (⌘K / Ctrl+K) and this changelog.
Changed
-
Worktrees reuse existing branches.
run --branch X, and a dispatcher'sdevsbd ensure --branch X, no longer fail whenXexists:- a local
Xis checked out as it is; - an
Xthat only exists onorigin(a PR head, for example) becomes a local branch trackingorigin/X, so a plaingit pushupdates it; - a branch that's already checked out somewhere else gives an error saying where.
rmonly offers to delete branches devsandbox created itself. - a local
-
New containers use
sh -c '… devsbd boot & exec sleep infinity'as their command instead ofsleep infinity, so images need/bin/sh. -
startsets the container's restart policy fromautostart, overwriting a policy set by hand. -
While the dashboard is open it keeps a helper connection to every running instance that has the helper, not only when an ssh-agent is being relayed.
-
devsandbox status --jsoninstance rows includeinstance_idand, for children,dispatcher. -
rebuildappliesworktree-include. Before, adding a pattern marked instances as drifted, but the rebuild copied nothing. Nowrebuildcopies any missing matching files into the worktree; existing files are never overwritten. A copied file you delete on purpose comes back on the next rebuild, so drop the pattern instead. -
devsandbox port 3000(and the Ports tab) moves to 3001, 3002, … when 3000 is taken on the host, instead of a random port. -
A service
portsentry that gives only the container port ("5432") now gets the same port on the host when it's free, instead of a random one. If the port is taken, the runtime still picks one. -
An exact instance name wins. With instances
webandweb-2,devsandbox exec web(andrm,stop,logs, …) now means the instancewebinstead of an ambiguity that failed off a TTY and prompted on one, including inside a pty. An exact instance id counts too; sandbox and folder names only apply when nothing matches exactly.execnow uses the same resolution as the other verbs, so it also accepts an instance's id after a rename. -
npm (breaking):
run()resolves with the new instance's record (RunRecord) instead of its name; use(await run(...)).namefor the old value. It callsrun --json, so build and autostart output can no longer end up as the "name".
Fixed
rmon a dirty worktree no longer leaves an instance without its container.rmremoved the container, volumes and services first, thengit worktree removerefused the uncommitted or untracked changes, stranding the instance. It now checks the worktree first and refuses with the list of changes, removing nothing.- Keyboard chords like ctrl+m reach apps in dashboard terminals. In terminals that support the kitty keyboard protocol (kitty, Alacritty ≥ 0.13, Ghostty, WezTerm, foot, iTerm2 ≥ 3.5), the dashboard now turns the protocol on and passes it through to apps inside its terminals that ask for it. zidane's ctrl+m, for example, no longer arrives as Enter. Shells and other apps that don't ask for it get the same keys as before. GNOME Terminal and tmux don't support the protocol, so there ctrl+m and Enter still can't be told apart.
- The mouse wheel scrolls full-screen apps in dashboard terminals. It used to scroll only the terminal's own scrollback, which full-screen apps don't have. Now apps that track the mouse (zidane, vim with
mouse=a, htop) get the wheel directly, and pagers likelessandmanget ↑/↓. Shells still scroll their history. - *...
v0.4.0
Worktree instances can now bring along the gitignored files a repo needs to run, like .env files, instead of starting without them.
Added
- Copy gitignored files into new worktrees. A repo's
.worktreeincludefile is always honored, andworktree-includeadds more patterns (gitignore syntax). Matching untracked files are copied from the base checkout into each new worktree and never overwrite existing files. - Share gitignored files across all instances. Each
worktree-linkpath is moved to one shared copy undershared-files/<sandbox>/, and every worktree gets a symlink to it. An edit in one instance shows up in all of them. This also works on Applecontainer, which can't bind single files. Globs work within one path segment (*/?), and a leading./is accepted.
[sandbox.web]
folder = "../web"
worktree-include = ["fixtures/*.local.json"] # copied once, per worktree
worktree-link = [".env", "packages/*/.env"] # one live copy shared by every instance- A
CHANGELOG.md, which is also used as the GitHub release notes.
Fixed
- TUI: pressing
sto start an instance refreshes the list shortly afterwards, so the new state appears right away.
Commits
- 52da316 docs(changelog): readable release notes with examples, written ahead of release via a release skill
- 9dff820 docs(changelog): backfill changelog and generate it on release so github releases carry notes
- c6925a0 feat(run): one-segment globs and leading ./ in worktree-link
- ebd7200 feat(run): carry gitignored files into worktrees via copy or shared link
- d836a5a fix(tui): when start is pressed, refresh instance list after 500ms
- 7005680 chore(ci): fix warnings reported