CLI Reference
CLI version 0.5.1. API version v1. Requires Node.js 20 or newer.
Commands are gavana GROUP ACTION [ARGUMENTS] [OPTIONS]. gavana-canvas, craftboard, and craftboard-canvas are the same program under different names.
The CLI has one command table. Help text and shell completions are generated from it, and the CLI refuses any command that is not in it with Unknown command: … before it authenticates or sends anything. gavana canvas --help prints the usage for one group; gavana node create --help narrows it to one command.
How output works
One JSON object goes to stdout. Progress and errors go to stderr, so stdout stays parseable.
{ "ok": true, "result": {} }Output formats
--output | Produces |
|---|---|
json (default) | The ok/result envelope on one line |
jsonl | One JSON object per line; arrays are expanded into rows |
markdown | A chat-ready rendering, including image links for completed generation |
human | A flattened, indented label: value view for terminal reading |
raw | Bare strings and numbers, one per line, without JSON quotes |
--pretty indents the JSON envelope by two spaces. -r / --raw is equivalent to --output raw and may only be combined with --output json or --output raw — pairing it with human, jsonl, or markdown is a usage error.
Selecting with --jq
--jq takes a jq-style path and is evaluated by a small built-in selector, so no jq installation is required.
gavana canvas list --limit 25 --jq '.canvases[].handle' -r
gavana canvas get canvas:OWNER_UID:CANVAS_ID --jq '.canvas.revision' -r
gavana asset list --jq '.assets[]' --output jsonlSupported syntax: property paths (.canvas.revision), non-negative array indexes (.canvases[0].title), and [] projections (.connections[].models[]). Paths are limited to 500 characters, must start with ., and cannot select __proto__, prototype, or constructor. Anything else is a usage error.
--jq changes the shape of the output. Without it you get { "ok": true, "result": … }; with it you get only the selected value, unwrapped. Scripts that expect the envelope must not use --jq, and scripts that use --jq must not look for .result. When you pipe the default output into an external jq, start your paths at .result.
Errors
Errors are written to stderr:
{
"ok": false,
"error": {
"code": "input_validation_error",
"message": "baseRevision is required.",
"status": 400,
"fields": [
{
"field": "baseRevision",
"message": "Read the canvas and pass its current revision."
}
],
"requestId": "7f8e0d9d-4bf8-4e6e-96e0-8bcd6a8f315a"
}
}requestId is safe to share with support. Nothing else from a failing request is. Never share a token.
When the server names its own error code (for example input_validation_error or agent_canvas_retired), the CLI keeps it. Otherwise the code comes from the HTTP status: 400/422 to validation, 401 to unauthorized, 403 to forbidden, 404 to not_found, 409 to conflict, 429 to rate_limited, 5xx to upstream. Locally raised errors use usage, network, timeout, canceled, invalid_response, keychain_inaccessible, or internal.
Add --debug to any command that reaches the API and the CLI writes one extra stderr line with the requestId, traceId, and invocationId of that invocation. On a failure the error object carries the same debug ids.
Retry behaviour
Transient network failures and 429, 502, 503, 504 responses are retried automatically — up to three attempts, respecting Retry-After — only for GET requests. No write is ever retried automatically, and no paid generation request is ever retried automatically. Each request has a 60-second deadline.
Exit codes
| Exit | Meaning |
|---|---|
0 | Success |
1 | Any other failure, including a failed doctor |
2 | Usage, configuration, or validation error; an inaccessible Keychain credential; HTTP 400, 413, 415, 422 |
3 | Authentication or authorization error; HTTP 401, 403 |
4 | Revision or idempotency conflict; HTTP 409 |
5 | Not found; HTTP 404 |
7 | Network error — Gavana could not be reached |
8 | Timeout — you stopped waiting; the Run or Job can still be resumed |
9 | Waited work ended failed, canceled, or expired, or a Work execution came back failed, partially failed, or canceled |
Exit 9 applies to image generate|edit|variations --wait, video generate, action run, recipe run, job wait, run wait, and work execute. The complete terminal resource is still written to stdout, so a script can read the reason. Exit 8 means you stopped waiting, not that the work stopped: resume it with run wait or job wait.
Global options
| Option | Effect |
|---|---|
--output FORMAT | human, json, jsonl, markdown, or raw; JSON is the default |
--pretty | Pretty-print JSON |
--jq PATH | Select a jq-style path, for example .canvases[].handle |
-r, --raw | Print selected strings and numbers without JSON quotes |
--limit N | Maximum list items to return |
--cursor VALUE | Continue a list from page.nextCursor |
--base-url URL | Overrides saved configuration |
--profile NAME | Use one named account/environment profile |
--token-stdin | Read a login token from stdin |
--base-revision VALUE | Enforce a previously read canvas revision |
--idempotency-key VALUE | Make retries deterministic |
--destination VALUE | Exact task canvas handle; explicit new-canvas is supported |
--workspace VALUE | Workspace for canvas create; defaults to your personal workspace |
--model VALUE | Provider model id, or a model: handle from model list |
--connection VALUE | Disambiguate a provider model id by connection |
--reference VALUE | Image reference; repeat for multiple visuals |
--reference-role ROLE | Role for the matching --reference: source, identity, construction, texture, fit, or style |
--preflight | Compile an image reference plan without starting paid generation |
--input VALUE | Recipe KEY=VALUE or Action input; repeat as needed |
--param NAME=VALUE | Action parameter; repeat for multiple parameters |
--webhook-url URL | Send one signed callback when a Run finishes |
--webhook-secret-env VAR | Read the signing secret from this variable (default GAVANA_WEBHOOK_SECRET) |
--canvas-title VALUE | Title used when --destination is new-canvas |
--wait | Wait for an image Run to finish instead of returning after queueing |
--no-wait | Return immediately after queueing Recipe, video, or Action work; accepted on image commands for older scripts |
--progress | Write Run or video Job state transitions to stderr |
--debug | Write one extra stderr line with requestId, traceId, and invocationId |
Also available everywhere: --help / -h, --version / -v / -V, --yes for destructive confirmations, --timeout SECONDS and --interval SECONDS for waits, and --json / --file to supply a full JSON payload instead of individual flags.
Argument parsing
--flag valueand--flag=valueare both accepted.- Boolean flags take no value:
help,version,pretty,raw,yes,confirm,rebase,wait,no-wait,progress,preflight,token-stdin,no-verify,no-browser,audio,no-audio,read-only,debug. Of these,--wait,--no-wait,--progress,--preflight,--yes,--raw,--pretty,--audio, and--no-audioalso accept=trueor=false. - Repeatable options:
--reference,--reference-role,--element,--input,--param,--target,--field,--source-asset,--collection,--node,--change-region(and--ratio,--approvedfor the retired campaign group). Any other repeated option keeps its last value. --ends option parsing; everything after it is positional.- A non-boolean flag whose next argument starts with
--is treated astrue. If a value could start with--, use--flag=value. image generate|edit|variationsandvideo generatereject any option they do not know, before uploading or starting anything:Unknown image option: --foo. Read image --help; unsupported options never start generation.
Command groups
Twenty-two groups appear in help and completions: action, api, asset, auth, canvas, capabilities, completion, config, connection, doctor, element, image, job, mcp, model, node, provider, recipe, run, version, video, work.
Two more are still dispatched but never advertised: ai-connection, a compatibility alias of provider list, and the retired campaign group, which fails with a clear message.
auth
Authenticate a profile.
gavana auth login [--profile NAME] [--read-only] [--no-browser] [--timeout SECONDS]
gavana auth login --token-stdin [--profile NAME]
gavana auth status [--profile NAME]
gavana auth logout [--profile NAME]| Option | Effect |
|---|---|
--read-only | Request only canvas:read, asset:read, and element:read at consent |
--no-browser | Print the authorization URL instead of opening a browser |
--timeout SECONDS | How long browser login waits for you to finish signing in. Default 180 |
--token-stdin | Read a Personal Access Token from stdin instead of using OAuth |
--no-verify | Skip the post-login verification call |
--base-url URL | Sign in to a specific environment |
Browser login. The CLI registers an OAuth client at /oauth/register under a stable per-installation id, so logging in again on the same machine replaces that machine’s previous authorization instead of adding another one. It opens /oauth/authorize with PKCE (S256), listens on a loopback callback, and exchanges the code at /oauth/token for the resource /api/canvas-agent/v1. Without --read-only it requests canvas:read, canvas:write, asset:read, element:read, element:write, image:generate, video:generate, and job:manage.
While it waits, stderr says the sign-in page is already open — the URL is printed so you can show it, not so you open it a second time — and how many seconds it will wait. If the wait runs out, that page is dead: run auth login again and use the new URL. If verification or config writing fails after sign-in, the CLI revokes the token it just obtained rather than leaving a live credential behind.
Output. login returns authenticated, profile, baseUrl, configPath, a masked token, verified, loginMethod (browser or token), and — when verification ran — authType and scopes. status returns the server’s authentication result plus profile, configured, baseUrl, a masked token, credentialStore, credentialState, configPath, and, where readable, canvasCount. logout revokes a browser-login token at /oauth/revoke, removes the profile, and returns the remaining activeProfile.
Tokens are masked as the first seven characters, an ellipsis, and the last four.
gavana auth login --read-only
gavana auth status --jq '.scopes[]' -rExit codes. 0; 2 for a usage error, a sign-in that timed out or was not approved, or an inaccessible Keychain credential; 3 if the credential is rejected; 7 for a network error.
config
Manage named profiles. Never contacts the network.
gavana config list
gavana config get [PROFILE]
gavana config use PROFILEconfig with no action behaves as list; profiles is accepted as an alias for list. Neither alias appears in help.
Output. list returns activeProfile, configPath, and a sorted profiles array of name, baseUrl, active, configured, credentialStore, and credentialState. get returns one profile’s profile, baseUrl, configured, masked token, credentialStore, credentialState, and configPath. use returns active: true, the profile name, and configPath.
credentialState is available, missing, or inaccessible. inaccessible means a macOS Keychain credential exists but this process may not read it — run from a Keychain-authorized terminal, or supply GAVANA_AGENT_TOKEN for that one invocation, instead of logging in again.
gavana config list --output human
gavana config use workExit codes. 0; 2 for an unknown profile or an invalid profile name.
doctor
Diagnose the local setup. It does not log in, change profiles, or start generation.
gavana doctor [--profile NAME]Returns ok, profile, cliVersion, surface, apiVersion, a connection object when authentication succeeded, and the checks array:
| Check | Passes when |
|---|---|
node | Node.js major version is 20 or newer |
credentials | A token is available from the config file, Keychain, environment, or command line |
base_url | The base URL is HTTPS, or HTTP on a loopback address |
authentication | Gavana accepts the credential; includes its latency in durationMs |
api_compatibility | The server reports API v1. A server that does not report a version passes as unverified |
connection carries the granted scopes, the server contract the server reported, compatibility (verified, unsupported, or unknown), and updateAvailable — with an updateCommand such as npm install -g @gavana.ai/cli@VERSION when the server recommends a newer CLI. A failed authentication check includes the error code and requestId.
gavana doctor --output human
gavana doctor --jq '.checks[]' --output jsonlExit codes. 0 when every check passes, 1 when any check fails.
api
Raw passthrough to the Canvas API. Paths are restricted to /api/canvas-agent/v1.
gavana api GET /canvases --field limit=10
gavana api POST /canvases --json '{"title":"Concepts"}'
gavana api /canvasesThe method is optional and defaults to GET. Valid methods are GET, POST, PUT, PATCH, DELETE, case-insensitive.
| Option | Effect |
|---|---|
--field NAME=VALUE | Repeatable. Query parameters on GET, request body fields otherwise |
--json TEXT | A full JSON body |
--file PATH | A JSON body read from a file, or - for stdin |
Paths may contain only letters, digits, _, ., /, and -, and cannot contain ... --json and --file are mutually exclusive.
Output. The API response, unmodified, inside the standard envelope. When the server sent an X-Request-ID and the payload has no requestId of its own, the CLI adds it.
gavana api GET /canvases --field limit=5 --jq '.canvases[].handle' -r
gavana api GET /auth/status --pretty
gavana api GET /runs --field status=activegavana api is also the CLI route to the operations that have no dedicated command — see Operations without a dedicated command.
Exit codes. Mapped from the HTTP status: 2, 3, 4, 5, 7, 8, or 1.
mcp
Register or print an MCP client configuration.
gavana mcp install codex|claude [--read-only]
gavana mcp config cursor|vscode|chatgpt|local [--read-only]install executes the client’s own registration command. config prints the definition without changing anything. install supports only codex and claude; config accepts codex, claude, cursor, vscode, chatgpt, and local (stdio is an alias for local). The client may also be given as --client NAME.
| Client | Definition |
|---|---|
codex | streamable-http; runs codex mcp add SERVER_NAME --url ENDPOINT |
claude | streamable-http; runs claude mcp add --transport http --scope user SERVER_NAME ENDPOINT |
cursor | streamable-http; prints an mcpServers object with a url |
vscode | streamable-http; prints a servers object with type: "http" and a url |
chatgpt | streamable-http; prints the endpoint and connector instructions (ChatGPT requires an https endpoint) |
local | stdio; npx -y @gavana.ai/mcp@0.5.1, reading the active CLI profile or inherited GAVANA_BASE_URL and GAVANA_AGENT_TOKEN |
The hosted endpoint is the profile’s base URL plus /mcp. The server name follows the environment: gavana for production, gavana-staging for a staging host, and gavana-dev for localhost. --read-only registers the read-only connection under the same name with a -readonly suffix — so it sits beside a full-access entry instead of replacing it — and, for local, sets GAVANA_MCP_READ_ONLY=true.
install registers the server; it does not sign it in. The result says so: installed: true, authenticated: false, and nextSteps — restart the client, sign the server in from inside the client (its login is separate from the CLI’s; in Claude Code, /mcp and choose the server), and confirm with a real read such as listing canvases.
gavana mcp install codex
gavana mcp install claude --read-only
gavana mcp config vscode --pretty
gavana mcp config local --prettyExit codes. 0; 2 for an unsupported client or action; 1 if the client command fails.
capabilities
Print the machine-readable capability summary. Requires no credential.
gavana capabilitiesOutput. apiVersion, cliVersion, the ten toolsets (canvas, recipes, assets, elements, models, actions, images, videos, runs, campaigns), the 45 hosted remote tools — each with its toolset, readOnly, and paid flags — and the endpoints object with the hosted MCP and Canvas API paths. The hosted tools reference is generated from the same data.
gavana capabilities --jq '.remote[]' --output jsonlExit codes. 0.
version
gavana version
gavana --version
gavana -vOutput. { "name": "@gavana.ai/cli", "version": "0.5.1", "node": "v20.x.x" }. A global --version after an unknown command is rejected rather than answered.
Exit codes. 0.
completion
gavana completion zsh
gavana completion bash
gavana completion fishWrites a completion script to stdout. It completes the command groups in the first position and each group’s actions in the second, from the same command table as help. With no shell argument it uses --shell, then the basename of $SHELL, then zsh.
gavana completion zsh >> ~/.zshrcExit codes. 0; 2 for an unsupported shell.
canvas
gavana canvas list [--limit N] [--cursor CURSOR]
gavana canvas create --title "Task title" [--workspace WORKSPACE_ID] [--idempotency-key KEY | --id ID]
gavana canvas get canvas:<owner>:<id> [--detail summary|full] [--node node:<id>] [--offset N --limit N]
gavana canvas render canvas:<id> --file canvas.svg
gavana canvas apply canvas:<id> --file batch.json [--yes]Work on one canvas per task. Create it once, keep the handle it returns, and pass that exact handle to every later read, write, import, and generation for the task. There is no shared fallback canvas.
| Subcommand | Notes |
|---|---|
list | --limit is 1–25. Continue with --cursor from page.nextCursor |
create | Creates a named task canvas. See below |
get | Returns the full graph and the current revision, or a compact page with --detail summary |
render | Returns SVG. With --file it writes the file and returns mediaType, file, and bytes; without, it returns mediaType and svg. --file - returns the SVG inline |
apply | Applies an atomic operation batch |
canvas create in detail. --title defaults to the joined positional arguments, then to Untitled canvas. --workspace defaults to your personal workspace (personal-<uid>); an explicit shared workspace requires editor or higher membership. New canvases are private.
Pass a stable --idempotency-key of 8–200 characters and reuse it only for the identical request: an identical retry returns the same canvas, and the same key with a changed title or workspace is a conflict. --id is the legacy alternative; the two cannot be combined. Each flag may also come from --json/--file, and a value given both ways must match.
TASK_CANVAS=$(gavana canvas create --title "Bottle launch" \
--idempotency-key "bottle-launch-task-20261005" --jq '.canvas.handle' -r)
gavana canvas get "$TASK_CANVAS"canvas get in detail. Without options it returns the complete graph. --detail summary returns a compact page of nodes — --limit 1–100, default 50, and --offset — with each node’s handle, type, title, geometry, and status. --node (repeatable) with the default --detail full returns just those nodes with full metadata and the connections that touch them. Partial reads carry a readContext with the revision, totals, nextOffset, and any missingNodeIds: read the relevant nodes in full before you edit.
gavana canvas get "$TASK_CANVAS" --detail summary --limit 50
gavana canvas get "$TASK_CANVAS" --node node:OUTPUT --node node:REFERENCEcanvas apply in detail. Operations come from --json, --file, or --operations as a JSON array. If the batch contains any node.delete or connection.delete, --yes is required. --base-revision is read from the canvas automatically when omitted; --idempotency-key is generated as a UUID when omitted. Supply both explicitly for anything you might need to retry.
A batch that would add new overlap between your own nodes, or push a node outside its Section, is refused with 422 and nothing is written. Fix the layout; "force": true in the JSON file applies it anyway. Historical findings on the existing canvas stay advisory.
gavana canvas list --limit 25 --jq '.canvases[].handle' -r
gavana canvas render "$TASK_CANVAS" --file ./board.svg
gavana canvas apply "$TASK_CANVAS" --file ./batch.json --idempotency-key brief-2026-10-05-agavana canvas agent is retired. It answers Agent Canvas is retired. Create a named task canvas with canvas_create or gavana canvas create --title "Task name", retain its returned handle, and pass that exact handle as the destination. Existing read links remain accessible. — without creating a canvas or spending anything.
Exit codes. 0; 2 for a missing handle, a malformed batch, an id/key conflict, or a blocked layout (422); 4 on a revision or creation-key conflict; 5 if the canvas does not exist.
node
Every node write is applied as a single-operation atomic batch, with the canvas’s current revision read automatically unless you pass --base-revision, and a generated UUID idempotency key unless you pass --idempotency-key.
gavana node get canvas:<id> node:<id>
gavana node create canvas:<id> --type text --title "Direction" --prompt "..."
gavana node update canvas:<id> node:<id> [--title VALUE --prompt VALUE]
gavana node move canvas:<id> node:<id> --x 800 --y 120
gavana node resize canvas:<id> node:<id> --width 420 --height 300
gavana node delete canvas:<id> node:<id> --yes| Subcommand | Options |
|---|---|
create | --type (default text), --title (default Agent Node), --x --y (default 0), --width, --height, --content, --prompt, --metadata JSON, --client-id |
update | --title, --x and --y (both or neither), --width, --height, --content, --prompt, --metadata JSON |
move | --x and --y, both required |
resize | --width and --height, both required |
delete | --yes required |
--content and --prompt are written into the node’s metadata. An update with no recognised option is a usage error rather than a no-op write. All of these accept --json/--file to supply the node or patch directly.
gavana node create "$TASK_CANVAS" \
--type text --title "Customer objections" \
--x 1200 --y 200 --width 1040 --height 720 \
--metadata '{"isSection":true}'
gavana node create "$TASK_CANVAS" \
--type sticky --title "Observation" \
--content "Buyers hesitate at the price reveal" \
--x 1248 --y 300
gavana node delete "$TASK_CANVAS" node:NODE_ID --yesExit codes. 0; 2 for a missing handle, an empty patch, a delete without --yes, or a blocked layout; 4 on a revision conflict; 5 if the canvas or node does not exist.
connection
gavana connection list canvas:<id>
gavana connection create canvas:<id> --from node:<id> --to node:<id> [--mode MODE]
gavana connection delete canvas:<id> connection:<id> --yeslist reads the canvas and returns canvas, revision, and connections.
--mode values: omit it for a normal dependency or transformation flow, prompt for a text or sticky note whose content is the generation prompt of the image node it points to, reference for an image reference guiding another node, list for a Prompt List or Image List flow, first-frame and last-frame for the frames of a video node. A prompt edge must connect a text or sticky note to an image node, one per target. A first-frame or last-frame edge must connect an image node to a video node, and a video node may have only one of each. --from and --to can also be given as the second and third positional arguments, and --client-id names the new connection within a batch.
gavana connection list "$TASK_CANVAS" --jq '.connections[]' --output jsonl
gavana connection create "$TASK_CANVAS" --from node:BRIEF --to node:GENERATOR
gavana connection create "$TASK_CANVAS" --from node:STILL --to node:CLIP --mode first-frame
gavana connection delete "$TASK_CANVAS" connection:CONNECTION_ID --yesExit codes. 0; 2 for a missing handle or a delete without --yes; 4 on a revision conflict; 5 if an endpoint does not exist.
asset
gavana asset list [--canvas canvas:<id>] [--limit N] [--cursor CURSOR]
gavana asset get asset:<id>|asset:<ownerUid>:<id>
gavana asset upload path/to/image.png [--canvas canvas:<ownerUid>:<id>]--limit on list is 1–200. The canvas filter may also be the first positional argument.
upload accepts a file path, --file PATH, - for stdin, or clipboard on macOS. The file must be a PNG, JPEG, WebP, or GIF — the CLI sniffs the magic bytes rather than trusting the extension — and must be at most 50 MB. Anything else is a usage error before a byte is sent. Without --canvas the upload is a private library asset; with it, the asset is stored inside that canvas. Either way it is an asset, not a node — see Save an image to put it on a canvas.
Use the owner-qualified asset:<ownerUid>:<id> handle exactly as returned for a shared asset.
Scopes. list and get need asset:read. upload needs asset:read plus either image:generate or video:generate; with --canvas it also needs canvas:read and canvas:write.
gavana asset list --canvas "$TASK_CANVAS" --limit 50 --jq '.assets[].handle' -r
gavana asset upload ./product.png --jq '.asset.handle' -r
gavana asset upload clipboard --canvas "$TASK_CANVAS"Exit codes. 0; 2 for an unsupported file, an oversized file, or a missing handle; 5 if the asset does not exist.
element
Elements are reusable visual references built from existing assets, written guidelines, or both. Current Elements use element:<id> handles; every immutable revision uses element:<id>@v<n>.
gavana element list [query] [--state active|archived] [--limit N] [--cursor CURSOR]
gavana element get element:<id>@v<n>
gavana element history element:<id> [--limit N] [--cursor CURSOR]
gavana element create --name "Soft window light" --type lighting [--source-asset asset:<id>] [--application-mode creative|identity|exact] [--guidelines "..."]
gavana element update element:<id> --name "..." --type lighting [--source-asset asset:<id>] [--application-mode creative|identity|exact] [--guidelines "..."]
gavana element collections element:<id> [--collection element-collection:<id>]
gavana element archive element:<id> [--yes]
gavana element restore element:<id>
gavana element collection-list [--limit N] [--cursor CURSOR]
gavana element collection-create --name "Campaign assets"
gavana element collection-rename element-collection:<id> --name "..."
gavana element collection-delete element-collection:<id> [--yes]--type is one of character, product/object, environment, style, material/texture, lighting, or brand/mark. create and update take up to eight --source-asset values, guidelines up to 2,000 characters, or both. --application-mode sets how generation may use the Element: creative permits reinterpretation, identity guides preservation but is not pixel-exact, and exact composites the source pixels deterministically. create also accepts --collection (repeatable) to file the new Element. element get requires an exact @v<n> revision.
Updating visual content creates a new immutable revision. Collection membership is deliberately separate: use element collections, which does not create a visual revision. Every list command takes --limit 1–100.
archive is recoverable and asks for confirmation interactively; scripts must pass --yes. Collection deletion has the same rule and never deletes the Elements inside it. The CLI exposes no permanent Element deletion.
Scopes. Read commands need element:read. Create, update, organize, archive, restore, and collection mutations need element:write, which a token can only hold together with element:read.
gavana element list "light" --jq '.elements[].versionHandle' -r
gavana element get element:soft-window-light@v2 --pretty
gavana element archive element:soft-window-light --yesExit codes. 0; 2 for an invalid or unpinned handle or a destructive non-interactive command without --yes; 3 for a missing scope; 5 when the Element or collection does not exist.
provider
Lists the AI provider connections saved on the account.
gavana provider list [--limit N] [--cursor CURSOR]--limit is 1–100. Only list exists. gavana ai-connection list is a hidden alias kept for older scripts.
Scopes. Requires image:generate or video:generate — a purely read-only token cannot browse connections.
gavana provider list --output humanExit codes. 0; 2 for an invalid --limit; 3 if the token has neither generation scope.
model
gavana model list [query] [--provider PROVIDER] [--capability image.generate]
gavana model get model:<id>--limit is 1–100, with --cursor to continue. The query may be given as --query or as positional words. Useful capability filters include image.generate, image.edit, image.variations, video.generate, video.generate.fromImage, video.generate.fromFrames, and video.generate.fromReferences.
model get returns the model’s exact parameters, valid option values, minimums and maximums, capabilities, connection, and estimated duration. Read it before starting paid work — it is how you find out which durations and aspect ratios a model actually accepts.
Scopes. Both subcommands require image:generate or video:generate. Browsing the model catalog is not available to a read-only token.
gavana model list --capability video.generate --jq '.models[].handle' -r
gavana model get model:OPAQUE_MODEL_KEY --prettyExit codes. 0; 2 for an invalid --limit; 5 if the model handle does not exist.
action
Deterministic Image Actions make precise raster changes without asking an AI model and without spending AI credits. The set every agent can run: resize, crop, remove-background, change-aspect-ratio, side-by-side-composite, add-text-to-image, overlay-image, color-grade, and rotate. remove-background turns a flat or painted-checkerboard background connected to the image edge into real transparency without regenerating the foreground.
gavana action list [query] [--limit N] [--cursor CURSOR]
gavana action get action:<id>
gavana action run action:<id> --input VALUE --destination VALUE [--param NAME=VALUE]--limit on list is 1–100.
action run in detail. You must supply exactly as many --input values as the Action declares, in the order shown by action get — the CLI checks the count before sending anything. Inputs accept a node: or asset: handle, a local PNG/JPEG/WebP/GIF path, - for stdin, or clipboard on macOS. Local, stdin, and clipboard inputs are uploaded privately first, which is why they additionally require image:generate or video:generate on the token; existing handles do not.
Scopes. list and get need canvas:read. run needs canvas:read, canvas:write, and asset:read — no generation scope, because Actions are deterministic — plus a generation scope only when an input is a local file, stdin, or the clipboard, and job:manage to wait for the result.
| Option | Effect |
|---|---|
--destination | Your task canvas handle, or new-canvas. Required |
--canvas-title | Required when --destination is new-canvas |
--param NAME=VALUE | Repeatable schema parameter |
--target node:<id> | Write into an existing node instead of creating one |
--title | Title for the created target node; defaults to the Action title plus “result” |
--no-wait | Return the queued run: handle immediately |
--progress | Stream state transitions to stderr |
--timeout SECONDS | Default 900 (15 minutes) |
--interval SECONDS | Poll interval, default 1.5 |
--webhook-url, --webhook-secret-env | One signed terminal callback |
Declared parameters also get generated flags: a parameter id in camelCase becomes a kebab-case flag, so aspectRatio is --aspect-ratio. Numeric parameters are validated as numbers.
gavana action list
gavana action get action:resize --pretty
gavana action run action:resize \
--input ./product.png \
--destination "$TASK_CANVAS" \
--width 1080 --height 1350
gavana action run action:side-by-side-composite \
--input node:FIRST_IMAGE \
--input asset:SECOND_IMAGE \
--destination "$TASK_CANVAS"Output. The terminal Run with typed outputs and durable node: and asset: handles, plus a destination object recording what you requested, the resolved canvas, and the target node ids.
Exit codes. 0; 2 for the wrong number of inputs, a missing or retired destination, or an unsupported file; 3 if the token lacks a required scope; 8 if you stopped waiting; 9 if the Run ended failed, canceled, or expired.
recipe
Recipes are reusable canvas workflows. Forking and running are deliberately separate.
Recipe commands are retained API compatibility while the Recipe UI is unavailable in production. They never start image work automatically; recipe run is the separate, explicit paid action.
gavana recipe search [query] [--limit N] [--cursor CURSOR]
gavana recipe get recipe:<id> [--version VERSION]
gavana recipe fork recipe:<id> --canvas canvas:<id> --idempotency-key KEY [--x X --y Y]
gavana recipe run recipe:<id> --input KEY=VALUE --destination canvas:<id>
gavana recipe run recipe:social-creative-angles --input offer-brief=@brief.md --destination canvas:<id>--limit on search is 1–100.
recipe fork adds a private, editable Recipe card to a canvas and never executes it. Options: --canvas (or the second positional argument), --version, --base-revision, --x, --y, --idempotency-key.
recipe run is the explicit execution step. It binds typed inputs, creates the declared output nodes on the destination canvas, and starts text or image work. It waits for the terminal Run by default.
| Option | Effect |
|---|---|
--input KEY=VALUE | Repeatable. One per declared input |
--destination | Your task canvas handle, or new-canvas. Required |
--canvas-title | Required when --destination is new-canvas |
--version | Pin a Recipe version |
--instance-node node:<id> | Run a connected private Recipe instance instead of supplying inputs |
--model, --size, --quality | Override generation settings |
--no-wait, --progress, --timeout, --interval | Waiting behaviour; default timeout 900 seconds |
--webhook-url, --webhook-secret-env | One signed terminal callback |
--base-revision, --idempotency-key | Concurrency and retry control |
Input keys. Use the exact keys recipe get returns. The CLI also accepts a port’s node id, its normalised label, and — where unambiguous — the first word of its label. Supplying the same input twice is an error.
Input values.
| Form | Meaning |
|---|---|
plain text | Literal text |
node:<id> or asset:<id> | An existing handle |
@path/to/file | On a written port, read the file as text |
@- | Read text from stdin |
@@literal | An escaped value that really starts with @ |
A path, -, or clipboard on an image port | Uploaded privately, then passed as an asset: handle |
The @path distinction is the one that bites: on a written port @brief.md inserts the file’s text; on an image port the value is treated as an image reference. To use a local visual on a written port that accepts “an image or written note”, upload it first with asset upload and pass the returned asset: handle.
recipe run is paid work. Every Recipe start currently requires image:generate and its dependent scopes — including text-only Recipes. Ask for explicit approval in the current turn, and never retry a failed run automatically.
gavana recipe search "product visual" --jq '.recipes[].handle' -r
gavana recipe get recipe:product-visual-direction --pretty
gavana recipe fork recipe:product-visual-direction \
--canvas "$TASK_CANVAS" \
--idempotency-key fork-product-visual-a
gavana recipe run recipe:product-visual-direction \
--input product-context="A matte black travel bottle for a quiet premium campaign" \
--destination "$TASK_CANVAS" \
--idempotency-key brief-2026-10-05-a \
--progressOutput. The terminal Run with typed outputs, durable handles, estimatedSeconds, observed queue and execution timing, and — on failure — a stable failure.code and failure.retryable. With --no-wait, the queued Run plus a destination object.
Exit codes. 0; 2 for a missing input, an unknown input key, or a missing or retired destination; 3 for a missing scope; 4 on a conflict; 8 if you stopped waiting; 9 on a terminal failed, canceled, or expired.
work
Work is chat-first planning for a broad social-campaign request. prepare returns exactly three directions and a recommendation without paid generation; execute starts only the selected direction, and only with --confirm.
gavana work prepare --request "Create a social campaign" --reference asset:<id> [--canvas canvas:<id>] --idempotency-key KEY
gavana work get work:<id>
gavana work refresh work:<id>
gavana work continue work:<id> --action answer|select_direction|adjust|acknowledge_canvas --idempotency-key KEY
gavana work continue work:<id> --rebase --idempotency-key KEY
gavana work execute work:<id> --confirm --idempotency-key KEYEvery Work write takes a caller-stable --idempotency-key of 8–200 characters.
| Subcommand | What it does |
|---|---|
prepare | Creates or reuses a durable Work for the request (--request, or the positional words, up to 8,000 characters). --reference is repeatable — up to 12 durable node: or asset: handles; URLs are not accepted. --canvas names an existing canvas; without it Gavana creates one for this Work. A request with no social-campaign deliverable is refused. Never starts paid generation |
get | A read-only snapshot of the latest Work: brief, directions, choice, outputs, and canvas sync. Never polls providers or writes state |
refresh | Reconciles provider progress for running work. Only the Work’s owner may refresh |
continue | Records one step: --action answer --answer TEXT, --action select_direction --direction-id ID, --action adjust --adjustment TEXT, or --action acknowledge_canvas. --rebase is the shorthand for acknowledging a canvas a person changed, without overwriting their edit. Never starts paid generation |
execute | Starts only the selected direction and returns durable progress immediately. It never waits and never retries. Without --confirm it fails with work execute starts paid work. Re-run with --confirm. |
Answers and adjustments are up to 2,000 characters. --direction-id takes a direction id or the direction: handle from the Work. Reference roles (identity, style, product) can be set in --json input as { "handle": "asset:<id>", "role": "product" }.
Output. work, workId, status, canvas (handle, revision, and a link), canvasSync (current, stale, or blocked), permissions (canEdit, canRefresh), and progress. status moves through understanding, needs_input, directions_ready, waiting_for_choice, ready_to_run, running, completed, partially_failed, and failed. replayed: true means the key matched an earlier identical request.
work execute is paid work. Show the user the three directions and the cost estimate on the Work, get an explicit choice and approval in the current turn, and never re-run a failed execution automatically.
gavana work prepare \
--request "A spring launch campaign for our travel bottle on Instagram" \
--reference asset:PRODUCT_ASSET \
--canvas "$TASK_CANVAS" \
--idempotency-key spring-launch-work-001
gavana work continue work:WORK_ID --action select_direction --direction-id direction:DIRECTION_ID \
--idempotency-key spring-launch-pick-001
gavana work execute work:WORK_ID --confirm --idempotency-key spring-launch-run-001
gavana work get work:WORK_ID --jq '.status' -rScopes. prepare: canvas:read, canvas:write, asset:read. get: canvas:read. continue: canvas:read, canvas:write. refresh: canvas:read, canvas:write, image:generate. execute: canvas:read, canvas:write, asset:read, image:generate.
Exit codes. 0; 2 for a missing request, key, or --confirm, or a refused request; 3 for a missing scope; 4 on a conflict; 5 if the Work does not exist; 9 when execute returns failed, partially_failed, or canceled.
image
gavana image generate --destination canvas:<id> --prompt "..." [--element element:<id>@v<n>] [--wait]
gavana image generate --preflight --destination canvas:<id> --target node:<id> --prompt "..."
gavana image edit --destination canvas:<id> --source node:<id> --prompt "..." [--reference node:<id>] [--change-region x,y,width,height] [--wait]
gavana image edit --destination canvas:<id> --reference path/to/image.png --prompt "..." [--wait]
gavana image variations --destination canvas:<id> --reference path/to/source.png --prompt "..." [--wait]Image commands return as soon as Gavana has created the durable target nodes on the canvas and queued the Run, so the caller can carry on while generation proceeds. Add --wait only when the finished image is needed in the same command. --no-wait is still accepted for older scripts; combining it with --wait is a usage error.
| Option | Effect |
|---|---|
--destination | Your task canvas handle, or new-canvas. Required; may also be the first positional argument |
--canvas-title | Required when --destination is new-canvas |
--prompt | The instruction |
--prompt-node node:<id> | Use an existing node’s text as the prompt |
--source node:<id> | edit: the image being edited. Gavana sends it to the model first, as Image 1 |
--reference | Repeatable, up to 16. A node:/asset: handle, a local raster path, -, or clipboard |
--reference-role | Repeatable, one per --reference in the same order: source, identity, construction, texture, fit, or style |
--change-region x,y,width,height | edit: repeatable, up to eight. The only areas allowed to change, as 0–1 fractions of the image. Requires --source, or a --reference with role source |
--element | Repeatable, up to 8. An exact immutable element:<id>@v<n> handle |
--count N | 1–4 outputs of the same prompt |
--target node:<id> | Repeatable. Write into existing nodes instead of creating them |
--target-node node:<id> | A single explicit target |
--preflight | Return the compiled reference plan instead of generating. See below |
--model, --connection, --size, --quality | Generation settings |
--title, --x, --y, --width, --height | Geometry for automatically created targets |
--wait, --progress, --timeout, --interval | Waiting behaviour; default timeout 900 seconds |
--webhook-url, --webhook-secret-env | One signed terminal callback |
--base-revision, --idempotency-key | Concurrency and retry control |
Local references must be PNG, JPEG, WebP, or GIF and at most 50 MB each. Identical files are uploaded once and reused. When --target is omitted, the CLI creates the target nodes for you.
Edits. Pass the picture you are editing with --source; --reference values are then extra guidance — identity, style, construction — not the image being edited. A --change-region names an area that may change; everything outside the regions should stay as it is.
Elements may be prompt-only, image-only, or both. Their source images share the same 16-reference limit as direct references. JSON input may add a role and influence, for example { "handle": "element:soft-window-light@v2", "role": "style", "influence": 0.8 }. An exact Element also takes normalized placements and is composited from its source pixels after generation; changing an Element’s stored mode for one job requires "currentTurnUserModeOverride": true.
Preflight. --preflight with an existing canvas: destination and explicit --target handles returns the compiled reference plan, the final prompt, and the settings a run would use — without creating a canvas or target, uploading a file, calling a provider, or spending anything. It accepts only existing node: and asset: references; upload local images first.
Image generation charges the AI provider connected to the account. Ask before running it, and do not retry a failure automatically.
gavana image generate \
--destination "$TASK_CANVAS" \
--model model:OPAQUE_MODEL_KEY \
--prompt "A studio product photograph on a seamless grey backdrop"
gavana image edit \
--destination "$TASK_CANVAS" \
--source node:SOURCE_IMAGE \
--change-region 0.6,0.1,0.3,0.3 \
--prompt "Remove the reflection on the cap" \
--idempotency-key edit-hero-a \
--wait
gavana image generate --preflight \
--destination "$TASK_CANVAS" --target node:EMPTY_TARGET \
--reference node:PRODUCT --reference-role identity \
--prompt "The same bottle on a stone ledge, blue summer sky"Output. Without --wait: the queued Run with its run: handle, the target node ids, and a destination object. With --wait: the terminal Run with images, durable node: and asset: handles, and the destination; --output markdown renders the results as image links. With --preflight: the dry-run plan.
Scopes. canvas:read, canvas:write, asset:read, and image:generate; add element:read when applying Elements and job:manage to wait. --preflight needs only canvas:read and asset:read.
Exit codes. 0; 2 for a missing or retired destination, a missing prompt, an invalid --count, an unknown option, or an unsupported reference; 3 for a missing scope; 4 if a reused idempotency key produced incomplete automatic targets; 8 if you stopped waiting; 9 on a terminal failure after --wait.
video
gavana video generate --model model:<id> --prompt "..." --duration 15
gavana video generate --model model:<id> --prompt "..." --first-frame path/to/start.png --no-wait
gavana video generate --model model:<id> --prompt "..." --download output.mp4
gavana video download job:<id> --file output.mp4 [--yes]Video options
| Option | Effect |
|---|---|
--prompt VALUE | Video instruction. Required, maximum 8,000 characters |
--duration SECONDS | Exact model-supported duration, a whole number from 1 through 120 |
--aspect-ratio VALUE | Exact model-supported aspect ratio |
--resolution VALUE | Exact model-supported resolution |
--first-frame VALUE | node:, asset:, a public HTTPS URL, a local image, -, or clipboard |
--last-frame VALUE | Ending frame; requires --first-frame |
--reference VALUE | Model reference image; repeat up to nine times |
--canvas VALUE | Canvas containing any node: frame or reference |
--audio / --no-audio | Request or disable generated audio when the model supports it |
--download VALUE | Stream a successful generated video to this file |
Also accepted: --model (required), --connection, --idempotency-key (8–200 characters), --no-wait, --progress, --timeout (default 1800 seconds), --interval, --yes.
Validation before spending. video generate resolves the model and checks your options against its declared capabilities and parameters before starting paid work. It rejects --first-frame on a model without video.generate.fromImage, --last-frame without video.generate.fromFrames, --reference without video.generate.fromReferences, and any duration, aspect ratio, resolution, or audio setting the model does not list. It also refuses a bare provider model id that matches more than one connection — use the model: handle.
Other rules: --last-frame requires --first-frame; --canvas is required when any frame or reference is a node: handle; reference values must be unique; HTTPS URLs must not contain credentials; and --download cannot be combined with --no-wait.
video download. Streams a completed Job’s output to a file. It refuses to overwrite an existing file unless you pass --yes, writing through a temporary file created with mode 0600 and cleaning it up on failure. Returns job, file, bytes, and contentType.
gavana model list --capability video.generate --jq '.models[].handle' -r
gavana model get model:OPAQUE_MODEL_KEY --pretty
gavana video generate \
--model model:OPAQUE_MODEL_KEY \
--prompt "A slow product turntable on a matte grey surface" \
--duration 15 --aspect-ratio 9:16 \
--download ./turntable.mp4 \
--progress
gavana video generate \
--model model:OPAQUE_MODEL_KEY \
--prompt "Animate the fabric naturally" \
--first-frame node:PRODUCT_STILL \
--canvas "$TASK_CANVAS" \
--no-wait
gavana video download job:JOB_ID --file ./result.mp4Scopes. Generation requires canvas:read, asset:read, and video:generate. Waiting, downloading, and cancelling additionally require job:manage.
Exit codes. 0; 2 for an unsupported option for the chosen model, a missing prompt or model, or an existing output file without --yes; 3 for a missing scope; 8 if you stopped waiting; 9 on a terminal failure.
job
Image and Action work returns a run: handle; job: remains a compatibility alias for the same temporary record. Video generation returns a job: handle natively.
gavana job get job:<id>
gavana job wait job:<id> [--progress] [--output markdown]
gavana job cancel job:<id> --yeswait defaults to a 900-second timeout and a 1.5-second poll interval; change them with --timeout and --interval. --progress writes each state transition, including a percentage when the provider reports one, to stderr as JSON.
gavana job wait job:JOB_ID --progress --output markdown
gavana job cancel job:JOB_ID --yesScopes. All three require job:manage.
Exit codes. 0; 2 for a cancel without --yes; 5 if the job does not exist or has expired; 8 on wait timeout; 9 if the job ended failed, canceled, or expired.
run
The shared observation interface for Recipe, image, and Action work.
gavana run get run:<id>
gavana run wait run:<id> [--progress] [--output markdown]
gavana run cancel run:<id> --yesSame defaults as job. A failed provider request is returned as a terminal Run result rather than a generic request error, so run wait finishes with a readable reason: a stable failure.code and a failure.retryable flag. Stopping a wait (exit 8) stops observation, not the accepted provider job.
There is no run list command. To find a Run whose handle you lost, or to see which Runs hold the concurrency limit, call gavana api GET /runs — see below.
gavana run wait run:RUN_ID --output markdown
gavana run get run:RUN_ID --jq '.status' -r
gavana run cancel run:RUN_ID --yesScopes. All three require job:manage.
Exit codes. 0; 2 for a cancel without --yes; 5 if the Run does not exist or has expired; 8 on wait timeout; 9 on a terminal failed, canceled, or expired.
campaign (retired)
The campaign command surface is retired and disabled, and it no longer appears in help or completions. Running it returns:
The retired campaign command surface is disabled. Use Recipe Library forks and explicit canvas/image commands instead.It can be re-enabled for migration only by setting GAVANA_ENABLE_LEGACY_CAMPAIGN_COMMANDS=true (or the CRAFTBOARD_ENABLE_LEGACY_CAMPAIGN_COMMANDS alias). When enabled it dispatches campaign plan, campaign start, campaign get, campaign review, and campaign cancel.
Do not build on it. For planned campaign work use work; for explicit steps use canvas and image commands. See legacy campaigns for the API-side status.
Operations without a dedicated command
Use gavana api for these. It sends exactly what you give it — no baseRevision, no idempotency key, no validation — so supply both yourself.
| Operation | What it is for |
|---|---|
GET /runs | The account’s image and Action Runs, newest first. --field status=all includes finished ones; --field canvasId=… narrows to one canvas; --field limit= is 1–50 |
POST /runs/recover | Find an image run already accepted for a canvas and idempotency key, without starting work |
GET /runs/{runId}/snapshot | Stored image, Recipe, video, or Work progress, without reconciling providers |
POST /images/import | Put an image on a canvas as a durable node — see Save an image |
POST /product-references/import | Import a product page’s verified gallery images as references |
POST /canvases/{canvasId}/workflows | Create a canvas workflow |
GET /assets/preview | Preview URLs; these are handed to you inside asset and job responses |
gavana api GET /runs --field status=active --pretty
gavana api POST /runs/recover --json '{"canvasId":"canvas:OWNER_UID:CANVAS_ID","idempotencyKey":"edit-hero-a","operation":"edit"}'The snapshot path takes the run’s prefixed handle (run:…, job:…, or work:…), and gavana api refuses : in a path. Read a snapshot through the MCP run_snapshot tool or a direct API request instead.
Scopes by command
| Command | Scopes |
|---|---|
auth, config, version, capabilities, completion, mcp | None |
doctor | None beyond whatever the credential already has |
canvas list/get/render, node get, connection list | canvas:read |
canvas create, canvas apply, node and connection writes | canvas:read, canvas:write |
asset list/get | asset:read |
asset upload | asset:read, plus image:generate or video:generate; add canvas:read and canvas:write with --canvas |
element list/get/history, element collection-list | element:read |
| Element and Element-collection mutations | element:write (held together with element:read) |
model list/get, provider list | image:generate or video:generate |
recipe search/get | canvas:read |
recipe fork | canvas:read, canvas:write |
action list/get | canvas:read |
action run | canvas:read, canvas:write, asset:read |
image generate/edit/variations, recipe run | canvas:read, canvas:write, asset:read, image:generate; add element:read when applying Elements |
image … --preflight | canvas:read, asset:read |
video generate | canvas:read, asset:read, video:generate |
work prepare | canvas:read, canvas:write, asset:read |
work get | canvas:read |
work continue | canvas:read, canvas:write |
work refresh | canvas:read, canvas:write, image:generate |
work execute | canvas:read, canvas:write, asset:read, image:generate |
run get/wait/cancel, job get/wait/cancel, video download, and any wait | job:manage |
api | Whatever the target endpoint requires |
A batch sent with validateOnly needs only canvas:read — validation does not write, and does not consume an idempotency key. The CLI’s canvas apply always mutates; use MCP canvas_validate or the API for validation.
Stable handles
Copy these from responses. Never construct one.
canvas:CANVAS_ID
canvas:OWNER_UID:CANVAS_ID
node:NODE_ID
connection:CONNECTION_ID
asset:ASSET_ID
asset:OWNER_UID:ASSET_ID shared asset
element:ELEMENT_ID
element:ELEMENT_ID@v2 immutable revision
element-collection:COLLECTION_ID
recipe:RECIPE_ID
action:SLUG
model:OPAQUE_MODEL_KEY
run:RUN_ID
job:JOB_ID
work:WORK_ID
direction:DIRECTION_ID one of a Work's three directionsModel, Run, Job, and Work ids are opaque. Copy the complete returned handle; do not decode, guess, or assemble one.
Destinations
Image, Action, and Recipe commands take --destination:
| Value | Meaning |
|---|---|
canvas:OWNER_UID:CANVAS_ID | Your task canvas — the normal choice. Create it once with canvas create and reuse the handle |
new-canvas | A fresh canvas for this one command. Requires --canvas-title and an 8–200 character idempotency key |
With new-canvas the idempotency key determines the canvas identity — the CLI derives the new canvas id from a hash of the key, so re-running the same command with the same key reuses that canvas instead of creating another. Keep the handle it returns; do not default every command to new-canvas.
agent-canvas is retired. Passing it, through a flag or JSON input, fails before authentication, uploads, or analytics with the retirement message shown under canvas. Existing Agent Canvas read links still open, and work accepted before the retirement keeps its original destination.
video generate has no destination: the finished video is a downloadable Job output. --canvas there only tells Gavana where node: frames and references live. work prepare --canvas is optional; without it Gavana creates a canvas for that Work.
Pagination
| Command | --limit maximum |
|---|---|
canvas list | 25 |
recipe search, action list, model list, provider list, element list, element history, element collection-list | 100 |
asset list | 200 |
Continue with --cursor set to page.nextCursor from the previous response, keeping the same filters. Cursors are opaque and at most 8,192 characters. canvas get --detail summary pages nodes with --offset and --limit (1–100) instead.
Webhooks
A signed callback replaces polling — useful for a start-only token that lacks job:manage.
read -rs 'GAVANA_WEBHOOK_SECRET?Webhook signing secret: '; printf '\n'
export GAVANA_WEBHOOK_SECRET
gavana image generate \
--destination "$TASK_CANVAS" \
--prompt "A studio product photograph" \
--webhook-url 'https://automation.example.com/hooks/gavana'
unset GAVANA_WEBHOOK_SECRETThe secret is read from GAVANA_WEBHOOK_SECRET by default, or CRAFTBOARD_WEBHOOK_SECRET, or whichever variable you name with --webhook-secret-env. It must be 32–512 characters, and the variable name must be a valid identifier. The CLI never prints the secret, and --webhook-secret-env without --webhook-url is a usage error.
Recipe, image, and Action starts all accept webhooks. Successful image and Action callbacks are sent only after Gavana has stored the durable canvas, node, and asset results. Failed, canceled, and expired callbacks describe the terminal state without requiring images. Recipe callbacks carry their typed terminal outputs. If a start-only token is revoked or expires mid-Run, the Recipe stops with delegation_revoked and sends its signed failed callback.
Webhooks are deliberately unavailable through MCP so a signing secret cannot enter model-visible tool arguments. See Webhooks.
Result retention
Image and Action run: handles and their legacy job: aliases address the same temporary record and expire together. The defaults: 24 hours while unacknowledged, 15 minutes after the first successful server finalization (from a Run GET or a callback), and seven days for the expired tombstone. Operators may override these windows. Recipe Run records currently do not use this temporary TTL.
Persist the returned asset: and node: handles — those stay durable after the observation handles expire.
Telemetry
For commands that reach the API, the CLI reports a start and finish event — command name, status, duration, and correlation ids — to /api/agent-analytics/events on your Gavana instance. Requests carry X-Gavana-Agent-Surface and trace, invocation, and parent-event correlation headers so a Run can be traced end to end; --debug prints the ids for one invocation. No canvas content, prompt text, or credential is included, and a failed report never fails the command. Local-only groups (auth, config, doctor, mcp, version, completion, capabilities) report nothing.