CLI

One-shot terminal commands for every API operation. Bundled with the Node SDK; designed for agents and shell scripts.

Install

# Globally
npm install -g @primitivedotdev/sdk
# Or run without installing
npx @primitivedotdev/sdk@latest <command>

Requires Node.js ≥ 22.

Authenticate

export PRIMITIVE_API_KEY=prim_...
primitive whoami

Send mail

primitive send \
--subject "Status update" \
--body "Build passed." \
--wait

Read inbound

# Most recent inbound (table view; pipe-aware)
primitive emails:latest --limit 5
# Fetch one by id
primitive 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 help
primitive sending:send-email --help
# Describe one operation in detail
primitive describe sending:send-email
# Full machine-readable manifest of every operation
primitive 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.