.failpath/flows.json, generate typed SDK bindings in .failpath/sdk.ts, and push local edits back. Because the CLI ships as the failpath npm package, you can run it instantly with npx or install it globally if you prefer.
Installation
You don’t need to install anything to get started. Run any Failpath command directly withnpx:
npx failpath with failpath in any command.
What the CLI Does
The CLI keeps.failpath/flows.json and .failpath/sdk.ts in sync between your repository and the Failpath dashboard. You define or refine flow graphs in the dashboard, pull them into your repo with sync, wire them up in your code using the generated typed SDK helper, and then push any local edits back with publish. This round-trip gives your team a single source of truth for flow definitions that lives both in version control and on the dashboard.
init
Set up a new project in your repository. Writes your project key to
.env, creates the .failpath/ directory, pulls the current dashboard graph, and generates typed bindings.publish
Validate your local
.failpath/flows.json, regenerate .failpath/sdk.ts, and push edits to the Failpath dashboard.sync
Pull the latest dashboard graph into
.failpath/flows.json and regenerate .failpath/sdk.ts.The .failpath/ Directory
Running init creates a .failpath/ directory at the root of your repository with three files:
flows.json is the local representation of your project’s flow graph. The sync command overwrites it with the latest dashboard state, and publish reads it to push your edits back. Commit this file to version control so your team shares a consistent flow definition.
sdk.ts is generated from flows.json by init, sync, and publish. Import failpathFlows and createTypedFailpathClient from this file to autocomplete flow slugs and step keys in TypeScript.
AGENTS.md contains step-by-step guidance written specifically for AI coding agents (such as Copilot or Cursor). It tells agents how to use flows.json and sdk.ts to instrument your code with the Failpath SDK.