npx failpath <command>, or drop the npx failpath prefix if you’ve installed the package globally.
init
Useinit to connect your repository to a Failpath project for the first time. The command writes your project key to a local .env file, adds that file to .gitignore so the key isn’t committed, creates the .failpath/ directory with an AGENTS.md guidance file, and pulls your project’s current dashboard graph into .failpath/flows.json.
Options
Options
Your Failpath project key. Find this in the Failpath dashboard under your project settings. The key is written to
.env as FAILPATH_PROJECT_KEY and is read automatically by publish and sync on subsequent runs.Override the default API endpoint (
https://api.failpath.dev). Use this only during local API development. For a persistent override, set FAILPATH_DEV_ENDPOINT in your shell instead.- Creates or updates
.envwithFAILPATH_PROJECT_KEY=<key> - Adds
.envto.gitignore(creates the file if it doesn’t exist) - Creates
.failpath/AGENTS.mdwith SDK integration guidance for AI coding agents - Pulls the project’s current dashboard graph into
.failpath/flows.json
You only need to run
init once per repository. After that, use sync to pull dashboard updates and publish to push local changes.publish
Usepublish to validate your local .failpath/flows.json and push any edits you’ve made back to the Failpath dashboard. Run this after editing your flow graph locally to keep the dashboard in sync with your repository.
Options
Options
Override the default API endpoint (
https://api.failpath.dev). Use this only during local API development. For a persistent override, set FAILPATH_DEV_ENDPOINT in your shell instead.- Reads
FAILPATH_PROJECT_KEYfrom your environment or.envfile - Validates the structure of
.failpath/flows.json - Pushes the validated graph to the Failpath dashboard
sync
Usesync to pull the latest version of your project’s flow graph from the Failpath dashboard into .failpath/flows.json. Run this whenever you or a teammate has made changes in the dashboard that you want reflected in the repository.
Options
Options
Override the default API endpoint (
https://api.failpath.dev). Use this only during local API development. For a persistent override, set FAILPATH_DEV_ENDPOINT in your shell instead.- Reads
FAILPATH_PROJECT_KEYfrom your environment or.envfile - Fetches the current graph from the Failpath dashboard
- Overwrites
.failpath/flows.jsonwith the latest graph