devvm README

项目的 README,来自 github.com/devvmhq/devvm。合并为一个 markdown 文件:README.md。

devvm

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.

Quick start

cd ~/some-project
devvm
  1. Go to your project. Open a terminal and cd into any project folder.
  2. 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.
  3. 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 run claude there.

[!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 claude makes from the VM and keeps on your machine (Claude Code's login).

What's supported

Why use devvm?

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/.

Security and contributing

License

MIT

devvm (devvmhq/devvm)

正在搜索数据库…

690 ·GitHub
这是什么?devvm 为每个项目文件夹提供一台独立隔离的虚拟机,里面装好了该项目所需的工具链,你或编程智能体可以直接开始写代码。
这是命令行工具还是可以导入的库?这是一款面向 macOS 和 Linux 的命令行工具。它使用 Lima 运行虚拟机,因此安装时会一并装上 Lima。
怎么让它跑起来?在 macOS 上用 Homebrew 安装,在 Linux 上运行安装脚本。然后运行 devvm doctor 查看缺少什么,再在项目文件夹里运行 devvm,即可创建该项目的虚拟机。
安装前需要准备什么?macOS 13 或更高版本,或者 Linux,架构为 arm64 或 x86_64,还需要 Lima 2.2 或更高版本。其余依赖由 devvm doctor 检查。
它能在 Intel 芯片的 Mac 上用吗?目前尚未确认。它只在 Apple 芯片的 Mac 和 Linux 上测试过,Intel 芯片的 Mac 上没有测试。
第一次运行之后速度怎么样?第一次运行会构建一次基础镜像,需要几分钟。之后创建的虚拟机只需几秒就能启动,因为每台虚拟机都是该基础镜像的一份副本,工具链则在各虚拟机之间以只读方式共享。
它会自动安装哪些工具链?它会根据项目中的文件识别 node、python、rust、go 和 dotnet,例如文件夹里有 package.json 就会自动配置 node。
我可以往虚拟机里添加自己的配置吗?可以。运行 devvm layer new 可以创建你自己的层,它与内置的 docker、nix 和 desktop 层并列存在。
有哪些类似的项目?coop, agentbox, brig, lima, wslmanager, ProxmoxVE, arcbox, nvx
作者
devvmhq
大小
23.4 MB
星标
690
时长
12天
提交 · 90 天