Back to Help Center

Scripting with the CLI

Every CLI command is designed to be piped into scripts, cron jobs, and CI.

Output formats

Most commands accept -f, --format with three values:

  • compact (default): human-readable key-value lines
  • table: aligned columns for list output
  • json: the raw structured payload

Two global switches cover everything else:

  • Add --json to any invocation and the whole command switches to JSON output.
  • Set the CRISPY_FORMAT environment variable to json, table, or compact to override the format globally, including on commands that do not expose -f.
crispy search people --keyword 'founder' --json | jq '.items[].name'

Rate limit footer

After API-backed commands the CLI appends a footer like '--- 431/500 requests remaining ---'. Set CRISPY_HIDE_LIMITS=1 to suppress it when parsing output.

Environment variables

  • CRISPY_API_KEY overrides the stored key. Use it in CI so no key ever touches disk.
  • CRISPY_API_URL redirects all API calls, and the CLI prints a warning whenever it is set so a forgotten override never fails silently.

Errors and retries

Errors go to stderr and the process exits non-zero, so shell chains with && behave correctly. Requests time out after 30 seconds. When the API rate-limits a call, the CLI waits the advised interval and retries automatically, up to two times, before giving up.

Still stuck? Email [email protected] or browse answered questions.