Skip to main content
The @wzrdtech/zap package exposes a zap binary that provides a full suite of commands for creating, validating, linting, and running Zap recipes. Node 24.x is required. Install globally or invoke directly with npx @wzrdtech/zap@0.1.0 <command>.

Installation


zap init <dir>

Usage
Description Creates a new Zap project at the specified directory. The command creates the full project scaffold:
  • agent/skills/ — directory for skill sub-packages
  • docs/ — project documentation directory
  • .zap/ — local run artifacts and config
  • package.json — pre-wired with @wzrdtech/zap dev dependency and zap:* npm scripts
  • AGENTS.md — AI agent instructions for working with the project
  • .gitignore — ignores .env*, .zap/runs, and node_modules
  • .env.example — template for required environment variables
Unless --empty is passed, a sample recipe (defaults to hello-world) is scaffolded under agent/skills/. Use --example <name> to choose a different starter recipe. Flags Example

zap new <slug>

Usage
Description Scaffolds a new recipe skill directory at agent/skills/zap-<slug>/. The slug is automatically lowercased and normalized (non-alphanumeric characters become hyphens). Must be run from a Zap project root (a directory containing package.json and agent/skills/). The following files are created inside agent/skills/zap-<slug>/:
  • SKILL.md — skill description for AI routing
  • Zap.md — recipe file with YAML frontmatter and a default mock pipeline
  • prompts/initial-frame.md — image generation prompt template
  • prompts/initial-gen.md — video generation prompt template
If any of these files already exist, the command throws an error unless --force is provided. Flags Example

zap validate [Zap.md]

Usage
Description Validates the YAML frontmatter of one or more Zap.md recipe files. Without arguments, discovers and validates all agent/skills/*/Zap.md files in the current project. Validation checks include:
  • Required fieldszap, version, description, budget, and steps must all be present
  • Non-empty steps array — at least one step is required
  • Step field requirements — every step must have id and kind
  • Unique step IDs — duplicate step IDs within a recipe are rejected
  • Declared input variables — prompt files may reference {VARIABLE} tokens; every referenced variable must be declared in inputs
  • HyperFrames stitch — if a stitch step uses engine: hyperframes, a DESIGN.md file must be present in the project root
Exits with code 1 if any recipe fails validation. Flags Example

zap lint [Zap.md]

Usage
Description Runs policy checks against one or more recipe files, emitting warnings (not errors) for guideline violations. Without arguments, lints all agent/skills/*/Zap.md files in the current project. Policy checks include:
  • Live provider default — warns if defaults.provider is set to anything other than mock. Silence with ZAP_LINT_ALLOW_LIVE_DEFAULT=1.
  • Positive budget cap — warns if budget.cap_usd is zero or negative
  • Stitch step presence — warns if the recipe does not end with a stitch step
Lint warnings do not fail the process; use validate for hard errors. Flags Example

zap run <Zap.md>

Usage
Description Executes a recipe pipeline. By default runs in mock mode: no real provider calls are made and all steps resolve immediately with mock URLs. Pass --live to plan real provider spend. Pipeline execution:
  1. Parses and validates the Zap.md frontmatter
  2. Resolves inputs — in mock mode, required inputs without values receive placeholder defaults (mock-<name>)
  3. Expands video.extend steps according to --extend <n> (or the step’s repeat.default)
  4. Computes a spend quote for live runs; rejects if the quote exceeds budget.cap_usd
  5. Saves the result to .zap/runs/<runId>/result.json
Budget enforcement:
If the computed quote exceeds budget.cap_usd, the run is rejected with an error:
Run quote $X.XX exceeds recipe cap $Y.YY.
Run ID format: run_<base36-timestamp>_<sha1-prefix> (e.g. run_m3x9k2_a1b2c3) Flags Example — mock run
Example — live plan
A live run sets status: "queued" and mode: "live". zapUrl is omitted until the web runtime processes the job. quoteUsd reflects the estimated spend computed from per-model rates.

zap status [runId]

Usage
Description Reads local run artifacts from .zap/runs/. Without a runId, lists all run IDs stored locally. With a runId, prints the status and URL for that specific run. Flags Example

zap add <name>

Usage
Description Copies a pre-built recipe from the bundled registry into agent/skills/ in your project. The name argument may omit the zap- prefix; it will be added automatically. Must be run from a Zap project root. Available registry entries: Flags Example

zap docs [topic]

Usage
Description Prints bundled documentation to stdout. If no topic is provided or the topic is not found, lists all available topics. Available topics: Flags Example

zap skills [generate|update|check]

Usage
Description Manages skills/skills-manifest.json, a content-addressed inventory of all skill directories. The manifest records each skill’s name, file count, SHA-256 hash, and relative path. The check subcommand is used in CI to ensure the manifest stays in sync with skill changes. Flags Example

zap doctor

Usage
Description Runs a series of environment health checks and reports ok or warn for each. Does not throw on failures — all results are advisory. Flags Example

zap dev

Usage
Description Proxies to npm run dev in the current working directory. Starts the Next.js development server. Equivalent to running npm run dev directly in your project.

zap studio

Usage
Description Starts the Next.js development server with the --turbo flag enabled. Proxies to npm run dev -- --turbo. Use this for faster incremental builds during recipe and UI development.

zap info

Usage
Description Prints environment metadata useful for bug reports and support:
  • cwd — current working directory
  • node — Node.js version string
  • platform — OS platform and CPU architecture
  • version — CLI version
Flags Example

zap upgrade

Usage
Description Prints upgrade instructions. In v0.1, the CLI does not auto-upgrade. Reinstall the package to get the latest version:

zap feedback <message>

Usage
Description Saves a feedback message locally to .zap/feedback.ndjson in the current working directory. Each entry is a newline-delimited JSON record with the message and an ISO 8601 timestamp. Feedback is stored locally only — nothing is sent to any remote endpoint. Flags Example

zap telemetry [on|off]

Usage
Description Manages the local telemetry preference, stored in .zap/telemetry.json. Telemetry is off by default and must be explicitly enabled. Running zap telemetry without an argument (or with status) reports the current state without changing it. Flags Example