This walks you from a fresh install to a real run in a few commands, using nothing but the published relayflows CLI. No scaffolder, no project template.
1. Install
npm init -y
npm install @relayflows/surface relayflowsTypeScript flows import @relayflows/surface at runtime, so it's a project dependency. YAML is data — the global relayflows install is all you need.
2. Write a flow
// hello.flow.ts
import { flow } from '@relayflows/surface';
export default flow('hello', async (f) => {
const greeting = await f.run('printf "Hello from Relayflows"');
console.log(greeting.trim());
f.done('success');
});YAML is canonical — the compiler can check it without running anything. TypeScript is the power tool: the same primitives, called imperatively, with ordinary if/for control flow around each await.
3. Run it
npx flows run hello.flow.ts --input '{}'This is a real, captured run:
Hello from Relayflows
RUN 01M26JC2VPAGFVTCVWFT3GSCXQ completed (2 steps) completionReason: successEvery step's outcome is in the journal now, keyed by that run ID. flows check only takes a flow.yaml or spec.json — a TypeScript flow gets the same preflight for free, as the first thing flows run does.
4. If it gets interrupted
flows run starts a background daemon, relayflowd. The journal lives there, not in the CLI process you typed the command into. Close the terminal, lose power, or kill the daemon itself mid-run: nothing is lost.
flows resume 01M26JC2VPAGFVTCVWFT3GSCXQresume starts a fresh daemon if none is up, reads the journal from disk, and continues from the first step that never recorded a completionReason — the step already marked done doesn't run again.