zshot/cliDownload

Log in, then extract JSON

Requires a Pro license

Sign into ZRM, switch to the APAC region, open the sales report, and have the formatter return it as JSON, saved to sales_report.json. This example uses Anthropic for both the navigator and the formatter with the key in ANTHROPIC_API_KEY, but any supported provider works.

Run locally
zshot -t llm_json -f sales_report.json \
  --navigate "Login, change the region to APAC, and click on Sales Report" \
  --navigator-credential username=success@zshot-app.com \
  --navigator-credential password=password \
  --navigator-type "anthropic://$ANTHROPIC_API_KEY@" \
  --llm-format-model "anthropic://$ANTHROPIC_API_KEY@" \
  --llm-format-prompt "The sales report as JSON" \
  --llm-format-expects '{"type":"array","items":{"type":"object","properties":{"company":{"type":"string"},"contact":{"type":"string"},"value":{"type":"number"}}}}' \
  "https://zshot-cli.com/example_assets/zrm/"
The navigator opens the APAC sales report; the formatter returns it as JSON. zshot ≥ 0.17.0
Expected output
[
  {
    "company": "Acme Staffing",
    "contact": "Kyle Saito",
    "value": 1272000
  },
  {
    "company": "Globex Technologies",
    "contact": "Chad Petrov",
    "value": 1227000
  },
  {
    "company": "Abstergo Procurement",
    "contact": "Lena Nakamura",
    "value": 1211000
  },
  {
    "company": "Spectre Staffing",
    "contact": "Roman Whitaker",
    "value": 1135000
  },
  {
    "company": "Spectre Staffing",
    "contact": "Cheryl Ferreira",
    "value": 1119000
  },
  {
    "company": "Globex Technologies",
… 304 more lines

The navigator drives the app with --navigate; the formatter shapes the rendered page into JSON with --llm-format-prompt constrained by the JSON Schema in --llm-format-expects. See LLM JSON.