SSpark ERP

ERP CLI

One CLI, end to end: author, validate, publish, verify.

The `erp` command is the real, current CLI shipped in @erp/plugin-sdk — every command below runs against a real backend mechanism (the auth endpoints, PluginInstallationController, the page validator, the workflow read-proxy) or a real offline bundle. Nothing here is aspirational.

erp --version

Auth & environment

Every session is stored per-environment in ~/.erp/config.json (mode 0600) — networked commands auto-refresh an expired token. Set ERP_TOKEN to override for CI.

erp login [--tenant <id>] [--no-browser]     # OAuth 2.0 device authorization grant (default)
erp login --direct --user <id> --password <pw>
erp logout
erp whoami
erp env list
erp env use <name> [--base-url <url>]
erp env sync [--check]                        # pull the latest bundle from /api/v1/dev/bundle

Plugin authoring

Create, validate, compile, build and publish a plugin — the same pipeline every shipped module went through.

erp plugin create <pluginId> [--name] [--schema] [--category] [--type <type>]
erp plugin validate <dir>
erp plugin compile <source.tsx> [--out <page.json>]
erp plugin test <dir>
erp plugin build <dir> [-o out.spk]
erp plugin publish <dir-or-.spk> [--env <name>] [--tenant <id>] [--dry-run]
erp plugin pull <pluginId> [--out <dir>]
erp plugin diff <pluginId>

Schemas, workflows & connectors

Validate an artifact locally before it ever reaches a tenant.

erp schema pull <name> [--out <file>]
erp schema validate <file> --schema <name>
erp workflow validate <file>
erp workflow test <file>
erp connector validate <file>
erp connector create <file> [--tenant <id>]
erp connector test <domain> <providerKey> [--body <json-or-@file>]

Live tenant verification

Inspect what actually landed on a tenant after a publish — the generic escape hatch the CLI itself uses instead of hand-written curl.

erp api get|post|put|delete <path> [--tenant <id>] [--body <json-or-@file>]
erp workflow list --definition <name> [--record <id>]
erp workflow instance <instanceId>
erp workflow tasks <instanceId>
erp logs tail [--lines <n>] [--grep <text>] [--follow]

Discovery — schemas, examples, blocks, docs

Everything below works offline, from the bundled snapshot, before you ever log in.

erp docs search <query>
erp docs serve [--port 4400]
erp examples search <pattern> [--kind page|workflow|entities|provider]
erp examples patterns [--kind workflow]
erp blocks list [--type <name>] [--category <cat>]
erp platform catalog [--engine <name>]
erp platform describe <ClassName>

Registry & marketplace

Publish to and install from the hosted package registry.

erp registry list [--type plugin|theme|template-pack]
erp registry mine [--type <...>]
erp registry publish <packageId> <version> --type plugin [--name] [--author]
erp registry install <packageId> <version>

SDK downloads & MCP

erp sdk list                        # the 7 real @erp/* Code Plugin SDK packages
erp sdk download <name> [--out <dir>]
erp sdk download-all [--out <dir>]
erp mcp install [--dir <dir>]       # wires .mcp.json to this install's erp-mcp-server
erp dev <page.json> [--port 4300] [--yes]

See it used end to end.

The 8-step tutorial in the docs builds one real plugin from `erp plugin create` through to a published, scheduled job — using nothing but the commands on this page.