doc_id, read it, optionally send feedback:
doc_id, search_id, capture_id, canonical_url) when you need to audit or cite a result. See provenance.
Commands
Global flags
Available on every command:--format is not a global flag — it belongs to search only.
search
--format maps to the API’s response shaping verbosity: compact is the token-efficient choice for search-then-read loops, standard adds quotable passages, full adds capture provenance.
read
The target should be a full URL (https://…) or a doc_id UUID; a scheme-less target (e.g. example.com) is normalized to https:// by the API.
A truncated read reports
content.truncated: true plus content.char_count and content.start_char (omitted when 0). Continue with --start-char set to start plus count — don’t retry with a bigger --max-chars:
feedback
--event-type is required. Values: result_helpful, result_not_helpful, passage_used, read_abandoned, duplicate_result, stale_result, spam_or_low_quality, missing_expected_source, unsafe_or_policy_issue. Pair it with --search-id and/or --doc-id so the event lands on the right target.
files
Upload documents into your organization’s files knowledge base and search them with the workspace scope:--mode full on files index reprocesses everything instead of just new/changed files.
usage
See your organization’s API usage rendered in the terminal — headline totals, a request sparkline, per-endpoint and per-key tables, and billable spend:- All numbers are scoped to the organization that owns the API key. The data matches the console’s usage dashboard.
- Spend fields are
spend_cents(exact, possibly fractional cents). The human view formats them as dollars. - The window is at most 92 days;
--interval hourneeds a range of 8 days or less. --keysets the API key; the per-key filter is--key-id.
Reading from stdin
- reads stdin to EOF for the search query, the read target, auth login --key -, and api --input -:
JSON output
With--json, data is a single JSON object on stdout and errors are a JSON envelope on stderr (hint only when present):
--json) output is not a stable interface — never parse it.
-o <file> writes the data payload to the file and suppresses stdout entirely, so output limits can’t truncate JSON mid-parse. The agent pattern is write-then-read:
Exit codes
Branch on these, not on output parsing — see Scripting and CI.