Skip to navigation
SDKs and toolsDefDex CLI

DefDex CLI

Install the versioned CLI, then set DEFDEX_API_KEY privately. Node.js 22+ is required. Commands print JSON for piping into tools such as jq.

defdex --version
defdex config
defdex datasets
defdex list organizations --filters '{"type":"agency"}' --limit 25
defdex list programs --q SBIR --limit 10
defdex list technologies --limit 10
defdex awards --limit 10
defdex usage

config reports the base URL and whether a key is configured; it does not print the key. Do not pass credentials on the command line or in a URL.

List and detail commands

defdex list <dataset> [--limit N] [--q TEXT] [--filters JSON] [--cursor CURSOR]
defdex get <dataset> <record-id>
defdex awards [--limit N] [--q TEXT] [--company-id UUID] [--cursor CURSOR]
defdex award <award-id>

Use the exact returned record_id for generic detail and the convenience award id for award. Follow next_cursor explicitly; the CLI reads one page per command. Check truncated before claiming completeness. Quote JSON filters in your shell.

Correction commands

defdex corrections list [--limit N] [--cursor CURSOR]
defdex corrections get <correction-id>
defdex corrections submit --file proposal.json --idempotency-key KEY

Create proposal.json using the correction guide and retain a stable idempotency key for retries. Submission requires corrections:submit; status reads require corrections:read-own.

Configuration and failures

--base-url URL overrides the API base URL, followed in precedence by DEFDEX_API_URL, then the canonical default. Remote URLs must use HTTPS. --help lists supported commands. Errors go to standard error with a nonzero exit code and, when available, the HTTP status and request ID.

The CLI does not automatically retry or follow redirects. Use the retry guide. Money stays as decimal strings; avoid tools that silently convert it to floating point.