The proxy read policy files with a laxer parser than devvm network allow's check: a line that wasn't a rule was dropped without a word, or kept as a rule that matched nothing (example.com:x became a host of that name, a rule's trailing dot never matched), so a hand-edited deny could lapse unseen. proxy.ParsePolicy is now the one parser: it returns each line that holds more than a comment, with its number and whether it's a rule, and a line is a rule only when ValidRule takes it, which is what devvm network allow and deny take. parseRule is strict: ports 1 to 65535 in digits, printable ASCII names with no empty label, brackets for IPv6 alone, no address under *., IPv4-mapped prefixes as their IPv4 ones, and one trailing dot dropped, as requests' are. A line that isn't a rule but starts with ! (proxy.BrokenDeny) fails closed: while any of a VM's policy files has one, its proxy denies every name and address, each request getting 403 and a refused block that names the file and line, with no allow advice (block honours Refused; policy.verdict and checkRefused carry it). Other lines that aren't rules are skipped. The proxy logs each one, devvm network marks it (its control characters dropped, msg.OneLine) and --json lists it in not_rules. netpolicy.PolicyWarnings warns of each (policy_broken_deny or policy_not_rule): at each launch with network policy (Proxy.Prepare), after devvm network allow, deny and rm for the file they change, and in devvm doctor for the files you edit (NotRules). AddRule and RemoveRule find rules through ParsePolicy, so ruleOf is gone. A policy file that comes back after it was missing is read again whatever its mtime, an error other than a missing file keeps its last rules and broken deny, and a leading byte-order mark isn't part of the first line. Docs: rules, broken denies and devvm network's output (safety network), the parser and the fail-closed policy (internals network), doctor's warnings (install, internals install), the e2e network section (contributing), the proxy's README. Tests: TestParsePolicy, TestPolicySkipsBadLines, TestPolicyBrokenDeny, TestPolicyFileBack, TestValidRule's new cases and FuzzParseRule's agreement and host properties (proxy); TestBuiltinPolicies, every policy file devvm ships, TestNotRules, TestPrepareWarnsPolicy, TestWriteRules and TestAddRemoveRule's new cases (netpolicy); TestDoctorReport and the network JSON shape (cli); network_rules.txtar's mark, not_rules and the warnings on a change, a launch and in doctor; e2e network: a broken deny makes the running proxy refuse an allowed host until it's gone. Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm
One VM for every project: an isolated sandbox with your project's toolchain, ready for you or an agent to start coding.
Each project folder gets a VM of its own. devvm detects the project's toolchain from its files, so a folder with package.json gets node, and the VM mounts only the project folder, at the same path as on your machine. New VMs get network policy by default, so they reach only the hosts you allow, and your secrets, such as your GitHub token and Claude Code token, stay on your machine. Claude Code, Codex and opencode are ready in the VM with your settings, skills and MCP servers. devvm runs its VMs on Lima by default, or on the experimental smolvm and Docker backends.
Install
devvm runs on macOS 13 or newer and on Linux, on arm64 or x86_64, with Lima 2.0 or newer. Run the one command for your system.
On macOS, install devvm with Homebrew, which also installs Lima:
brew install w3cj/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/w3cj/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. Installing has the full list of requirements, the install script's options, and how to upgrade and uninstall devvm.
Your first VM
In a project folder, run one of these:
cd ~/some-project
devvm # a VM with the project's toolchain
devvm claude # the same, with Claude Code
devvm codex # the same, with Codex
devvm asks whether each new VM gets network policy (answer yes, the default). The first time, it also asks which optional extras every VM gets, then builds the base image, which takes a few minutes once. Later VMs start in seconds. devvm then opens a shell in the VM, at the same path as on your machine, and running devvm in the folder again opens a shell in the same VM. Your first VM has the rest, including Claude Code's token.
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 instead, 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.
Staying safe
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.
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 policy,
.gitprotection and attack vectors. - Backends: what runs the VMs, and choosing one.
- 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.