Back to Docs
AI & Accessibility

batch

Read a JSON array of commands from stdin and execute them sequentially. Returns results as JSON. Ideal for AI agent pipelines.

Usage

$ echo '[...]' | cdpilot batch

Examples

Navigate and screenshot in one batch

$ echo '[{"cmd":"go","args":["https://example.com"]},{"cmd":"shot","args":["/tmp/out.png"]}]' | npx cdpilot batch

Click and wait in sequence

$ echo '[{"cmd":"click","args":["#btn"]},{"cmd":"wait","args":[".result"]}]' | npx cdpilot batch