Skip to main content

CLI (rcs)

The rcs CLI is a thin, scriptable mirror of the gateway. Every command prints JSON, so it composes with jq, drops into CI, or runs as a step inside a shell-driven agent loop.

The CLI ships in the @rcs-templates/agent-toolkit package and is a Pro-plan feature.

Authenticate

The CLI reads two environment variables — the same pair the MCP server uses:

export RCS_GATEWAY_URL=https://your-server export RCS_AGENT_KEY=rcsk_live_…

Run it via npx (or install @rcs-templates/agent-toolkit globally to get the rcs binary on your PATH):

npx -y -p @rcs-templates/agent-toolkit rcs capabilities

Commands

Every verb maps one-to-one to a gateway call:

CommandScopeDoes
rcs capabilitiesany keyPrint the gateway map + the scopes your key holds
rcs searchtemplates:readDiscover templates by query, channel, category
rcs gettemplates:readFetch one template’s content + metadata
rcs rendertemplates:readRender with sample variables; inspect the payload + SMS fallback
rcs createtemplates:writeAuthor a new template from a content object
rcs clonemarketplace:cloneClone a marketplace listing into your org
rcs submittemplates:submitSubmit a draft to the provider for approval
rcs sendmessages:sendBroadcast to an E.164 list (RCS-first, SMS fallback)
rcs usageusage:readRead month-to-date metered usage

Compose it

Because output is JSON, pipe it straight into jq:

# Top 5 highest-rated hospitality templates, names only rcs search --channel rcs --category hospitality \ | jq -r '.data.templates | sort_by(-.rating)[:5][].name'
# Render a template and read back the SMS fallback text rcs render --id tmpl_123 --vars '{"first_name":"Sam"}' \ | jq '.data.fallback.text'

rcs send broadcasts real messages and is metered. Gate it behind a human confirmation step in any autonomous loop, and mint send-capable keys sparingly.