> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.defdex.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.defdex.io/_mcp/server.

# DefDex CLI

Install the [versioned CLI](/sdks-and-cli), then set `DEFDEX_API_KEY` privately.
Node.js 22+ is required. Commands print JSON for piping into tools such as `jq`.

```sh
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

```text
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

```text
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](/proposed-corrections) 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](/errors).
Money stays as decimal strings; avoid tools that silently convert it to floating point.