w3cjandClaude Opus 5.5 317bd8f978 feat(agents): devvm's agent store, filled by devvm agent import
Every VM gets its agents' settings and logins from devvm's own store,
never from the agents' files in the home folder: settings in
~/.config/devvm/agents/<agent>/, logins in
~/.local/share/devvm/logins/<agent>/ (folders 700, files 600, each
agent's logins folder kept out of Time Machine), each laid out as in a
home folder. The store's settings folders are mounted read-only and
linked into the VM's home; its files and logins are copied in, with
network policy as placeholders the proxy fills from the store.

devvm agent import [AGENT...] [--force] copies the home folder's agent
settings and logins into the store once: only agentDirs, agentFiles and
secrets.LoginRel's paths, never history; .claude.json reduced to its
settings, account state and MCP servers; read through each agent's
folder as an os.Root, so no link out of it is followed (a link to a file
inside becomes a copy, any other is left out with a warning, and so is
a login file that's a link); Claude Code's plugin records renamed to the
store's folders. It asks before replacing what the store has (refused
without a terminal, naming --force), replaces in place, keeping the
mounted folders, and prunes what the home folder no longer has.

- paths: Dirs.AgentSettings, Dirs.AgentLogins
- secrets: LoginRel, LoginFile(Dirs, kind), SaveLogin, HasLogin,
  Store.ExcludeFromBackup; Logins, VMLogin, ClaudeCopy, MCPSecrets and
  the proxy's Get read the store
- vm: agentStore, agentMounts/homeSkips/Inventory.Mounts take Dirs,
  syncer.stageAgents, AgentImport; the guest's links file holds each
  folder's home path and its mount's (host_home is gone)
- structure: callers takes methods (pkg.Type.Name);
  Dirs.AgentSettings only in vm/agents.go, Dirs.AgentLogins only in
  secrets/secrets.go
- messages: agent_import_none, agent_import_nothing,
  agent_import_replace, nothing_imported, agent_settings_imported,
  agent_login_imported, agent_import_link_left_out,
  agent_login_read_failed, agent_import_failed; the login refresh
  messages point at devvm agent import
- tests: agentimport_test.go, testdata/script/agent.txtar, sync and
  network scripts through the store, e2e project and network sections
- docs: coding agents (devvm's agent store, importing from this
  machine), README, getting started, safety, internals, contributing

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 14:08:41 -07:00
2026-10-24 08:41:54 -06:00
2026-10-24 01:10:51 -06:00

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 run in the VM, with your settings, skills and MCP servers, and you start them in the VM's shell. You don't install them on your machine, because devvm keeps their settings and logins in a store of its own, and devvm agent import copies them in from an agent you already use there. devvm runs its VMs on Lima.

Install

devvm runs on macOS 13 or newer and on Linux, on arm64 or x86_64, with Lima 2.0 or newer. It's tested on Apple silicon Macs and on Linux on both arm64 and x86_64, but not yet on Intel Macs. 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

Go to a project folder and run devvm:

cd ~/some-project
devvm

The first time, devvm asks for the size and the coding agents that new VMs get. Then it lists what this VM can get, with the toolchains your project's files call for and those agents already checked. Check or uncheck a coding agent, such as Claude Code, with the arrow keys and space, then press enter. devvm asks whether the VM gets network policy (answer yes, the default). On that first run, 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 its prompt starts with (devvm). Start the agent there, so it runs in the VM. Claude Code needs a Claude Code token before its first start, which your first VM shows how to make on your machine and give to devvm:

claude

Running devvm in the folder again opens a shell in the same VM, and devvm tools adds an agent to it. Your first VM has the rest.

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, .git protection and attack vectors.
  • Backends: Lima, which runs the VMs, and what it gives them.
  • 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.

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%