Skip to main content
Failpath gives you real-time visibility into every step of your backend workflows. Connect your repository with the Failpath CLI, instrument your functions with the TypeScript SDK, and watch each run move through its steps on the dashboard — with a clear record of what passed, what failed, and what was skipped.

Introduction

Learn what Failpath is, how the CLI and SDK fit together, and the key concepts you need to get started.

Quick Start

Initialize Failpath in your repo, instrument a backend function, and publish your first flow in minutes.

CLI Reference

Explore the init, publish, and sync commands that manage your flow graphs.

SDK Reference

Browse the full @failpath/sdk API for createFailpathClient, run(), step(), and more.

Get started

Follow these four steps to go from a blank repo to a live, monitored flow on the Failpath dashboard.
1

Create a project in the Failpath dashboard

Sign in to app.failpath.dev and create a new project. Once it’s created, copy your project key — it looks like fp_project_xxx and is the only credential you need to connect your repository.
2

Initialize your repository

Run the following command at the root of your repo, replacing fp_project_xxx with your actual project key:
npx failpath init --project-key fp_project_xxx
This creates a .env file with FAILPATH_PROJECT_KEY, a .failpath/flows.json file containing your dashboard’s current flow graph, a .failpath/AGENTS.md file with step-key guidance, and updates .gitignore to keep secrets out of version control.
3

Install @failpath/sdk and instrument your code

Install the SDK in your backend project:
npm install @failpath/sdk
Then wrap your backend functions with createFailpathClient, run(), and step() so Failpath can track each step as it executes:
import { createFailpathClient } from "@failpath/sdk";

const failpath = createFailpathClient({
  projectKey: process.env.FAILPATH_PROJECT_KEY!,
});

export async function handleCheckout(requestId: string) {
  const run = failpath.run("checkout", { runId: requestId });

  const cart = await run.step("validate-cart", async () => {
    return validateCart();
  });

  await run.step("charge-card", async () => {
    return chargeCard(cart);
  });
}
4

Publish your flow to the dashboard

Push your local flow graph to Failpath so the dashboard reflects your code:
npx failpath publish
Failpath validates .failpath/flows.json before pushing, so any structural issues are caught before they reach the dashboard.