--key value, --key=value, or bare --key for boolean flags. Flags can appear before or after positional arguments.
Flag Reference
boolean
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.boolean
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.string
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
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.boolean
Overwrite existing files on
new and add commands. Without this flag, both commands throw an error if any destination file already exists.boolean
Skip interactive prompts on the
init command. Use this flag in CI pipelines or scripted project setup where stdin is unavailable.boolean
Skip sample recipe scaffolding on the
init command. Creates the project structure (agent/skills/, docs/, .zap/, etc.) without generating a starter Zap.md recipe.string
Use a named example recipe during
init. The named recipe is scaffolded instead of the default hello-world starter.boolean
Print the CLI version and exit. Can also be invoked as
zap --version before any command.boolean
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:
This can be set in your
.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:
Step object fields:
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
