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 capabilitiesCommands
Every verb maps one-to-one to a gateway call:
| Command | Scope | Does |
|---|---|---|
rcs capabilities | any key | Print the gateway map + the scopes your key holds |
rcs search | templates:read | Discover templates by query, channel, category |
rcs get | templates:read | Fetch one template’s content + metadata |
rcs render | templates:read | Render with sample variables; inspect the payload + SMS fallback |
rcs create | templates:write | Author a new template from a content object |
rcs clone | marketplace:clone | Clone a marketplace listing into your org |
rcs submit | templates:submit | Submit a draft to the provider for approval |
rcs send | messages:send | Broadcast to an E.164 list (RCS-first, SMS fallback) |
rcs usage | usage:read | Read 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.