w3cjandClaude Opus 5.5 293c3a82ca feat(smolvm): forward every port, loopback-only servers included
smolvm forwards only listed ports, and only to servers on the guest's
0.0.0.0. ports-all is now an emulation, reviewed:

- devvm _smolvm-ports, started with the VM and ended with its lifeline,
  holds one ssh master connection to the VM's sshd (its key alone, the
  host key pinned, no agent, no forwarding asked) and relays each host
  connection as an ssh -W channel, so every connection starts on the host.
- assets/smolvm/ports.sh reports the guest's TCP listeners; the host
  parses the report as untrusted (sizes capped, loopback addresses only,
  applied at most every 500 ms).
- Ports from 1024 up, at most 256, bound on 127.0.0.1 and ::1 with
  platform.ListenExclusive: never a port another host program holds, nor
  any VM's ssh, proxy, decider or listed ports (netpolicy.UsedPorts).
- Its log is rate- and size-limited; reads through smolvm exec (host
  key, the sshd probe) are capped at 64 KiB and 30 s.
- sshd's AddressFamily is any, for channels to the guest's ::1.
- vm checks the VM's port features at every start.

Messages: smolvm_ports_no_ssh, smolvm_ports_failed,
smolvm_forwarder_failed. Docs: smolvm.md (every port), backends.md,
security.md, design.md (the design note and threat check), limits.md,
testing.md. e2e: the smolvm section's every-port checks, and its fake
decider reads smolvm's request before closing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 23:32:00 -06:00
2026-10-24 08:41:54 -06:00
2026-10-24 08:41:54 -06:00
2026-10-24 01:10:51 -06:00

devvm

Create an isolated VM in any project folder with everything needed for you or an agent to start coding.

cd ~/some-project
devvm

devvm detects the project's toolchain, creates a VM from a cached image, mounts only the project folder, and opens a shell at the same path. Toolchains and coding agents are shared read-only between VMs, network access goes through an allowlist enforced on the host, and API keys stay on the host.

Quickstart

devvm runs on macOS and Linux, with Lima 2.0 or newer. Install it with Homebrew (brew install w3cj/tap/devvm) or the install script, which offers to install what's missing (Installing). devvm doctor checks what's missing and how to get it.

$ cd ~/some-project
$ devvm --network-policy base
==> building image base (e9f517dddef1)
    a few minutes, and Ubuntu's cloud image to download the first time
    (details: ~/.local/share/devvm/logs/runs/20261024-090616-83541.log)
==> image base ready
==> creating devvm-some-project-71a99b1076d92c from base
==> starting devvm-some-project-71a99b1076d92c

Then you're in a shell in the VM, in ~/some-project. The first VM builds the base image. Later VMs are copies of it and start in seconds. With --network-policy the VM reaches only an allowlist of hosts, through a proxy on your machine (network policy); without a flag devvm asks.

Docs

w3cj.github.io/devvm, from docs/: commands, the security model. Building, testing and writing docs: Contributing.

License

MIT

S
Description
One VM for every project. An isolated sandbox with your project’s toolchain, ready for you or a coding agent to start coding
Readme MIT
25 MiB
0 Stars 1 Watchers 0 Forks
Languages
Go 95.3%
Shell 3.4%
JavaScript 1.3%