The Zap CLI uses a consistent flag syntax across all commands. Most flags that control output format or execution mode work on any command that produces output. Flags are parsed uniformly: they acceptDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/gratitude5dee/Zap/llms.txt
Use this file to discover all available pages before exploring further.
--key value, --key=value, or bare --key for boolean flags. Flags can appear before or after positional arguments.
Flag Reference
Emit JSON to stdout instead of human-readable text. All commands that produce output support this flag. Useful for agent consumption, scripting, and piping output to other tools. When set, error messages are still printed to stderr in plain text with a
zap: prefix.Allow real provider spend on the
run command. Without this flag, run executes in mock mode: no external API calls are made, all steps resolve instantly, and quoteUsd is 0. With --live, the CLI computes a real spend quote from per-model rates and rejects the run if the quote exceeds budget.cap_usd.Provide a recipe input value as a In mock mode, required inputs that are not supplied receive placeholder defaults:
KEY=VALUE pair. This flag is repeatable — pass it multiple times to supply multiple input values. Input keys must match a declared entry in the recipe’s inputs map.- Text inputs default to
mock-<lowercased-key>(e.g.mock-prompt) - Image inputs default to
mock://input/<KEY>(e.g.mock://input/IMAGE)
Number of
video.extend step repetitions for the run command. Overrides the repeat.default value declared in the recipe. The final count is clamped between repeat.min and repeat.max.Overwrite existing files on
new and add commands. Without this flag, both commands throw an error if any destination file already exists.Skip interactive prompts on the
init command. Use this flag in CI pipelines or scripted project setup where stdin is unavailable.Skip sample recipe scaffolding on the
init command. Creates the project structure (agent/skills/, docs/, .zap/, etc.) without generating a starter Zap.md recipe.Use a named example recipe during
init. The named recipe is scaffolded instead of the default hello-world starter.Print the CLI version and exit. Can also be invoked as
zap --version before any command.Print the help text listing all commands and common flags, then exit. Also triggered by
zap help or running zap with no arguments.Flag Syntax Rules
The parser accepts three equivalent forms for any named flag:--input to supply multiple recipe inputs:
Environment Variable Overrides
Several CLI behaviors can be controlled through environment variables, useful for CI and Docker environments:| Variable | Effect |
|---|---|
ZAP_LINT_ALLOW_LIVE_DEFAULT=1 | Silence the zap lint warning about non-mock defaults.provider |
.env or .env.local file (automatically loaded by the CLI on startup) or exported in your shell:
JSON Output Schema
When--json is passed to the run command, the output follows this schema:
| Field | Type | Description |
|---|---|---|
live | boolean | Whether this was a live or mock run |
message | string | Human-readable status message |
mode | "mock" | "live" | Execution mode |
quoteUsd | number | Total estimated spend in USD (always 0 in mock mode) |
runId | string | Unique run identifier; also the directory name under .zap/runs/ |
status | "done" | "queued" | "done" for mock runs; "queued" for live runs awaiting web runtime |
steps | array | Per-step execution detail (see below) |
zap | string | The recipe slug |
zapUrl | string | undefined | Output URL; populated for mock runs; omitted for live runs until the web runtime completes |
| Field | Type | Description |
|---|---|---|
kind | string | Step type, e.g. image.gen, video.gen, stitch |
model | string | Model identifier; "local" for non-provider steps |
provider | string | Provider name; "mock" in mock mode |
quoteUsd | number | Per-step spend estimate; 0 in mock mode |
status | string | Step status |
stepId | string | Step ID from the recipe |
Safety Defaults
The Zap CLI is designed to be safe by default:Mock by Default
All
zap run executions are mock unless --live is explicitly provided. No provider API calls are made and no real money is spent in mock mode.Telemetry Off
Telemetry is disabled by default. It must be explicitly enabled by running
zap telemetry on. The preference is stored locally in .zap/telemetry.json.- Agents running
zap runduring recipe development do not incur unexpected provider charges - Users retain full control over whether any usage data is collected
- CI pipelines can safely run
zap validate,zap lint, andzap skills checkwithout any credentials or opt-in configuration
