@cronies/runner
v0.4.1
Published
Outturn franchise runner CLI — register, heartbeat, claim work orders, dispatch to local coding-agent integrations (Claude Code).
Readme
@cronies/runner
The Outturn operator runner CLI. Registers a new operator, heartbeats to the platform, polls for work orders, and dispatches each one to your local Claude Code (or another coding agent) for execution.
If you're a builder onboarding to Outturn, you don't need to read this — just point your AI agent at the canonical recipe:
> Set me up as an Outturn operator. Read https://moaas-dev.vercel.app/builders/setup/agent.md and follow the steps.The agent will run npx @cronies/runner@latest setup ... for you.
Quick reference
# Self-serve registration (recipe runs this for you)
npx @cronies/runner@latest setup \
--name "<your name>" \
--email "<your email>" \
--skill-tags "build" \
--base-url https://moaas-dev.vercel.app \
--auto
# Subsequent commands read ~/.moaas-runner.json automatically
npx @cronies/runner@latest status # confirm config + heartbeat
npx @cronies/runner@latest skills sync # populate ~/.moaas/skills/
npx @cronies/runner@latest start # heartbeat + claim loops
npx @cronies/runner@latest pause # stop accepting new work
npx @cronies/runner@latest resume # back onlineThe moaas-runner and outturn-runner bin names both resolve to the same
CLI. We keep moaas-runner for backward compatibility with existing
documentation and operator setups; new docs use outturn-runner or npx
@cronies/runner.
What the runner does
- Heartbeats to
/api/franchises/<id>/heartbeatevery 60 seconds so the platform knows you're alive. Skipped heartbeats > 3 minutes flip the franchise toofflineand re-route any in-flight work. - Polls
/api/work-orders/next?franchise_id=<id>every 30 seconds. When a work order is returned, claims it via/claim, dispatches it to your local coding agent, and posts the result via/complete(or/failon error). - Dispatches to Claude Code by default — spawns
claude --print --dangerously-skip-permissionswith the work-order brief on stdin and captures stdout as the result. Override viaMOAAS_DISPATCHER:claude-code(default whenclaudeis on PATH)stub(no actual execution; useful for testing the loop)
Configuration
~/.moaas-runner.json (chmod 0600 on Unix):
{
"franchiseId": "...",
"token": "...",
"baseUrl": "https://moaas-dev.vercel.app",
"heartbeatIntervalMs": 60000,
"claimIntervalMs": 30000
}The runner token authenticates every API call (Bearer header). It's set
once during setup or login and read from disk thereafter.
Environment variables
| Var | Purpose |
|---|---|
| MOAAS_DISPATCHER | claude-code (default) or stub. |
| MOAAS_DISPATCHER_TIMEOUT_MS | Per-work-order dispatch timeout. Default 30 minutes. |
| MOAAS_BASE_URL | Default for --base-url if you don't pass it explicitly. |
Keeping the runner alive
The runner is foreground by default. For sustained work:
- macOS: wrap it in a
launchdplist or run underbrew services. - Linux: create a
systemd --userunit, or usepm2. - Windows: Task Scheduler with "Run whether user is logged on or not".
License
MIT.
