CLI scripting and API access
Full CLI reference for v0.37.0, published . Cloud features may behave differently today.
Request JSON
Add --json when your script needs JSON. Check the exit code first. Command
results are under data; API results are under data.response.
In JSON mode, run and tdd run send wrapped test output to stderr so stdout stays parseable.
Read local TDD results
npx vizzly context build current --source local --jsonSet --source local to read saved local results in this release.
See TDD mode for captures and local review.
Read cloud evidence
Start by finding the request you need:
npx vizzly api schema --jsonnpx vizzly api schema sdk.listBuilds --jsonnpx vizzly api schema sdk.listBuildScreenshots --jsonnpx vizzly api schema sdk.getComparisonImage --jsonUse the method, path, headers, and inputs from the schema. Add the API version header yourself. Look up sdk.getBuildStatus for progress, sdk.listBuildScreenshots for captures, or visualReview.show for review state.
A capture may have a null comparison ID while processing or after a failure. Use its own image request until you have a comparison ID.
Save images and full analysis with --output <new-file>. It won't overwrite a file. Follow the operation's page fields with the same filters. See API schema and requests.
Check before writing
Check the request’s method, login requirements, and body before sending a review or comment. Do this only when the task asks for it. Project tokens can’t perform review writes.
Send JSON with --data @request.json or stdin using --data @-. If the action supports commandId, use a new UUID per action and keep it with the same body for retries. Read back the state if you're unsure what happened. The CLI doesn't replay writes automatically.