Getting started
-
Mark the workspace root. A workspace is the folder that holds a
.runy.json(or.runy.yaml,.runy.yml,.runy.toml). An empty object is enough:.runy.json {}runy finds the root by walking up from the current directory, so every command below works from any folder inside it.
-
Write a namespace. A namespace is a
.runy/folder; each*.yamlin it holds resources, separated by---. The namespace is named after the folder that holds.runy/, hereweb:- .runy.json
Directoryproducts
Directoryweb
Directory.runy
- dev.yaml
- package.json
Directorysrc/
- …
products/web/.runy/dev.yaml kind: portname: webspec:preferred: 3010domains: [web.localhost]---kind: processname: webspec:cmd: pnpmargs: [dev, --port, "${ port.web.status.value }"]cwd: products/webrestart: { kind: fixed, delay: 1000, max_restarts: 5, on: failure }health:http:http: { port: "${ port.web.status.value }" }initial_delay: 2period: 1failures: 60The
portasks for 3010 and falls back to a free port between 3000 and 3999. Theprocessreads the port’s published value through an expression, so it is held back until the port has one. The health check probeshttp://localhost:<port>/every second and restarts the dev server after a minute of failures. -
Activate it.
Terminal window cd products/webruny ns upWith no names,
runy ns upactivates the namespace enclosing the current directory. The first CLI call starts the daemon in the background; it stays up after the shell closes. The active set is remembered, so the dev server is back after a reboot as soon as anyrunycommand runs. -
Look at it.
Terminal window runy ps┌───────────┬───────────┬─────────────────┬───────────┬─────────────────────────────┐│ Workspace │ Namespace │ Resource │ Condition │ Status │├───────────┼───────────┼─────────────────┼───────────┼─────────────────────────────┤│ umka │ web │ web/port/web │ Resolved │ 3010 → http://web.localhost ││ umka │ web │ web/process/web │ Resolved │ running healthy │└───────────┴───────────┴─────────────────┴───────────┴─────────────────────────────┘http://web.localhostreaches the dev server through the daemon’s proxy. The console athttp://localhost:4122shows the tree, each resource’s spec, status and condition, and streams the process’s output. -
Change something. Edit
dev.yamland save. The daemon re-reads the file, re-renders every resource and applies only what differs: a newargsrestarts the process, a newmax_linesfor its journal does not, a typo in a field name shows up as a diagnostic inruny nsand the console before anything runs.
Day to day
Section titled “Day to day”runy ns # every namespace, active or not, with diagnosticsruny ns down # stop this namespace's resourcesruny signal web/process/web restart # restart one processruny signal workspace restart # re-read the resource files (without watchman)runy daemon stop # stop the daemon and everything it runs
