CLI
The standards command-line tool for records, documents, and schema.
The standards CLI (@stndrds/cli) talks to the REST API over HTTP. It's the fastest way to script against your workspace or explore it from a terminal.
Install and log in
npm i -g @stndrds/cli
# Save and select an instance profile (omit --key to be prompted)
standards login --url https://api.standards.new/v1 --name prod --key stndrds_your_api_key
# Confirm the key is valid
standards auth whoamiProfiles are stored in ~/.standards/config.json. After login, the new profile is active; switch with standards use <name> and list profiles with standards instances.
Global flags
| Flag | Description |
|---|---|
--format <fmt> | json (default), table, or csv. |
--api-url <url> | Override the profile's API URL. |
--api-key <key> | Override the profile's key. |
--instance <name> | Use a specific profile for one call. |
--tenant <id> | Tenant ID for multi-tenant setups (defaults to the primary tenant). |
Records
CRUD and full-text search on any object:
# List with pagination and sort
standards records list contacts --limit 20 --sort createdAt:desc
# Get one record
standards records get contacts <recordId>
# Create
standards records create contacts --data '{"firstName":"Alice","email":"[email protected]"}'
# Update (partial — only the supplied attributes change)
standards records update contacts <recordId> --data '{"firstName":"Alicia"}'
# Delete
standards records delete contacts <recordId>
# Full-text search (--query is required)
standards records search contacts --query "alice" --limit 10Always single-quote JSON payloads (--data, --filter) so the shell doesn't strip the quotes.
Documents
Manage documents and their file packs. The CLI does not upload file bytes — upload via the API to get a fileId, then attach it with add-file:
standards documents list --limit 20
standards documents get <docId>
standards documents update <docId> --title "Q1 report (final)"
standards documents delete <docId>
# File pack (attach an already-uploaded file by id)
standards documents files <docId>
standards documents add-file <docId> --file-id <fileId>
standards documents remove-file <docId> <fileId>Schema
Read-only inspection — the CLI never mutates schema.
standards schema list # all objects
standards schema inspect contacts # attributes, types, views (id or name)To check drift between the database and your code-defined schema, use the top-level pull command instead — it emits a self-contained reconciliation prompt for the current runtime drift:
standards pullAPI keys
Create, list, and revoke API keys. create and revoke require an explicit --yes.
standards keys list --format table
standards keys create --name "ci-bot" --expires 2026-12-31 --yes
standards keys revoke <keyId> --yesSearch index
Rebuild the tenant's search index when it has drifted — the index is cleared, then every record is re-injected.
standards search reindex --tenant <tenantId> --yesThe tenant is named explicitly and must be the one you are authenticated in: the API takes it as a confirmation of intent, never as a target selector. The command returns as soon as the server accepts the job — the pass itself runs in the background, and a second call while one is running is refused.