Reference

CLI

Every command and flag of the prongs CLI. Generated from the same data as prongs --help.

Run it with npx prongs, or through your package manager’s scripts. It needs Node 22.18 or newer: it loads your TypeScript registry with Node’s built-in type stripping.

Commands

prongs add

Copy the UI components and starter intents into your repo, and write prongs.json.

  • --dir

    Where the components go. Defaults to components/prongs.

    <path>
  • --force

    Overwrite files that already exist.

    flag
Terminal
npx prongs add

prongs add logs

Add the logs profile: audit, security, incident, job and debug intents, plus log().

prongs add errors

Add the errors profile: request, auth, permission, record, conflict, limit and failure intents, plus fail(). Adds the logs profile too, which errors write to.

prongs add analytics

Add trackIntents(), which reports presses, submits, toggles and opens as events named by intent. You decide where they go.

prongs find <what it is for>

Look up the intents for a job: each match with what it renders, its "not for" lines and how code writes it.

  • --limit

    How many matches to show (default 3).

    <n>
  • --json

    Print the matches as JSON, for tools.

    flag
Terminal
npx prongs find "wrong email or password"

prongs check [paths...]

Check how intents are used. Existing violations in the baseline pass; new ones fail.

  • --json

    Print the findings as JSON, for tools.

    flag
  • --suggest

    Group repeated overrides and styled raw elements into proposed intents.

    flag
  • --update-baseline

    Record today’s findings in .prongs/baseline.json, so only new ones fail.

    flag
  • --no-baseline

    Ignore the baseline and report everything.

    flag
  • --max-unsafe

    Fail when unsafeClassName is used more than n times.

    <n>
  • --hook

    Run as an agent hook: read the edited file from the hook payload and answer in that tool’s format.

    claude | cursor
Terminal
npx prongs check --suggest

prongs add-intent <id>

Add an intent to the registry, validate it, and regenerate PRONGS.md. Rolls back if the registry would be invalid.

  • --description

    Required: what the intent is for, in a sentence.

    "<what it is for>"
  • --refs

    Intents to build it from.

    a,b
  • --classes

    UI intents: its own classes.

    "..."
  • --element

    UI intents: the element it renders.

    <tag>
  • --not-for

    When not to use it.

    "<context>"
  • --instead

    What to use in that case.

    <id>
Terminal
npx prongs add-intent action.follow --refs control.primary --description "Follows a person"

prongs spec

Write PRONGS.md from the registry.

  • --out

    Where to write it. Defaults to PRONGS.md.

    <file>
  • --agents

    Also add a short block to AGENTS.md, and make sure CLAUDE.md reaches it.

    flag
  • --check

    Write nothing; fail if PRONGS.md is out of date. For CI.

    flag
Terminal
npx prongs spec --agents

prongs export

Print the registry as JSON, in the shape the spec defines, for tools that do not run TypeScript.

  • --out

    Write it to a file instead of printing it.

    <file>
Terminal
npx prongs export --out prongs.registry.json

prongs install-hooks

Run prongs check on every file an agent edits.

  • --claude

    Only the Claude Code PostToolUse hook.

    flag
  • --cursor

    Only the Cursor postToolUse hook.

    flag

Common options

  • --config

    Use a config file other than ./prongs.json.

    <prongs.json>
  • --cli

    How printed commands should call the CLI, e.g. "yarn prongs".

    "<how to run prongs>"