runy
Kubernetes-style config for your dev environment
Declare what a workspace needs in YAML: dev servers, ports, worktrees, microVMs, watchers. The runy daemon brings them to the state you declared and keeps them there, on this computer, inside its microVMs and on the computers you pair it with.
Switch a namespace on and its resources come up. preview checks out a worktree and loads the workspace inside it. Under Machines, sandbox is a microVM on this computer with a runy daemon of its own, and lab is a paired computer: select one to see its workspace.
A workspace, run like a cluster
A cluster declares what should run and a controller makes it so. runy borrows that shape for the dev environment: resources in YAML documents, a daemon that reconciles them, status you can read.
Declare
A folder of YAML files is a source you load. Each YAML document in it is a resource, in the namespace it names: a kind, a name and a spec. A spec can read what another resource has published.
kind: process
name: web
spec:
cmd: pnpm
args:
- dev
- --port
- ${ port.web }
restart: { on: failure }Reconcile
The daemon renders every document, holds one back until what it reads exists, starts what is missing and restarts what fails its health check.
Observe
Every resource publishes a condition and a status. runy ps lists them, the console shows the tree, and each line of output is kept in a journal.
{
"state": "running",
"pid": 48213,
"healthy": true,
"restarts": 0
}Workspaces inside microVMs
A vm resource keeps a microVM running through smolvm, from an OCI image or from a template's build. With daemon: true a runy daemon runs inside: the console lists it under Machines,-m sandbox sends a command to it, and this computer's proxy serves its ports.
A template is built once
runy build runs the build steps in a builder machine and packs its disk. Until the image or the build steps change, a later build starts the kept builder and runs only the refresh steps.
kind: template
name: devbox
spec:
driver: smolvm
image: debian:bookworm-slim
net: true
workdir: /work/acme
ssh: true
daemon: true
build:
- apt-get update
- apt-get install -y git openssh-server
- git clone https://github.com/acme/app /work/acme
refresh:
- git -C /work/acme pull -qEach vm starts from the build
A vm with template starts with the tools and checkout the build left, and a later build leaves it alone. It gets only the secrets it lists: with credential the guest holds a stand-in, and smolvm puts the value on its HTTPS requests to the secret's hosts. A branch copies a running vm, memory and disks, in about half a second.
kind: vm
name: sandbox
spec:
template: devbox
branchable: true
secrets:
- secret: ${ secret.github }
credential: GITHUB_TOKENPair another computer
Two daemons pair with a ticket that works once. Each proxy then serves the other's domains, the routes into its machines among them, over an encrypted connection. Names under *.localhost resolve to the loopback on every computer, so DNS stays as it is. A paired computer can call your daemon's API, so pair only computers whose users you trust.
On lab, http://web.app.acme.sandbox.studio.runy.localhost opens the web server in the vm on studio, and ssh [email protected] reaches its sshd.
Every line of output is kept
A process's output goes to a SQLite journal the console streams. The same query filters what is stored and what arrives next.
How journals workTick @stderr, or type a word.
Built for the whole stack
What a workspace needs around its processes, and what the daemon does with it.
Health checks
http, tcp or exec probes publish healthy. A check that fails N times in a row restarts the process.
Ports and domains
A port finds a free port and publishes it. The daemon's proxy serves it at web.localhost, or behind a tunnel.
Worktrees
A branch is checked out, its hooks run, and the namespaces inside it load as a child workspace.
Journals
Output lands in SQLite, filtered by stream, level or word, and streams to the console as it arrives.
Boxes over ssh
An agent links to a runy daemon on a box you reach with ssh, uploading the binary when it differs. -m sends a command there.
Upgrades in place
A rebuilt CLI hands its running processes to the new daemon. Your dev servers stay up.
Up in a minute
The guide writes a first folder of resources, loads it, enables its namespace and opens the console.

