Linux microVMs · local first
Real Linux sandboxes.
On your machine.
grain runs small, disposable Linux VMs locally — for a shell, for GitHub Actions, or for a throwaway k3s lab. CLI, optional Desktop GUI, recipe library, and MCP — all talking to the same daemon. Ephemeral by default; persistent when you need it.
Install
$ curl -fsSL https://raw.githubusercontent.com/cxdy/grain/main/scripts/install.sh | bash
$ brew install qemu
$ grain doctorPlaces the CLI on your PATH and the guest agent under ~/.grain/agent/. QEMU is required for real VMs.
$ curl -fsSL https://raw.githubusercontent.com/cxdy/grain/main/scripts/install.sh | bash
$ sudo apt-get install -y qemu-system qemu-utils # Debian/Ubuntu
$ grain doctorOn Fedora use dnf install qemu-system-x86 qemu-img. KVM helps when available.
$ go install github.com/cxdy/grain/cmd/grain@latest
$ # or from a checkout:
$ just build && just agent-linux && ./bin/grain doctorRequires Go 1.23+. Release binaries also ship on GitHub Releases.
Product surface
More than a CLI. Same control plane for Desktop, recipes, warm pool, and Firecracker.
Operator console
Optional Wails GUI — sandboxes, shell, multi-Run, recipes tab, warm pool, activity feed, multi-host. Not Electron; thin client of the daemon API.
install.sh --desktop
Desktop guide → RecipesYAML library + catalog
Portable create + bootstrap files in ~/.grain/recipes.
Official catalog, URL import (preview then add), deploy as a separate step.
grain recipe search && grain new --recipe …
Recipe guide → SpeedWarm pool & fast create
Suspend a golden, clone + loadvm, or claim a pre-filled pool member. Desktop prefers the pool when ready > 0.
grain new --from-pool
Lifecycle → FirecrackerLinux + KVM backend
Supported second hypervisor: vFC-1 agent over vsock, vFC-2 TAP publish/fwd. QEMU stays the default on macOS and Linux.
hypervisor: firecracker
Firecracker →Pick a path
Same install, four first destinations.
Open a Linux shell
Pull an image, create a sandbox, drop into a PTY.
grain new && grain sh
First sandbox → 02 · CIRun GitHub Actions
nektos/act inside an isolated microVM.
grain act -- -j test
act recipe → 03 · k3sSpin up a k3s lab
Single-node Kubernetes on a host port.
grain new --preset k3s -p
k3s recipe → 04 · MCPAgent sandboxes
Give coding agents create/exec/delete over MCP.
grain up --mcp
MCP docs →Try it here
Simulated terminal — switch scenarios, type commands, or click Run step.