snag / getting started

Snag · FMEA for pull requests

Get started

Snag turns a change into a Happy Path → Failure Map. Start with the open-core CLI on your own machine — the backend adds a collaborative layer on top of the same maps.

The CLI is the open core: bring your own LLM key, generate maps locally, and commit them next to the code they describe. Requires Node.js ≥ 20.

1 · Install

Add the CLI

Install it globally, or run it on demand with npx:

npm install -g @snag-run/cli
snag --help

# …or run without installing:
npx @snag-run/cli --help
2 · Configure a key

Bring your own LLM key

Snag talks to your model provider with your API key, read from the environment — nothing is proxied through a Snag service. The default provider is Anthropic; openai and openrouter work too.

export ANTHROPIC_API_KEY=sk-ant-...   # default provider
# …or a single key for whichever adapter is active:
export SNAG_API_KEY=...

Override per run with --adapter / --model, e.g. snag map prd.md --adapter openai --model gpt-5.4-mini.

3 · Map a change

Point it at a doc or some code

snag map auto-resolves the target: a .md/.txt doc becomes a spec, a code file a module, a bare name a capability.

snag map docs/prd/checkout.md
#  → writes .snag/maps/docs/prd/checkout/<timestamp>.json  (commit this)

Maps are JSON, meant to be committed — diffs across snapshots show how a change's failure surface moves over time.

4 · Read the map

Open the interactive viewer

snag view serves a read-only map browser — the same viewer the demo maps use.

snag view
#  → http://localhost:7624  (omit the map arg for an index of every map)
Coming soon

The collaborative layer

The CLI is single-player and offline. The backend keeps the same maps but adds a place for a team to read and argue about them together — hosted, with sign-in and shared workspaces. It's in active development; there's nothing to install yet.

Multiplayer maps Comments 👍 / 👎 feedback AI chat
Get on the list Want early access? Reach out and I'll keep you posted.