The Marfa CLI is a Commander-based terminal client published on npm asDocumentation Index
Fetch the complete documentation index at: https://docs.myme.so/llms.txt
Use this file to discover all available pages before exploring further.
@withmarfa/cli. Wraps the TypeScript SDK; every operation the SDK exposes is reachable as a my <resource> <verb> subcommand. Human-readable output by default; auto-switches to JSON when stdout is a pipe or redirected file.
Install
my binary on your PATH. Confirm with my --help.
Authenticate
Two paths, both work; OAuth wins when present. Interactive (recommended for humans) —my auth login runs the OAuth Device Authorization Grant. The CLI prints a URL and code; approve in a browser; tokens persist at ~/.marfa/<instance>.json and refresh transparently.
MARFA_API_URL and MARFA_API_KEY, or pass --url / --key per call.
my auth login should beat a stale env var. To force the API-key path: my auth logout, unset MARFA_API_KEY, or pass --key explicitly.
Command surface
my --help and my <subcommand> --help are the canonical reference for flags. The sections below walk the more substantial surfaces.
Examples
Items and edges
Scoped API keys
my keys create exposes the full permission-map surface. Permission flags use = between key and level (the : separator collides with the edge-create grammar).
--is-platform is silently coerced to false unless the calling credential is itself platform-flagged — the server enforces this.
Metadata extensions
The metadata layer’sextensions map is a JSON sidecar keyed by namespace. Reserved namespaces (e.g. connection.runtime) have constrained write semantics; the CLI is the surface, not the gate.
Connections
my connections is the operator-facing surface for system.connection items of kind integration.
install calls the platform’s POST /connections/install orchestration — the admin-only JSON sibling of the browser consent flow. Returns the connection id, seed credential id, and an activity id.
uninstall calls the platform’s POST /connections/:id/uninstall orchestration: revokes runtime credentials, deletes upstream OAuth tokens, revokes leased tokens, disables inbound webhook subscriptions, transitions state to revoked, emits system.activity, audits.
preview-event is a debug verb. Given an item id and an event type, it renders the queue envelopes the bridge would emit to each subscribed connector — without invoking any handler. Each envelope carries a dispatch_reason (ok, self_event, cross_tenant, hop_budget_exceeded, subscription_inactive) so operators can see why a subscriber would or wouldn’t receive a given event. Pure server-side; safe to run repeatedly while debugging fanout.
verify <id> --event <json> synchronously dispatches a sample event through runtime-control into the connector via service binding. Operator-debug; requires a platform credential. Reads the runtime-control endpoint from MARFA_RUNTIME_CONTROL_URL or --runtime-control-url.
replay-dlq <id> [--message-ids id1,id2] [--yes] re-enqueues DLQ messages back onto their main queues for a connection. Destructive (handlers re-run upstream); interactive confirmation unless --yes is passed (and --yes is required in non-TTY contexts). my connections logs <id> --dlq reads the same DLQ surface.
Tenant config
set body is a full TenantConfig JSON object. Plumbing for the schema-enforcement levers (TSC42 §5: strict_mode, source_allowlist, source_filter) and feed-tier retention. Editing tenant config is rare enough that per-field flags would invent a parallel grammar that drifts from the wire shape; raw JSON is the call.
Webhook deliveries
Account deletion
my auth delete-account initiates the hosted-mode account-deletion flow. The CLI verb is initiation-only — the server emails a confirmation link; clicking it transitions the account to pending_deletion. See Account lifecycle for the full state machine.
Profile
my profile reads and updates the calling user’s own profile — name, handle, avatar. The avatar surface is two sub-verbs (set uploads an image, clear reverts to the deterministic placeholder).
Platform (operator)
my platform is the cross-tenant operator surface, gated on platform credentials. The two trees:
platform tenants— list, inspect, suspend / unsuspend, set quotas, per-tenant metrics.platform account-deletion— force the next pending-delete purger sweep without waiting for the 1-hour cadence.
--yes is passed; the prompt is required in non-TTY contexts. purge-now is the operator escape hatch when an account just crossed its grace window and you want the cascade now rather than at the next 1-hour tick.
Output modes
Human-readable tables in an interactive terminal; JSON when stdout is a pipe, a redirected file, or--json is set explicitly. There’s no --human flag — scripts that consume output get JSON, full stop.
Multi-instance config
--instance <name> (or MARFA_INSTANCE) selects the config-file slot under ~/.marfa/<instance>.json. Use it to keep separate sessions per server (e.g. production + staging):
default.
Repo
Source atwithmarfa/cli. Commander-based; consumes @withmarfa/sdk as a regular npm dep. Build and code rules in the repo’s CLAUDE.md.