Developer
DSAR CLI
Alpha
DSAR is currently in alpha. APIs, package surfaces, configuration, and documentation may change as the project evolves.
@dsar/cli provides a command surface that maps to DSAR backend HTTP endpoints for agent and script usage.
Invocation
Local workspace:
Interactive wizard:
When launched without command args, the CLI enters interactive mode and guides:
- API URL/output/token setup
- command domain + command selection
- required params/body fields
- execute/edit/cancel confirmation
Published package flow:
Environment and auth
DSAR_API_URL(required unless overridden by--api-url)DSAR_API_TOKEN(optional bearer token)
Global flags:
--api-url,--token,--idempotency-key,--output,--json
CLI ↔ API mapping highlights
init->POST /initstatus->GET /statussubjects get <subjectId>->GET /subjects/{subjectId}policies list->GET /policiespolicies custom register|activate|deactivate-> custom policy endpointswebhooks inbound resend->POST /webhooks/inbound/resendrequests create|capture->POST /requests,POST /requests/capturerequests clock explain <id>->GET /requests/{id}/clock/explainrequests verification ...-> verification endpointsrequests fulfilment create <id>->POST /requests/{id}/fulfilmentrequests delivery ...-> delivery endpointsrequests manifest ...-> manifest endpointsrequests appeals ...-> appeals endpointsrequests notifications list|replay ...-> notification history and replaytenants retention get|put <tenantId>-> retention endpointsrequests audit export|verify <id>-> audit endpoints
Full parity route map lives in:
packages/cli/src/parity/route-map.ts
JSON output contract
When --output json is used:
- success:
{ ok: true, data, meta: { command } } - failure:
{ ok: false, error: { code, message }, meta? }
Interactive mode still uses the same final output envelope after command execution.
Notification replay
Notification replay is part of the current CLI surface:
dsar requests notifications list <request-id>dsar requests notifications replay <request-id> <event-id>
Parity policy
Any new backend OpenAPI path + method pair must include:
- route parity entry in
packages/cli/src/parity/route-map.ts - callable CLI command mapping
- passing parity test