Skip to Content

CLI

The shipmore CLI is the canonical operator surface. It’s a tsup-built binary served from your deployed box at /cli/install.sh; humans and agents drive the same commands.

Install

curl -fsSL https://<your-shipmore-box>/cli/install.sh | bash shipmore --version

Authenticate

The CLI authenticates with a Payload API key. There is no interactive login flow.

  1. Log into the Payload admin on your deployed box (/admin).
  2. Users → your operator user → enable API KeyGenerate → copy.
  3. Export:
export SHIPMORE_API_KEY=<key> export SHIPMORE_API_URL=https://<your-shipmore-box>

SHIPMORE_API_URL falls back to ~/.shipmore/config (baked by the installer). SHIPMORE_API_KEY is read from the env var only — never written to disk.

Agent protocol

The CLI auto-detects non-TTY environments and outputs JSON. Rules for agents:

  1. Supply ALL required flags. The CLI never prompts; missing flags return validation_error.
  2. Use -q to suppress progress; implies JSON.
  3. Exit 0 = success; >0 = error.
  4. Success JSON → stdout. Error JSON → stderr in the shape {"error":{"message":"…","code":"…"}}.
  5. Introspection: shipmore commands dumps the full command tree + flags + codes as JSON.

Global flags

FlagEffect
--jsonForce JSON output (auto on non-TTY)
-q, --quietSuppress progress; implies --json
--helpCommand help
--versionCLI version

Command overview

CommandPurpose
shipmore tenant ...Create, look up, and relocate tenants
shipmore page ...Build pages from block specs; discover block schemas
shipmore product ...Create monetization products; pricing finished in Stripe
shipmore importImport records from a CSV/JSON file or URL
shipmore schema inferPropose a schema from sample rows
shipmore schema applyPersist a schema (and import mapping)
shipmore schema getRead the deployed schema for a tenant
shipmore schema diffCompare a local fields file against the deployed schema (exit 0 = match, 1 = drift)
shipmore schema field set/drop/listEdit fields in a local schema file
shipmore imports listList recent import batches
shipmore import status <id>Inspect a single import batch
shipmore staging status / clearInspect or release the per-tenant staging session
shipmore monitor brief --tenant <domain>Read the latest observations brief
shipmore commandsDump the full command tree as JSON (agent discovery)

Full flag tables ship with the CLI under references/commands.md.

Error envelope

Every error response:

{ "error": { "message": "…", "code": "…" } }

Exit codes:

  • 0 — success
  • 1 — generic (validation_error, parse_error, network_error, schema_missing, timeout, unknown)
  • 2auth_error
  • 3file_too_large
  • 4tenant_not_found

Common mistakes

#MistakeFix
1Running import before schema applyRun schema inferschema apply first. Code: schema_missing.
2Forgetting --tenantEvery command requires --tenant <domain>. Code: validation_error.
3Running schema apply / page build before tenant createSchema + pages bind to an existing tenant. Code: tenant_not_found.
4Reconstructing the page URL from the request hostpage build returns the correct tenant-scoped URL in response.url — use it verbatim.

End-to-end quickstart

# 1. Auth export SHIPMORE_API_KEY=<key> export SHIPMORE_API_URL=https://your-box # 2. Tenant + schema + import shipmore tenant create --name "Acme Ramen" --domain ramen.example.com shipmore schema infer --tenant ramen.example.com --data-file sample.csv > /tmp/schema.json shipmore schema apply --tenant ramen.example.com --fields-file /tmp/schema.json shipmore import --tenant ramen.example.com # 3. Page shipmore page block-schema --name explore-section-block shipmore page build --tenant ramen.example.com --slug home --title "Browse Ramen Shops" \ --blocks '[{"type":"explore-section-block","content":{"title":"Browse","pageSize":20}}]'

See Data → Import for the full ingest flow and the agent’s 4-phase workflow.