An export of opencode's history held what opencode 2.4 acts on without asking, so a hostile VM's export could run commands in the VM that imports it (opencode v2.4.1's source): its automations (automation), each a trigger and a shell command that it approved once and never asks about again (core/src/automation/shell.ts); the requests you said always to allow (permission, which Permission.evaluate turns into allow rules); each session's own rules (session_v2.permission, a Permission.Ruleset); the subagents' jobs (job), the queued messages (session_inbox) and the suspended sessions (session_v2.time_suspended), which its service starts or resumes when it starts (core/src/session/execution/restart.ts), with the session's agent's own rules, explore's allowing shell; a project's commands (project.commands), whose start command it runs with bash -lc for each worktree (core/src/worktree.ts); and its git repositories in its data folder (snapshot, repos, worktree), whose config can name a clean filter or core.fsmonitor that its own git update-index runs (core/src/snapshot.ts, git.ts). opencodeClean now empties the tables opencodeUnattended picks (automation, permission, job, session_inbox, and any whose name starts so), sets the columns opencodeNulled picks to NULL (time_suspended, commands, in any case), keeps only the deny and ask rules with a text action of every permission column, each written again from what sqlite3 read, so a key written twice can't keep an allow effect for JSON.parse (opencodeAllowRules), drops every view, and fails its check on a generated column (opencodeHidden). Its check counts each and must print 0, so a sqlite3 without JSON leaves the database out. A view, an upper-case column, a generated column and a duplicate key bypassed the first version, as the security review showed. opencode's HistoryOwn now names its background service's registration on every channel and the files written beside it (service-*.json, service.json.*, service-*.json.*) and its git repositories (snapshot, repos, worktree): an export leaves them out and an import never writes them, while a VM made again keeps them. The import's clean-up loop expands each as a pattern; TestHistoryImportScript holds every skip to a path's plain characters. Tests that failed first (fedora's gate): TestOpencodeCleanSchema (automation and permission emptied, a session's allow rule gone), TestHistoryImportRuns and TestHistoryExportRuns (service-local.json, the handoff's and the registration's temporary files); TestOpencodeCleanSessionRules fails closed without the statements. The review's additions: TestOpencodeCleanSchema (job, session_inbox, a suspended session, a project's commands), TestOpencodeCleanSessionRules (a key written twice, a non-text action, an upper-case column), TestOpencodeCleanHidden (a view, a generated column), and the git folders in the export and import tests. The review's docs fixes across the stack land here too: the changelog's What to do steps, the release page, the coding agents page, How it works and the design note. A kept rule whose resource is missing or isn't text gets "*", as opencode's Permission.Rule needs one, and the check also counts a rule that isn't in the rebuilt form, so a copy whose rules weren't rebuilt fails closed. A stack-wide review's last docs fixes land here: devvm rm deletes opencode's worktrees with the VM, so the changelog has a What to do step to commit their work first. The export's and the import's scripts, which the stack doubled, now go on the VM's input (onInput): a line with the script's length, the script, then the import's export. In the command's arguments, quoted for ssh's shared connection, macOS's ssh failed to start the session (mm_send_fd: sendmsg: Message too long), which the mini's e2e hit, the export first and then the import. The VM reads exactly that many bytes (dd bs=1) and runs the script only when it read them all, so an input cut short runs nothing (TestOnInputCutShort), and the script gets the rest as its input. TestHistoryScriptsOnInput holds every argument under 4 KiB; TestHistoryExportRuns and the import's runs use onInput too. The stub guest takes such a script off its input (inputScript), matches its switches and files() against it and keeps an export's and an import's in history-export.sh and history-import.sh, which history, history_import, rm_vm, existing_agents and layer_add read. Co-Authored-By: Claude Opus 5.5 <[email protected]>
One VM for every project
An isolated sandbox with your project's toolchain, ready for you or a coding agent to start coding.
Install · Read the docs · Staying safe
Install
On macOS, install devvm with Homebrew, which also installs Lima:
brew trust --formula devvmhq/tap/devvm
brew install devvmhq/tap/devvm
On Linux, install it with the install script, which also works on macOS and asks before it installs Lima, QEMU or access to /dev/kvm:
curl -fsSL https://github.com/devvmhq/devvm/releases/latest/download/install.sh | bash
Then run devvm doctor, which checks what devvm needs on your machine and says how to get anything that's missing.
Each release is signed with devvm's minisign key, RWSjzFsn7ETaijKJ2y7F4DtZobXmyv+LmdclJwZP/KmAkLUwOCzWF/2b, and Checking the install script shows how to check the script with it before you run it.
- Requirements: macOS 13 or newer, or Linux, on arm64 or x86_64, with Lima 2.2 or newer (Lima's requirements).
- Tested on Apple silicon Macs and on Linux on arm64 and x86_64, but not yet on Intel Macs.
- Installing has the full list of requirements and the install script's options, and Upgrading and uninstalling covers what comes later.
Trying the release candidate
devvm 0.2.0-rc.1 is out to try before 0.2.0, and its release notes list what changes for your VMs when you upgrade. With Homebrew, install devvm-rc, the formula for prereleases, after uninstalling devvm if Homebrew installed it:
brew uninstall devvm
brew trust --formula devvmhq/tap/devvm-rc
brew install devvmhq/tap/devvm-rc
Without Homebrew, run the release candidate's own install script:
curl -fsSL https://github.com/devvmhq/devvm/releases/download/v0.2.0-rc.1/install.sh | bash
When the install script installed the devvm you have, devvm upgrade --to 0.2.0-rc.1 installs it too. Trying a prerelease covers moving on to the release and going back.
Quick start
cd ~/some-project
devvm
- Go to your project. Open a terminal and
cdinto any project folder. - Run devvm. It shows what this folder's new VM gets, with the toolchains your project's files call for. Confirm to make the VM, or customize it to choose its toolchains, coding agents, layers, network tier and size.
- Start your agent. devvm opens a shell in the VM, at the same path as on your machine, and its prompt starts with
(devvm), so runclaudethere.
- Running
devvmin the folder again opens the same VM. - Your first VM has the rest.
Note
The first run starts with a few questions that set devvm's defaults for every new VM and its base image: the size and coding agents new VMs get, and the base image's optional extras. It builds the base image once, in a few minutes. Later VMs start in seconds.
Tip
Claude Code needs your Claude login before its first start, which
devvm agent login claudemakes from the VM and keeps on your machine (Claude Code's login).
What's supported
- Toolchains: devvm detects them from the project's files, so a folder with
package.jsongets node, and the toolchains page lists them all. - Coding agents: Claude Code, Codex, opencode, pi and Cursor CLI run in the VM, with your settings, skills and MCP servers. devvm keeps their settings and logins in a store of its own, and
devvm agent importcopies them in from an agent you already use on your machine (coding agents). - Layers: the built-in
docker,nixanddesktoplayers, and your own fromdevvm layer new(layers). - Backend: devvm runs its VMs on Lima (backends).
Why use devvm?
- Isolated: each project folder gets a VM of its own, which mounts only the project folder, at the same path as on your machine (what a VM can reach).
- Network tiers: new VMs get the allowlist tier by default, so they reach only the hosts you allow (network tiers).
- Secrets stay home: on every tier, your secrets, such as your GitHub token and Claude Code token, stay on your machine.
- Agents in the sandbox: you start the agent in the VM's shell, so you never install it on your machine.
- Ready in seconds: every VM is a copy of a base image, and toolchains are shared read-only between VMs (images).
- No sandbox closes every gap: a few habits close most of what devvm can't close on its own, so read Staying safe before you trust a VM with a project.
Working on a clone
By default, the VM mounts your project folder, so the VM and your editor share the same files. With devvm --clone, the VM gets a clone of the repo of its own, so nothing in it can touch your working tree or .git, and its work reaches your repo only when you fetch it:
devvm --clone # make the VM with its own clone, and open a shell in it
git fetch devvm # later, on this machine, fetch the VM's work as devvm/<branch>
git log -p main..devvm/main # review it before you merge it
Working on a clone has the details.
Docs
The docs are at devvm.dev, and their source is in docs/.
- Getting started: installing devvm, your first VM and the commands you use most.
- Using devvm: images and tools, clones, links between VMs, ports and size, coding agents, SSH and editors, and troubleshooting.
- Staying safe: the habits that keep you safe, network tiers,
.gitprotection and attack vectors. - Backends: Lima, which runs the VMs, and what it gives them.
- Compared to other tools: how devvm differs from Docker Sandboxes and other sandboxes.
- CLI reference: every command, with its arguments and flags.
- How it works: how devvm does what it does, for checking a claim or reviewing its security.
- Contributing: building, testing and writing docs.
Security and contributing
- Report a vulnerability as SECURITY.md says.
- CONTRIBUTING.md and the Contributing pages cover building, testing and writing docs.