CLI
One-shot terminal commands for every API operation. Bundled with the Node SDK; designed for agents and shell scripts.
Install
# Globallynpm install -g @primitivedotdev/sdk# Or run without installingnpx @primitivedotdev/sdk@latest <command>
Requires Node.js ≥ 22.
Authenticate
export PRIMITIVE_API_KEY=prim_...primitive whoami
Send mail
primitive send \--from [email protected] \--to [email protected] \--subject "Status update" \--body "Build passed." \--wait
Read inbound
# Most recent inbound (table view; pipe-aware)primitive emails:latest --limit 5# Fetch one by idprimitive emails:get-email --id <uuid># Reply to an inbound (server derives threading and Re:)primitive sending:reply-to-email --id <inbound-id> --body-text "Thanks!"
Discover operations
# Per-command helpprimitive sending:send-email --help# Describe one operation in detailprimitive describe sending:send-email# Full machine-readable manifest of every operationprimitive list-operations
Topic areas
account: webhook secret, storage, settings.domains: claim, verify, manage domains.emails: list and inspect inbound mail.sending: send-email, reply-to-email, list send-permissions.endpoints: manage webhook receivers.filters: allowlist / blocklist rules.webhook-deliveries: inspect and replay delivery attempts.
Designed for agents
Output is pipe-aware: when stdout is a terminal you get a human-readable table, but when piped you get full UUIDs and stable, parseable columns. The CLI is also the recommended surface when an LLM is operating Primitive on behalf of a user; the discovery commands give it everything it needs to compose new calls without prior knowledge.