Skip to content

About

OpenWOP CLI — the @openwop/cli control plane for the OpenWOP demo app and any OpenWOP-compatible host. Extracted from openwop/openwop.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

OpenWOP CLI

The OpenWOP CLI is the local control plane for the OpenWOP reference app (openwop/openwop-app, live at app.openwop.dev) and a lightweight client for any OpenWOP-compatible host.

This is the standalone home of the @openwop/cli package; it ships independently of the openwop/openwop spec corpus.

Command groups

The CLI is a host-agnostic control plane: every group drives one protocol surface a host advertises, and degrades gracefully when the host doesn't serve it. Full catalog in FEATURES.md; shape + boundaries in ARCHITECTURE.md; what's planned next in ROADMAP.md.

Area Groups
Setup & health onboard · login · logout · doctor · demo · health · capabilities · config · completion · upgrade
Run lifecycle runs · chat · interrupts · workflows · catalog · media
Agents & orchestration agents · roster · org-chart · kanban (boards) · workforces (fleet) · agent-profile · agent-packs · agent-allowlists · agent-ops · evals · twin · reviews
Governance & safety approvals · governance (policy) · consent · toggles
Identity & access orgs (org) · workspaces · users · profiles · auth (sso)
Extensibility & connections packs · mcp · connections (conn) · providers · byok
Memory & workspace memory · workspace · prompts
Automation & messaging cron · webhooks · messaging · relay · notifications · notify
Observability & admin analytics (usage) · account · admin · brand · conformance
Product surfaces crm · csm · comments · sharing · forms · email · chat-widget · marketplace · kb · cms · documents · projects · strategy · advisors · campaigns-orchestration · notebooks · podcasts · priority-matrix · docs · knowledge-sync · entities · creative-briefs · creative-video · production · tutorials · walkthroughs · widgets · ui-state · ui-plugin · canvas-collab · workflow-collab · canvas-packs · present
Commerce & sales commerce · commerce-connect · promotions · recommendations · dealers · commissions · territories · sales-maps (+ crm extensions)
Marketing brand-kits · campaign-brief · campaign-connectors · campaign-intel · campaign-journeys · cdp · destination-sync · discovery · funnels · webinars · public
Operator administration vault · developer-keys · billing · environments · custom-domains · site-config · runtime-posture · maintenance · menu-config
Operations & work management operations · service-desk · job-search · kicktodo · dashboard · bi · insights-suite · intent-ledger · work-graph · work-selection · tasks · model-router · dev (+ strategy / priority-matrix / projects / goals / workforces / roster / profiles / twin / agent-ops / analytics / marketplace / connections / workspace extensions)
Protocol surfaces (RFC) a2a · triggers · goals · proposals · export / import
Protocol + run operations content (RFC 0103) · dispatch (RFC 0118) · openapi · agent-knowledge · compat-endpoints (RFC 0108) · host-events · client-support (+ runs / interrupts / workflows / approvals / reviews / webhooks / prompts / catalog extensions)
Conversations & messaging chat (sessions/messages/search/export/tools) · assistant · channels · scheduled-chats · voice · ai · computer-use · whatsapp · agent-author · workflow-author · workflow-proposals (+ a2a, notifications extensions)
Settings & policy capability-firewall · heartbeat · settings (+ cms / email / kb / forms / chat-widget / consent / approvals / profiles / advisors / campaigns-orchestration / notifications / workflows / kanban / job-search extensions)

0.18.x: the catalog now covers the full app feature surface — the agent platform (agent-profile, agent-packs, agent-allowlists, agent-ops, evals, twin, reviews), workspace tenancy (workspaces), and the product surfaces (strategy, advisors, campaigns-orchestration, notebooks, podcasts, priority-matrix) — alongside the protocol RFC surfaces (a2a, triggers, goals, proposals, export/import). See CHANGELOG.md for the per-group detail.

Knowledge + content surfaces: documents (+ artifacts, locate, templates catalog/assemble), notebooks (sources/transformations/chat/search), podcasts (shows + episode/speaker profiles), knowledge-sync, the media library (assets, collections, AI image edit/upscale, local-file upload), entities (+ anonymous public reads), creative-briefs, creative-video, production, and the smaller tutorials / walkthroughs / widgets / ui-state / ui-plugin / canvas-collab / workflow-collab / canvas-packs / present groups. Example:

openwop media assets create ./logo.png --org org_1 --tags brand
openwop entities types list --json
openwop documents render doc_1 --org org_1 --format docx

Protocol + run operations: agents list|info, roster list and org-chart get|dept now read the NORMATIVE /agents, /agents/roster and /agents/org-chart[/{departmentId}], falling back to the host-extension path only when the host does not serve the normative read (--host forces it, --verbose names the path that answered). New: content (RFC 0103 /content/*), runs effects|revision|pin|unpin|redrive, interrupts inspect|respond, webhooks rotate-secret|dead-letters, catalog packs search|get|export, workflows archive|promote|revisions|rollback|stats|estimate|pins|debug-run|eval-set…, approvals sla-policy|email-pref|delegations, prompts library …, agent-knowledge, compat-endpoints, host-events, client-support, dispatch fanout, openapi. Example:

openwop content page pricing --locale es
openwop runs effects run_123 --json
openwop interrupts respond run_123 approve-gate --data-json '{"action":"approve"}'
openwop workflows promote wf_123 && openwop workflows revisions wf_123
openwop webhooks rotate-secret sub_1 --generate

Protocol version support (v2 only)

The CLI speaks the OpenWOP wire directly — no SDK dependency — and speaks protocol major 2 only. Major 1 reached end of support on 2026-10-04 (RFC 0234); a conformant host answers every /v1/* path with 410, and the CLI never sends one (src/protocol.ts, per spec/v2/core/versioning.md):

  • Every command writes the v2 path it sends: the unversioned operation name (/runs, /agents/{agentId}, /prompts:render) or the host-proprietary root (/host/openwop-app/…, versioning.md §5). Each group's --help names it.
  • It reads /.well-known/openwop once per invocation, asking for the v2 representation with OpenWOP-Version: 2. A host whose protocolVersions[] (or a 406's details.protocolVersions) lists no 2.x is refused with a message naming major 1's end of support — there is no fallback to /v1. An unreachable discovery is not a refusal; the command reports its own failure.
  • Every protocol request carries OpenWOP-Version: 2.0. A host-proprietary /host/<org>/… route the path manifest does not name carries no version header (it has no major).
  • OPENWOP_PROTOCOL_MAJOR=2 skips the discovery read (for a host whose discovery is wrong). Any other value, including 1, is refused (exit 2). To drive a host that still serves only major 1, use @openwop/cli 2.x.

openwop doctor's protocol row reports protocolVersions and preferredVersion, and fails when the host does not serve major 2. Its response version row reports the OpenWOP-Version the host answered with and fails on a silent downgrade (versioning.md §1.4). Its min client row fails when the host's minClientVersion is above the version the CLI speaks (2.0); the host MAY then refuse requests with 426 client_version_unsupported (§1.5).

What else the CLI does as a v2 client (audited against spec/v2/core/* at corpus v2.42.6):

Obligation Behaviour
Tenant-bound ids (identity.md §5) A <tenantId>/<id> run id is sent in the projected wire form (acme~2Fr1) on every /runs/{runId}… path (and on host-extension run routes) — never %2F, which a decoding front door turns into a 404. Pass ids as the host prints them.
Error envelope (errors.md) Errors print as HTTP <status> <code>: <message>; 426/406/429 add an actionable hint (Retry-After for 429).
Poll cursor (events.md §Poll) afterSequence (exclusive: sequence > N); isTerminal.
SSE resume (events.md §Resuming with Last-Event-ID) Every run stream (runs events --follow / runs watch, chat, workflow-author) remembers the last id: and, when the connection drops or closes before the terminal event, reconnects with Last-Event-ID after the server's retry: delay (doubling per attempt without progress, cap 30 s, 5 attempts). A close is first checked against the run's status, so a mode that never carries the terminal event (messages) ends cleanly. Events are deduped by sequence, so nothing prints twice even from a host that re-emits the resumption point. --since N / --last-event-id ID start mid-log: both send the Last-Event-ID header (there is no since stream parameter), and the id must be an integer sequence.
Stream modes (events.md §Stream modes) --stream-mode updates, values, messages, debug or a comma list of updates/messages/debug → ?streamMode=, validated against the spec pattern before any request (values never combines). A host 400 unsupported_stream_mode is reported with its details.supported, never silently replaced by the (mode-less) poll fallback. state.snapshot and ai.message.chunk frames are rendered by their frame name; event: batch arrays are unpacked.
Event names (events.md §Types) A log written before the v2 renames still renders: v1-era names (run.resuming / run.resume-started, agent.toolCalled / agent.tool-called, …) render as their v2 names; the table is pinned to spec/v2/event-codemap.json.
Idempotency-Key (idempotency.md) Sent on run create/fork, chat turns, interrupt resolve, and webhook / trigger / prompt creation; --idempotency-key on `runs create
Interrupt resolve (interrupt.md) Body is the closed { "resumeValue": … }.
Discovery (capabilities.md) openwop capabilities renders the v2 root (records by status, minClientVersion, eventLogSchemaVersion, extensions) from the negotiation read.
Run list (runs.md §List) runs list --cursor / --workflow-id; the nextCursor hint is printed.
Stream origin (host extension; openwop-app ADR 0761) Some front doors buffer event streams entirely — https://app.openwop.dev/api delivered 0 bytes of an event stream in 25 s (measured 2026-09-27), and runs.md keeps eventsUrl on the request's origin, so the protocol cannot redirect. Every stream (runs watch, chat, notifications stream, kanban watch, present) is therefore read from the stream origin: --stream-base-url > OPENWOP_STREAM_BASE_URL > config host.streamBaseUrl > a host-advertised extensions.*.streamBase (accepted only if https: with no credentials/query/fragment, read from an https: host; loopback http: only for a loopback base) > --base-url. Non-stream requests always use --base-url. To keep streams on --base-url too (e.g. an egress proxy), set --stream-base-url to the same URL; openwop doctor's stream origin row shows which origin is in use and why.
Stalled streams A run stream that delivers no bytes (keep-alives included) for --idle-timeout-ms (default 45000; 0 disables) is aborted and resumed with Last-Event-ID — a half-open connection no longer hangs the command. A stream whose response headers do not arrive within 10 s (a front door that buffers streams) is followed by polling instead, with one stderr line naming --stream-base-url; --verbose says whether each reconnect was a drop or a stall. scripts/live-sse-resume.mjs checks resume against a real run (`--mode drop

When the host's minClientVersion is above the CLI, every command prints one warning (from the discovery read it already made); refusing is left to the host (426). Not exposed: the bufferMs batching hint (batched frames from a host that batches anyway are consumed).

Major-1 support was removed in the release after 2.2.0 (CHANGELOG). The 2.x line (last: 2.2.0) is the newest CLI that still speaks major 1; the pre-1.0 0.18.x line, frozen v1-only, stays on branch cli-v1-frozen.

Install

One-line install (detects the OS, ensures Node 22+, installs the package, then onboards):

curl -fsSL https://openwop.dev/install.sh | bash

Or directly: npm i -g @openwop/cli (needs Node 22+), then openwop onboard.

Quick start

openwop --help
openwop doctor                 # check prerequisites
openwop onboard                # guided setup (host + provider + key + model)
openwop login                  # sign this terminal in to an openwop-app host by a code (no key to copy)
openwop demo start             # boot local backend + frontend (from inside an openwop checkout)
openwop demo status
openwop catalog nodes --search ai
openwop runs create sample.demo.uppercase --input text=hello --wait
openwop packs search ads        # browse the signed pack registry

The demo subcommands operate on an openwop/openwop checkout discovered by walking up from your current directory; run them from inside a clone of that repo.

Onboarding

The onboard wizard walks you through:

  1. Host URL — https://api.openwop.dev (shared demo; https://app.openwop.dev/api also works), http://localhost:8080 (local), or a custom URL.
  2. AI provider — anthropic, openai, google, or minimax (matches what the demo backend dispatches to).
  3. API key — auto-detects ANTHROPIC_API_KEY / OPENAI_API_KEY / GOOGLE_API_KEY / MINIMAX_API_KEY, or hidden-input via raw-mode stdin. The key is POSTed to /host/openwop-app/byok/secrets on the configured host. The key is never written to your local config file — only a credential ref pointer is stored.
  4. Model — provider-specific recommended defaults plus a custom option.
  5. Test the connection — verifies the credential ref appears in the host's BYOK list.

Re-running openwop onboard is safe: it detects existing config and asks Keep / Modify / Reset.

For scripted use:

openwop onboard --non-interactive \
  --base-url-choice shared \
  --provider anthropic \
  --api-key-env ANTHROPIC_API_KEY \
  --model claude-sonnet-4-6

Provider management

openwop providers list
openwop providers add openai --api-key-env OPENAI_API_KEY --model gpt-4o
openwop providers remove openai
openwop providers test anthropic

providers add POSTs to /host/openwop-app/byok/secrets; remove DELETEs; list and test read.

Chat

openwop chat <workflowId> opens an interactive streaming REPL. Each message you type creates a run for the workflow carrying the running conversation as a messages array, then streams that run's events to the terminal as they arrive.

openwop chat sample.chat.turn
openwop chat sample.chat.turn --inputs-json '{"credentialRef":"anthropic-default"}'
openwop chat sample.chat.turn --no-stream --json
  • Streaming — prefers Server-Sent Events (GET /runs/{runId}/events). When the host does not stream (it answers with JSON or a non-streamable body), the CLI falls back to polling GET /runs/{runId}/events/poll.
  • Turns — type a line and press Enter. Conversation history is threaded across turns; the assistant's reply is fed back as context. Use --no-history to send only the latest turn.
  • Quitting — /exit, /quit, or Ctrl-D (EOF).
  • --json — emits raw event records (one JSON object per event) instead of the pretty assistant> rendering.
  • Extra per-turn inputs (--input k=v, --inputs-json) ride along on every run, so you can pin a credentialRef, model, or other configurable input.

Conversations, channels & voice

chat is the ONE chat group: besides the REPL it drives the host's persistent conversations (/host/openwop-app/chat/*) — sessions, messages, reactions, participants, feedback, search, export/import, and per-conversation tool scope. Team channels, scheduled agent chats, the executive assistant, voice, and the AI authoring surfaces each have their own group; every --help names the exact path.

openwop chat sessions create --title "Launch plan" --type group --participant agent:core.openwop.agents.planner.default
openwop chat messages send <sessionId> --content "Summarize the thread"
openwop chat search "pricing" --limit 5 --json
openwop chat export <sessionId> --format md --output thread.md
openwop chat tools set <sessionId> --mode restricted --enable openwop:fs.read
openwop channels post <channelId> --content "@planner draft the agenda"
openwop channels stream <channelId> --max-events 5
openwop scheduled-chats create --org org_1 --conversation <id> --agent <agentId> --prompt "Weekly status" --cron "0 9 * * 1"
openwop assistant pending approve <actionId> --content-hash <hash-from-the-card>
openwop voice session audio <sessionId> --file hello.webm && openwop voice session commit <sessionId>
openwop workflow-author draft --intent "Every Monday, summarize open tickets and email me" --follow
openwop notifications stream --max-events 3

Streams (channels stream|presence, notifications stream, voice realtime transcript) stop after --max-events or --timeout-ms (default 30 s). Secrets stay server-side: the realtime voice token is redacted unless --reveal-token, and ai bind-credential reads the credential from a file or env var and prints only the returned reference.

Packs (signed node-pack registry)

openwop packs search ads                                   # filter the catalog
openwop packs info community.openwop-team.demo             # metadata + versions
openwop packs install [email protected]    # download + verify (exact pin)
openwop packs install core.openwop.ai@^1.3.0               # highest unyanked match
openwop packs publish ./my-pack --key ~/key.pem --key-id me-1
openwop packs yank [email protected]       # local registry edit

These talk to the signed node-pack registry — a separate surface from the host --base-url. The default registry is https://packs.openwop.dev; override with --registry-url or OPENWOP_REGISTRY_URL.

Every registry path is resolved through the registry's /.well-known/openwop-registry.json endpoints map (spec/v2/core/packs.md §"The registry tree"). The CLI reads only the v2 tree (endpoints.v2, RFC 0266). A registry that publishes no discovery document, or names no v2 tree, is refused with exit 1; there is no v1 or flat-path fallback.

  • search reads the registry index (/v2/index.json on packs.openwop.dev) and filters the catalog client-side. The host's installed-pack search (openwop catalog packs search, /host/openwop-app/packs/-/search) only knows in-process nodes, not the published catalog.
  • info reads the pack index. --version v also fetches that version's manifest.
  • install resolves the version, downloads the tarball, checks its sha256 against the manifest integrity, and verifies the signature. Skip verification with --no-verify. Artifacts land under ~/.openwop/packs/{name}/{version}/ (override with --dir).
    • v2 signature check: signing must be exactly { keyId, scheme: "ed25519-canonical-json" }. The detached 64-byte .sig must verify over the in-tarball pack.json, which must be RFC 8785 canonical JSON. The key is the registry's signingKeys[] entry for keyId, and its permittedNamespaces must cover the pack name. A key that is no longer active still verifies what it signed.
    • v1 signature check: follows signing.method (ed25519 signs the tarball, manual signs the in-tarball pack.json).
    • Lifecycle (RFC 0222): no version means the latest unyanked version. A range (^1.2.0, ~1.2.0, 1.x, >=1.0.0 <2.0.0) means the highest unyanked match. An exact version is a pin and may install a yanked version, with a warning. A deprecated version installs with a warning.
  • publish — the reference registry has no write API (writeApi.supported=false; you publish by opening a pull request against openwop/openwop-registry). This command does the local packaging + Ed25519 signing step: it writes a deterministic signed .tgz, a 64-byte .sig, and a sidecar manifest into dist/packs/ (override with --out), ready to commit and PR. It writes the v2 signing block { keyId, scheme: "ed25519-canonical-json" }. The private key comes from --key <pem>, else ~/.openwop-keys/{keyId}.private.pem. If neither exists, it generates an ephemeral key and prints its public half for pre-registration.
  • yank edits a local registry checkout: it flips "yanked": true in the version manifest under registry/v2/ (--undo reverses). Then run registry/scripts/build-index.mjs --tree v2, commit, and PR. Run it from inside the repo.

Messaging & relay

Connect chat channels (Signal / WhatsApp / iMessage) to the host so inbound messages drive workflow runs and replies are delivered back. Channels are a host-extension surface (/host/openwop-app/messaging), not part of the normative OpenWOP wire — the protocol stays channel-agnostic.

openwop relay setup --channel signal --account +15551234   # risk notice + consent, then register + activate
openwop relay start                          # bridge loop (see "Running the relay for real" below)
openwop relay service install                # keep it running: launchd (macOS) / systemd user unit (Linux)
openwop relay devices                        # this workspace's relays, online/offline
openwop relay rotate                         # rotate the device token now (start does it automatically)
openwop relay send --conversation +15551234 --text "hi"   # operator-side: queue an outbound
openwop relay status                         # probe the device token against the host
openwop messaging connectors list|add|enable|disable|test
openwop messaging sessions list|inspect|close
openwop messaging policy   get|set <connectorId>          # DM/group access + require-mention
openwop messaging routing  list|add|remove                # inbound match → bound workflow
openwop messaging identity list|show|create|link|unlink|delete   # cross-channel peer linking
openwop messaging logs     [--channel c] [--direction inbound|outbound] [--status s] [--limit n]
openwop notify email --to [email protected] --text "hi" [--subject S]      # one-off dispatch
openwop notify sms   --to +15551234 --text "pong"

The operator subcommands manage the gateway beyond device wiring:

  • policy — per-connector access: set <id> --dm <pairing|allowlist|open|disabled> --group <allowlist|open|disabled> --require-mention <true|false>. get returns the host default (DM pairing, groups allowlist-only, mention required) when none is stored.
  • routing — add --pattern "*" --workflow <id> [--channel c] [--priority n] binds matching inbound conversations to a workflow; higher priority wins. remove <ruleId> deletes one.
  • identity — links platform peers across channels into one logical person: create --name N --peer <channel>:<peerId>, link <id> --peer … (merges, de-duped), unlink <id> --peer …, delete <id>.
  • logs — queries the delivery log (inbound ingested / outbound queued), filterable by channel, direction, status; --limit is clamped to [1, 1000].
  • notify — a one-off email/SMS dispatch (POST …/messaging/notify). The reference app returns a synthetic receipt; wiring a real provider (SES / Twilio) is a host concern.

How it works: the relay device owns the platform connection and bridges it to the host. Inbound messages POST to the host, which runs the bound workflow (default sample.demo.uppercase; override with OPENWOP_MESSAGING_WORKFLOW_ID) and queues the reply; the device pulls + delivers it. doctor reports per-channel readiness:

  • Signal needs signal-cli on PATH.
  • iMessage needs macOS (Messages signed in + Full Disk Access for chat.db).
  • WhatsApp ships with the channel build (Baileys), not the core CLI.

relay start also receives: each channel plugin streams inbound platform messages and forwards them to the host's /device/inbound (which runs the bound workflow and queues a reply). Signal uses signal-cli ... receive, iMessage polls chat.db by ROWID, WhatsApp binds Baileys messages.upsert. Disable inbound with --no-receive. When a channel's tooling isn't present, inbound is skipped and outbound prints to the console instead of silently dropping it.

Running the relay for real (openwop-app ADR 1043)

The relay links your own account on your own machine. relay setup prints the risk first (WhatsApp can ban a number linked through WhatsApp Web; Apple has broken unofficial iMessage clients; signal-cli is a full linked device) and needs a typed yes, or --accept-risk when there is no terminal. Business WhatsApp belongs on the server's WhatsApp Business connection, never here. --account is the device's own account id: only messages you write to yourself in that note-to-self chat run as you with full tools; your other outgoing messages never leave the machine.

  • Server address: taken from --base-url / OPENWOP_BASE_URL / config only, never from a link. Setup refuses one with a query string, a fragment, user info, or plain http off localhost, and pins it; relay start refuses an explicit --base-url that differs.
  • Token: valid 30 days, rotated automatically 7 days before expiry (the new one is saved before use; the old one works 10 more minutes). If the server refuses the token (expired, revoked, unknown), the relay prints why and exits 0, so a service manager does not restart it.
  • Reliability: exponential backoff with full jitter (1 s → 5 min) on every loop; a 30-minute watchdog restarts receiving after silence; WhatsApp reconnects after a dropped socket and stops on a logout; each outbound gets 3 tries, then the server is told it failed (permanent failures at once); delivered ids are remembered (~/.openwop/relay-delivered.json, 24 h) so a lost acknowledgement never sends twice.
  • Inbound: bursts from one sender within 1.5 s go as one message (--debounce-ms, 0 to disable); a typing indicator shows until the reply is delivered (WhatsApp, Signal, Discord); the relay's own replies in the note-to-self chat are recognised and never loop.
  • Media: every attachment is sent (WhatsApp by type with the caption on the first; Signal and iMessage from a private temp copy, https only, 25 MB each).
  • Live check: docs/relay-live-check.md is the scripted manual check per channel. The automated tests run against fixtures only.

The relay device token is a host credential, so it is stored separately from config.json in ~/.openwop/relay-credentials.json (mode 0600), not in your main config. Revoke it any time with openwop relay revoke.

Runs

Beyond runs create / list / get / cancel, the CLI surfaces a run's full inspection + review surface:

openwop runs events <runId> [--since <seq>] [--limit n]   # JSON event poll (GET .../events/poll)
openwop runs annotations <runId>                          # list review signals
openwop runs annotate <runId> --rating 5 [--note "great"] # attach a rating/label/correction/flag
openwop runs annotate <runId> --label triage --event-id <id>
openwop runs debug-bundle <runId> [--max-events n] [--out bundle.json]
openwop runs ancestry <runId>                             # RFC 0040 cross-host parent chain
openwop runs watch <runId> [--since N] [--stream-mode updates,messages]   # SSE follow, auto-resumes on a drop

runs events --since N polls with the poll cursor (afterSequence; events with sequence > N). runs events --follow / runs watch stream over SSE instead, where --since N becomes the Last-Event-ID header (see §Protocol version support). runs annotate posts exactly one signal kind (--rating 1-5 | --label | --correction | --flag), validated client-side. runs debug-bundle --out <file> saves the full event bundle to disk.

Operator surfaces

Beyond runs/workflows/catalog, the CLI surfaces the host's operator endpoints: agents, memory, media, webhooks, chat, plus notifications (inbox), interrupts (list/resolve human-in-the-loop pauses), and prompts (RFC 0029 library list/get/render). Every command supports --json.

Agent-platform surfaces

These drive the demo app's protocol-enabled agent surfaces (each --help cites its RFC + endpoint):

openwop roster list                          # named standing agents + workflow portfolio (RFC 0086)
openwop roster create --persona "Sally" --agent-ref core.x.agent --workflow sample.demo.triage
openwop org-chart get                         # descriptive departments/reporting (RFC 0087)
openwop org-chart set --file ./org.json       # replace the chart (departments[] + members[])
openwop kanban boards                         # agent task boards
openwop kanban board-create --name "Sally's work" --roster r_123
openwop kanban card-add b_1 --title "Triage" --column todo
openwop kanban watch b_1                       # stream a board's card events (SSE)
openwop orgs list                             # organizations + RBAC (RFC 0049)
openwop orgs teams|groups|roles|members <orgId> list|create|update|delete
openwop orgs members <orgId> add-existing --candidate <id>   # add someone who already has an account (no email)
openwop orgs effective --subject user:jo      # resolve a subject's effective access
openwop workspace list                        # per-tenant agent workspace files (RFC 0059)
openwop workspace put notes/todo.md --content "- ship it"
openwop byok list                             # BYOK credential refs (never values)
openwop byok set --ref anthropic-prod         # prompts for the secret (no shell history)
openwop agents create --persona "Triage bot" --model-class fast   # user-defined agent CRUD
openwop brand public                          # the applied white-label identity (anonymous)
openwop brand set --accent 'oklch(58% 0.13 250)' --product-name 'Acme Ops'   # generative theme (super-admin)

Destructive commands (roster delete, kanban board-delete/card-delete, orgs … delete, workspace delete, byok delete, agents delete) require an explicit --yes.

Two maintenance commands guard destructive operations behind a confirmation prompt (default no, bypass with --confirm):

openwop account delete                 # irreversibly wipe ALL data for the signed-in account
openwop admin cleanup                   # wipe expired ephemeral secrets for idle tenants
openwop admin cleanup --status          # read-only liveness probe

account delete requires a signed-in user (OIDC bearer). admin routes are gated by the host's OPENWOP_ADMIN_TOKEN — pass it via --api-key.

Governance

Tenant governance administration (ADR 0028 — a superadmin-gated host extension). The host is the policy authority; the CLI only renders its resolved view and never evaluates a policy outcome locally. Because the surface is non-normative (not advertised in /.well-known/openwop), the command fails closed legibly (exit 2) when a host doesn't expose it.

openwop governance policy                        # render stored policy + the host's declared defaults
openwop governance policy get --json             # raw host view
openwop governance policy set --action email.send=approval-required --action nudge=disabled
openwop governance policy set --provider-allowlist anthropic,openai --retention-graph-days 90
openwop governance audit --prefix governance. --limit 20   # tenant-scoped audit read view

Action kinds are email.send, calendar.invite, calendar.reschedule, nudge; policies are disabled | draft-only | approval-required (unset kinds fall back to the host's declared default). Aliased as openwop policy. The approvals group drives the host's approval inbox — the human side of "agents propose, humans dispose". A review-mode roster member's heartbeat queues a proposal instead of starting the run; you resolve it here:

openwop approvals list --status pending        # the queue (also: approved | rejected)
openwop approvals get appr_123 --json          # inspect one proposal
openwop approvals claim appr_123 --note "LGTM" # affirmative sign-off → starts the run
openwop approvals reject appr_123              # dismiss the proposal (alias: deny)

The host is the authority for every decision: the CLI renders the host's resolved queue and relays your claim/reject — it never decides locally, and fails closed if the host doesn't advertise the surface. Exit codes reflect the verdict so scripts can gate on it: 0 approved · 3 pending · 1 rejected/error. (Distinct from interrupts, which are run-level HITL tokens.)

Consent (privacy / GDPR)

consent drives the host's tenant-scoped, region-aware consent surface (ADR 0020). The host is the authority — the CLI renders its resolved view and never computes a consent decision itself; when the org-tenant's consent toggle is off the host returns a uniform 404 and the command fails closed with a legible message.

openwop consent policy <orgId>                                   # show the tenant policy (defaultMode + regulated regions)
openwop consent set-policy <orgId> --default-mode opt-out --regulated-region EU --regulated-region UK
openwop consent records <orgId> --json                           # list all consent records for the tenant
openwop consent get <orgId> <subjectKey>                         # one subject's record (or none)
openwop consent erase <orgId> <subjectKey> --yes                 # GDPR erasure (irreversible; --yes required)
openwop consent public get <orgId> <subjectKey>                  # public, unauthed: a visitor's recorded categories (or the policy default)
openwop consent public record <orgId> <subjectKey> --category analytics=true --category marketing=false

Exit codes: 0 success · 1 host/HTTP error (including consent not enabled) · 2 usage error.

MCP server mount

An MCP client for the host's JSON-RPC server mount (RFC 0020) — a single JSON-RPC 2.0 endpoint at POST /host/openwop-app/mcp speaking modelcontextprotocol.io 2025-06-18. The mount is host-controlled: it's env-gated (OPENWOP_MCP_SERVER_ENABLED, OFF by default) and the CLI cannot toggle it. When the mount isn't exposed the endpoint 404s and these commands fail closed legibly (exit 2).

openwop mcp ping                                  # liveness probe of the mount
openwop mcp info --json                           # initialize: server/protocol/capabilities
openwop mcp tools list                            # workflows exposed as MCP tools
openwop mcp tools call sample.demo.uppercase --args '{"text":"hi"}'
openwop mcp resources list                        # + `templates` / `read <uri>`
openwop mcp prompts get greet --args '{"name":"Ada"}'

--json emits the raw JSON-RPC result on any read. JSON-RPC errors surface the host's own message (contract errors → exit 2, host errors → exit 1); a tool whose result is isError exits 1.

The connections group (alias conn) inspects the host's third-party connections and their OAuth client configuration (ADR 0024):

openwop connections list                       # connections + status
openwop connections test conn:abc              # health-probe (exit 0 healthy / 1 not)
openwop connections authorize google --scope https://www.googleapis.com/auth/calendar --write
openwop connections oauth-clients list          # host-configured OAuth apps (superadmin)

authorize mints a consent URL and prints it only — the CLI never completes the OAuth round-trip (the browser + host callback do). Secrets stay host-side: client secrets and tokens are never returned, printed, or logged — the CLI runs every response through a recursive redactor before output, surfacing refs and status only.

Profiles (self-service persona)

profiles drives the host's user-profile surface (ADR 0005): your job title, bio, contact, skills, availability, portfolio, and pinned agents. The host is the authority and the CLI renders its resolved view — reads are visible to any signed-in tenant member, writes only ever touch your own profile. Requires a durable signed-in account (bearer via --api-key).

openwop profiles me                                              # your own profile
openwop profiles get <userId>                                    # a tenant member's profile (team-visible)
openwop profiles list                                            # the tenant persona directory
openwop profiles edit --job-title "Staff Engineer" --availability-status busy --timezone Europe/London
openwop profiles skills set --skill TypeScript=5 --skill Rust=3  # replace your skill list (proficiency 1..5)
openwop profiles endorse <userId> <skill>                        # endorse a peer's skill (unendorse to remove)
openwop profiles pin <rosterId>                                  # pin/unpin an agent to your sidebar
openwop profiles portfolio add --token <mediaToken>              # attach an image asset (remove <token> to drop)
openwop profiles activity --limit 10 --status failed             # your run-activity feed

Boundary: profiles is the persona/skills surface — not the user directory (account lifecycle) and not RBAC (that's orgs). Exit codes: 0 success · 1 host/HTTP error (incl. not found / not signed in) · 2 usage error.

Users (identity directory + lifecycle)

users drives the host's tenant identity directory and account lifecycle (ADR 0002). It is the durable record of who exists in a tenant and whether their account is active — not authorization (role/permission membership lives in orgs) and not editable persona (that's profiles / users me). The groups field is the raw IdP groups[] captured at sign-in for the RBAC handoff; it grants nothing by itself. The host is the authority: the surface 404s when not served (fail closed, exit 2), and a disabled account is denied 403.

openwop users list                                              # the tenant's users
openwop users me                                                # your own durable record
openwop users me --display-name "Ada L."                        # self-serve rename (PATCH /me)
openwop users create --principal oidc:abc123 --email [email protected] --group eng --source oidc
openwop users get <userId> --json
openwop users update <userId> --display-name "Ada" --group eng --group oncall   # groups replace; --email '' clears
openwop users disable <userId>                                  # lifecycle (fail-closed control)
openwop users enable <userId>
openwop users delete <userId> --yes                             # irreversible; --yes required

Identity source is one of oidc | password | saml | scim | manual. Exit codes: 0 ok · 1 host error · 2 usage / surface not served / account disabled.

Feature toggles

toggles renders the caller's resolved feature-toggle assignments (a non-normative host extension under /host/openwop-app/feature-toggles/assignments). The host is the sole authority — it resolves every toggle server-side from the authenticated principal — and the CLI only displays what the host returns. It never computes, asserts, or overrides a toggle decision locally, and it does not author config (the superadmin config surface is intentionally not exposed). When the host doesn't serve the surface the command fails closed (exit 2).

openwop toggles list                                             # every toggle's resolved state for you (incl. off)
openwop toggles list --json                                      # raw host view
openwop toggles get crm.triageAgent                             # one toggle: status / enabled / variant / bindings

Resolved fields are host-authored: status (on | off | beta), enabled (bool), assigned variant, and the variant's bindings (slot → ref@version). Exit codes: 0 ok · 1 host error · 2 usage / surface not served / unknown toggle.

The workforces group (alias fleet) drives the host's durable multi-agent orchestration — a Governed Workforce is a bundle of agent specs with graduated-autonomy posture and aggregate telemetry:

openwop workforces list                         # governed workforces + status
openwop fleet metrics wf_support                # aggregate telemetry (runs, rates, cost)
openwop workforces governance wf_support        # autonomy graduation + governance posture
openwop workforces trace wf_support --q batch_42 # cross-run trace/audit search
openwop workforces status wf_support production  # request a cutover (host gates on graduation)

This group composes with kanban (task boards) and roster (standing agents) but does not duplicate them — it renders the workforce's governance/metrics view, never re-modelling boards or roster entries. The host is the authority; the CLI renders its resolved view and fails closed if the surface isn't advertised. status production is gated host-side on the workforce having graduated to bounded-autonomous (a 409 surfaces legibly); eval needs the host's eval suite enabled.

Enterprise SSO (SAML / SCIM)

auth (alias sso) drives the host's enterprise identity surface (RFC 0050). The host is the authority; the CLI surfaces status, public SP metadata, and provisioning results only. SAML signing certs, SCIM bearer tokens, and client secrets are host-side and are never printed — every response is run through a recursive redactor before output (the public SP metadata XML, meant to be uploaded to your IdP, is the deliberate exception).

openwop auth status                                              # which SSO/SCIM profiles this host advertises + whether SAML SSO is live
openwop auth saml metadata                                       # SP metadata XML to upload to your IdP
openwop auth saml login-url --return-to /dashboard               # the SP-initiated IdP redirect URL (not followed)
openwop auth saml validate --idp-url http://localhost:9100/idp --variant valid   # conformance: validate a synthetic-IdP assertion
openwop auth scim provision --op create-user --user-name [email protected] --email [email protected]

auth status trusts discovery (/.well-known/openwop) as authoritative — an unadvertised profile is never probed, so a host's SPA catch-all can't false-report a surface as live. Each surface fails closed with a legible message when the host hasn't configured it.

Boundary: auth is SSO/SAML/SCIM identity-provider config — not the user directory (users), RBAC (orgs), or BYOK provider credentials (byok/providers). Exit codes: 0 success (saml validate: 0 = authenticated) · 1 host error / not configured (saml validate: 1 = rejected) · 2 usage error.

Analytics (usage)

analytics (alias usage) reads a host's org-scoped usage analytics (ADR 0018). The host aggregates server-side and gates each org read by RBAC (workspace:read) plus the org-tenant's analytics toggle; the CLI only renders the rollup it returns — it never computes usage locally — and fails closed (exit 2) when analytics isn't served. This is usage / cost / observability, deliberately distinct from governance audit (the policy-decision log) — hence the alias is usage, not audit.

openwop analytics summary <orgId>                               # aggregate rollup (total, sessions, by-type, top paths, utm)
openwop usage events <orgId> --json                             # recent raw events (max 100)
openwop analytics collect <orgId> --session s_abc --type pageview --path /pricing   # public consent-gated beacon

The collect beacon is public (sent without auth) and consent-gated host-side: a 201 records the event; a 202 honestly reports that analytics consent wasn't granted (nothing recorded). Event type is one of pageview | event | conversion. Exit codes: 0 ok · 1 host error · 2 usage / analytics not served / not authorized.

Reviewable-learning proposals (proposals, RFC 0096)

The proposals group drives the host's reviewable-learning proposal lifecycle. An agent's learned change lands as an inert proposal — a stored artifact draft that does nothing until a human reviews and applies it. The host is the authority: apply asks it to materialize the byte image last persisted on the proposal (no re-synthesis) and route activation through its advertised mode (e.g. an RFC 0051 approval-gate); the CLI never activates locally.

openwop proposals list --state pending                 # the review queue (also --kind <artifactKind>)
openwop proposals get prop_123 --json                  # inspect one proposal
openwop proposals revise prop_123 --artifact-json '{"systemPrompt":"…"}'  # edit the draft (never activates)
openwop proposals apply prop_123                       # host materializes + routes through its activation gate
openwop proposals reject prop_123 --note "out of scope"
openwop proposals archive prop_123 --yes               # soft-delete

Capability-gated on agents.proposals (advertised in /.well-known/openwop); fails closed (exit 1) when the host doesn't serve the surface. Boundary: distinct from approvals (the human run-action queue) — proposals are the artifact drafts reviewed before they become live behavior. Exit codes (get/apply/reject reflect the verdict): 0 applied · 3 pending (in review) · 1 rejected/archived or error.

Standing goals (goals, RFC 0097)

The goals group drives the host's standing goals — an objective the host pursues across runs until a judge (RFC 0090) verdicts it satisfied or a bound (RFC 0058) stops it. Completion is the judge's verdict: there is no complete/satisfy verb and the CLI never sets satisfied — you cannot declare victory from the client.

openwop goals list --state active                      # the goal list (also satisfied | escalated | bound-exceeded | paused)
openwop goals get goal_123 --json                      # inspect (objective, judge, continuation, bounds, iterations)
openwop goals create --objective "Keep the triage backlog under 20" \
  --verifier-ref <ref> --continuation schedule --max-iterations 50 --max-cost 5.00 --timeout-ms 600000
openwop goals pause goal_123                            # suspend continuation (resume to restart)
openwop goals abandon goal_123 --yes                   # close the goal

A bounds-less goal is rejected 422 when the host advertises requiresBounds — pass --max-iterations/--max-cost/--timeout-ms. The create body maps to the Goal entity shape (completion.check / continuation.mode / bounds.{maxLoopIterations,runTimeoutMs,maxCostUsd}). Capability-gated on agents.goals; fails closed (exit 1) when the surface isn't served. Boundary: a goal is not an RFC 0068 commitment — it uses a commitment/schedule/heartbeat as a continuation arm and adds a judge loop + termination guarantee. Exit codes: 0 satisfied · 3 escalated or still open (active/paused) · 1 bound-exceeded/abandoned or error.

Agent-platform portability — export / import (RFC 0098)

Move reusable estate (agents, packs, schedules, rosters, templates) between hosts as a portable bundle. Secrets are refs, never values: the bundle carries only secretsToRebind references — never credential material — and the host rejects a bundle that smuggles a literal credential before it applies anything. Always dry-run first.

openwop export --json                                  # the full refs-only bundle
openwop export --kinds agent --kinds schedule --out estate.json   # filtered, to a file
openwop import estate.json --dry-run                   # preview: creates/updates/skips/conflicts (no writes)
openwop import estate.json                             # apply (idempotent; entities re-owned to you)

The CLI runs every response through a secret redactor before printing or writing to disk (defense-in-depth on top of the host's refs-only guarantee). Capability-gated on top-level portability; fails closed when the host doesn't serve the surface. This subsumes the old SPA-only migrate-tenant bootstrap. Import exit codes: 0 applied (or a clean dry-run plan) · 2 the plan has conflicts (nothing overwritten) · 1 error — a literal credential or dependsOn cycle (422), or no import scope (403).

External-event trigger subscriptions (triggers, RFC 0099)

The triggers group drives the host's normative trigger bridge: a subscription binds an external source (webhook / email / form) to a workflow the caller can start, and a verified inbound event then starts a run with the event as ctx.triggerData.

openwop triggers register --source webhook --workflow wf_intake --dedup --verification required
openwop triggers list --state active
openwop triggers get sub_123 --json

register returns the created subscription plus its source binding (the ingest URL/address). A webhook binding secret is shown once — store it then; the CLI never persists it and re-reads return only the secretFingerprint. Capability-gated on capabilities.triggerBridge (register also honesty-gates on triggerBridge.ingestion.externalSources); fails closed when absent. Exit codes: 0 active · 3 paused · 1 failed/dead-lettered or error.

Async / durable A2A tasks (a2a, RFC 0100)

When a host advertises capabilities.a2a.durableTasks, every backing run has a durable A2ATaskState (taskId === runId) readable after the caller disconnects.

openwop a2a status                    # what the host advertises (supported/streaming/push/durableTasks)
openwop a2a task run_abc123 --json    # the durable task's live state

The record is content-free by design (state, interruptKind, push config — never run inputs/outputs/credentials); the CLI renders the host's resolved state and never derives one locally. Gated on capabilities.a2a (the durable read needs durableTasks: true). task exit codes: 0 completed · 3 submitted/working/input-required/auth-required · 1 failed/canceled/rejected or error.

Commerce & sales

Host-extension groups over the reference host's commerce and sales surfaces (/host/openwop-app/{commerce,commerce-connect,promotions,recommendations,dealers,commissions,territories,sales-maps,crm}/…, plus the public visitor routes public-store, public-recommendations, partner, public-book, public-sign, sent without auth). Each group's --help lists every command with the exact method + path it hits. Org-scoped commands take --org <orgId>; flags are the host's field names in kebab-case, and --body/--body-file supply a full JSON body. Money amounts pass through exactly in the unit the host's field names (priceMinor, priceMajorUnits, price …) — the CLI never computes a total. Stripe Connect seller onboarding returns a hosted link only; no card or bank data ever passes through the CLI.

openwop commerce products list --org org_1 --q shirt
openwop commerce orders get ord_1 --org org_1 --json
openwop commerce public products --org org_1               # the anonymous storefront view
openwop commerce ucp token --org org_1 --client-id c_1 --client-secret-env UCP_SECRET
openwop commerce-connect seller onboard                     # prints the Stripe-hosted onboarding link
openwop promotions create --org org_1 --name "10% off 50+" --type cart_threshold --min-spend 50 --reward '{"kind":"percentage","value":10}'
openwop crm deals list --org org_1
openwop crm segments members seg_1 --json
openwop crm public-sign get <token>
openwop territories models activate mdl_1 --org org_1
openwop commissions statements pay st_1 --org org_1

Destructive commands (deletes, refunds, cancels, voids) refuse without --yes. Exit codes: 0 ok · 2 usage error / request rejected · 4 not signed in or not permitted · 1 server error.

Marketing surfaces

Marketing features on the reference host's /host/openwop-app/* extension (each is feature-toggled and org-scoped host-side; the CLI renders the host's decision):

openwop brand-kits list --org org_1                 # marketing brand kits (NOT `openwop brand`, the app-wide identity)
openwop campaign-brief briefs create --org org_1 --name "Q4 launch" --objective "Pipeline"
openwop campaign-connectors kpi --org org_1 --json  # ad-platform performance roll-up
openwop campaign-intel plan-budget --org org_1 --total-budget-minor 500000 --target-conversions 200 --horizon-days 30
openwop cdp resolve --type email --value [email protected]
openwop destination-sync dry-run sync_1 --sample-json '{"email":"[email protected]"}'
openwop funnels publish fn_1 --org org_1
openwop webinars list --org org_1

# Anonymous visitor surfaces (no bearer sent) — test what your visitors see:
openwop public pages org_1
openwop public sitemap org_1
openwop public pricing --json
openwop funnels public view org_1 webinar
openwop forms public get form_1
openwop email public click <token>                   # prints the redirect target, does not follow it

Destructive commands (delete, a live campaign-intel apply, an email unsubscribe/preference change) refuse without --yes.

Config

~/.openwop/config.json (or $OPENWOP_CONFIG_HOME/.openwop/) stores the host URL, default provider, default model, and credential ref. API keys are never stored locally.

openwop config file                      # print path
openwop config get                        # print full config
openwop config get host.baseUrl           # dotted-path lookup
openwop config set defaultModel gpt-4o
openwop config unset credentialRef

Identity & operator administration

Identity, RBAC, tenancy and operator surfaces of the reference host (all under /host/openwop-app/…; each group's --help names the exact path). Super-admin surfaces (vault, site-config get|set, runtime-posture, maintenance, toggles admin, governance, billing import/coupons/seats, menu-config set tenant, brand get|set|asset) fail closed with exit 4 and say how to get a super-admin principal (OPENWOP_SUPERADMIN_TENANTS); admin … needs the host admin token. Secrets are refs only: vault values, the break-glass token and an anonymous session cookie are read from a file or a no-echo prompt, never argv, and never printed. A developer key's token is printed once, when the host issues it.

openwop orgs invites org_1 create --email [email protected] --role editor
openwop orgs decide --principal user:jo --action runs:read      # exit 0 allowed / 1 denied
openwop users me security
openwop vault list
openwop vault set billing:stripe-key --scope host --value-file ./stripe.key
openwop developer-keys create --name "CI deploy" --scope runs:create --scope runs:read
openwop environments promote --from dev                          # exit 3 when queued for approval
openwop billing portal                                           # a Stripe-hosted URL; no card data
openwop governance egress-rules set --mode allowlist --host api.stripe.com
openwop toggles admin set crm --status beta                      # read-modify-write
openwop admin run-retention hold t_acme --reason "legal hold"

Not driven (browser or server-to-server legs): POST /auth/saml/sso/acs (IdP form post), POST /billing/webhook (Stripe-signed), POST /vault/secrets/:ref/reveal (returns plaintext). Exit codes: 0 ok · 1 server error · 2 usage error / request rejected · 3 pending (approval queued, domain not yet live) · 4 not signed in / not permitted.

Operations & work management

Host-extension groups over the reference host's operations and work surfaces: the operator console (operations — health, SLO, DLQ, dispatch outbox, webhook delivery, saga compensation), the help desk (service-desk, plus the anonymous public widget path), job-search, kicktodo readiness, your dashboard, org bi metrics, insights-suite, a conversation's intent-ledger, ambient work-graph suggestions, work-selection ranking, the run tasks deck, the model-router switch, and the demo-only dev ucp-merchant. It also fills out strategy (check-ins, versions, timeline, cadence, decisions, links), priority-matrix (ideas, scores, intake, evidence, schedules, sessions, scenarios, portfolio, federated peers), projects (knowledge, memory, schedules, visibility, group chat), goals (arm / evaluate / record-run), workforces migration set, roster activity|check, profiles (pins, avatar, personal knowledge), analytics (trend, nav telemetry), marketplace (feature bundles, pack enablement, certify, pack remove/restore) and connections (delete, inbound webhook binding, provider catalog).

Each group's --help is generated from its route table and lists the exact method + path every command hits. Flags are the host's field names in kebab-case; writes also take --body/--body-file. Routes that REPLACE a whole document on write (job-search steering, strategy cadence, bi metric definitions, insights-suite config, profile contact) are read-modify-write, so flags you do not pass keep their saved values. Secrets (a federated peer's bearer, an inbound signing secret) are read from a file and never printed.

openwop operations health --json                       # superadmin
openwop operations compensation run_42
openwop service-desk tickets org_1 --status open
openwop service-desk public send sdk_0123... --text "Hi"   # the anonymous widget path
openwop strategy check-ins add s_1 kr_1 --value 42 --note "on track"
openwop priority-matrix ideas score l_1 c_1 --score reach=8 --score effort=3
openwop projects schedules add p_1 --cron-expr "0 9 * * 1" --workflow-id wf.weekly
openwop job-search steering set org_1 --roles "Staff Engineer" --remote --daily-cap 5
openwop bi metrics run org_1 open-deals --bucket week
openwop tasks deck

Destructive commands refuse without --yes. Exit codes: 0 ok · 2 usage error / not found / rejected · 4 not signed in or not permitted · 1 server error (kicktodo readiness also exits 1 when the product reports degraded).

Residual host surfaces

The last host-extension routes the reference host serves, added as three new groups — capability-firewall (composition rules, recent decisions, a read-only simulate, and the super-admin platform baseline), heartbeat (the host-wide agent heartbeat switch, super-admin) and settings (your personal token cap, reasoning directive and privacy opt-outs) — and as route tables inside existing groups: cms (scheduled publish/unpublish, version restore, review status, shared sections, language settings, translator locale grants, per-locale publish, AI section translation, page A/B experiments, and the page SEO head), email (sender settings, provider status, bounce-webhook configs, campaign engagement), kb (retrieval config, media-collection ingest, reindex drain/cancel), forms (templates), chat-widget tool-catalog, consent (purpose vocabulary, re-admit an erased subject), approvals teams-pref, profiles memory-extraction, advisors (strategy context, shared knowledge), campaigns-orchestration (workspace/versions/dispatches), notifications preferences, workflows budget, kanban column-limit|work-item-run and job-search answers.

Replace-on-write documents (firewall rules, SEO head, heartbeat config, notification preferences, personal settings, workflow budget) are read-modify-write, so flags you do not pass keep their saved values. The email webhook verification secret is read from a file and never printed.

openwop capability-firewall simulate --org org_1 --next '{"egress":"safe-fetch"}' --seen '[{"safetyTier":"read"}]'
openwop cms schedule publish page_1 --org org_1 --at 2026-10-01T09:00:00Z
openwop cms experiments results page_1 pexp:1 --org org_1
openwop email webhooks add --org org_1 --provider postmark --verification-secret-file ./secret.txt
openwop notifications preferences set --quiet-hours --timezone Europe/Oslo
openwop workflows budget set wf_1 --daily-usd 10 --hard-cap
openwop settings prefs set --daily-token-cap 200000

Exit codes: 0 ok · 2 usage error / not found / rejected · 4 not signed in or not permitted (the super-admin surfaces say so) · 1 server error.

Defaults

  • Host URL: --base-url > OPENWOP_BASE_URL > saved config (onboard's ~/.openwop/config.json) > http://localhost:8080. After onboard, everyday commands use the saved host with no flag.
  • Profiles: --profile <name> (or OPENWOP_PROFILE) selects ~/.openwop-<name>/config.json, so you can keep prod/staging/local hosts side by side.
  • OpenWOP host bearer (NOT the LLM provider key): --api-key > OPENWOP_API_KEY > saved config > sample-token for localhost demo URLs.
  • Shell completion: openwop completion <bash|zsh|fish>. Update check: openwop upgrade.
  • LLM provider key: --provider-key <key> or --api-key-env <VAR> on onboard / providers add (not stored locally).
  • Frontend URL: http://localhost:5173.

Input parsing for runs create:

  • --input k=v — each value is JSON.parsed first; on parse failure it falls back to a string. So --input n=5 is the number 5, --input enabled=true is the boolean true, --input text=hello is the string "hello", and --input list=[1,2,3] is an array. Quote shell-special characters.
  • --inputs-json '{"a":1}' passes the whole inputs object as one JSON literal. Merged BEFORE --input pairs (which override).
  • --wait polls GET /runs/{runId} every 250ms until terminal status or --timeout-ms (default 30000) elapses. Exit 0 only on completed.

Exit codes:

  • 0 — success.
  • 1 — server-side failure (5xx) or run terminated in failed / cancelled under --wait.
  • 2 — user-fixable error (unknown command, missing argument, 4xx response).

The CLI is dependency-light by design. It uses Node built-ins so contributors can operate the demo app without installing another command framework.

Development

This repo is a self-contained TypeScript package (the build is esbuild; it does not depend on the spec corpus). Requires Node ≥ 20.

npm ci
npm run typecheck     # tsc --noEmit (strict, noImplicitAny)
npm run build         # → dist/openwop.js (esbuild bundle)
npm test              # build + node --test test/*.test.mjs
node dist/openwop.js --help   # run the local build

CI (.github/workflows/ci.yml) runs typecheck + tests on every push and PR.

Releasing

The package publishes to npm via an OIDC trusted publisher with provenance — no tokens in CI. Pushing a vX.Y.Z tag triggers .github/workflows/publish.yml, which builds, tests, and publishes @openwop/[email protected] (idempotent: it skips if that version is already on npm).

  1. Bump version in package.json and VERSION in src/constants.ts (kept in lockstep), add a CHANGELOG.md entry.
  2. Commit (DCO-signed), then tag and push: git tag vX.Y.Z && git push origin vX.Y.Z.

One-time setup (maintainer): register this repo + publish.yml as the trusted publisher for @openwop/cli on npmjs.com (package → Settings → Trusted Publishers). The package was previously published from openwop/openwop; the binding must be repointed here before the first release.

Contributing

Commits must be DCO signed off (git commit -s). Follow Conventional Commits. Licensed under Apache-2.0 (see LICENSE).

About

OpenWOP CLI — the @openwop/cli control plane for the OpenWOP demo app and any OpenWOP-compatible host. Extracted from openwop/openwop.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages