Linux microVM sandboxes on your own hardware.
Documentation
·
Quick start
·
Releases
Apache-2.0 · macOS & Linux
grain runs small, disposable Linux VMs locally — for a shell, for GitHub Actions (grain act), or for a throwaway k3s lab. Ephemeral by default; persistent when you want it.
curl -fsSL https://raw.githubusercontent.com/cxdy/grain/main/scripts/install.sh | bashInstall QEMU, then check dependencies:
# macOS
brew install qemu
# Debian / Ubuntu
# sudo apt-get install -y qemu-system qemu-utils
grain doctorgrain up
grain image pull grain-ubuntu
grain new
grain shWhen you’re done:
grain rm
grain downOptional starter config and more flags: quick start.
Run nektos/act inside an isolated microVM so host Docker stays clean.
cd /path/to/your/repo
grain act -- -l # list workflows
grain act -- -j test # run a jobSingle-node Kubernetes with the API published to the host.
grain new --preset k3s -n lab -p --wait userdata
grain fwd ls lab # host port → guest 6443| Area | What you get |
|---|---|
| CLI | up · new · sh · x · rm · mounts · port forwards · profiles |
| Presets | act · k3s · docker |
| Guest agent | Exec, shell, file copy, and fs ops without living in SSH |
| API | Unix socket + optional TCP · OpenAPI |
| SDKs | Go · TypeScript · Python |
| Page | |
|---|---|
| Install | Platforms and install options |
| Quick start | Config + first VM |
| First sandbox | Tutorial + interactive demo |
| act | GitHub Actions in a microVM |
| k3s | Single-node cluster preset |
| Guides | Images, agent, networking, mounts, proxy |
| Reference | CLI, config, API, SDKs |
The site is built from this repo’s docs/ directory.
just test # unit tests (mock hypervisor)
just smoke-api # CLI + daemon e2e without QEMU
just build