@rogeriq/cli
v0.3.0
Published
Command-line interface for RogerIQ. Manage conversations, projects, knowledge base, widget, integrations, and webhooks from your terminal or AI agents.
Downloads
251
Maintainers
Readme
@rogeriq/cli
Command-line interface for RogerIQ. Manage tickets, projects, knowledge base, widget, integrations, and webhooks from your terminal or AI agent.
Install
npm install -g @rogeriq/cli
# or via npx:
npx @rogeriq/cli --helpAuth
Interactive (humans)
rogeriq auth loginOpens a browser to rogeriq.com/device?code=XXXX-XXXX. Confirm in the
browser. The CLI picks up the key automatically. Code is also printed to
the terminal as a fallback (SSH / no browser).
Flags:
--no-browser— skip auto-open; print URL + code only.--api-base https://...— point at a different deployment.
CI / agents / scripts
Use --api-key (or env var) to skip the browser flow entirely:
rogeriq auth login --api-key riq_xxx
# Or pass per-invocation:
RIQ_API_KEY=riq_xxx rogeriq conversations listRecommended for CI / agents (no config file needed):
export RIQ_API_KEY=riq_xxx
export RIQ_PROJECT_ID=prj_xxxQuick start
rogeriq auth whoami
rogeriq projects list
rogeriq projects use prj_xxx
rogeriq conversations list --status open
rogeriq conversations reply con_xxx "Thanks, looking into it now."
rogeriq conversations resolve con_xxx
rogeriq kb search "refund policy"
rogeriq agent respond con_xxx # let AI draft + send reply
rogeriq widget config
rogeriq widget set --theme dark --primary-color '#5b21b6'
rogeriq webhooks create \
--url https://example.com/hook \
--events 'conversation.*,message.created'
rogeriq webhooks test wh_xxx # fire sample eventOutput
- Default: human-readable tables.
- Auto-JSON when stdout is piped (clean for agents and
jq). --jsonforces JSON.--quietprints only IDs.- Stderr for logs/errors. Stdout is always data.
# Pipe to jq
rogeriq conversations list --status open | jq '.[].id'
# Use IDs in a shell loop
for id in $(rogeriq conversations list --status open --quiet); do
rogeriq conversations resolve "$id"
doneCommands
auth login | logout | whoami
config get | set | path
orgs list | get | create | use | members
projects list | get | create | update | delete | use
keys list | create | revoke
conversations list | get | create | update | reply | resolve | snooze | assign
messages list | send
contacts list | get | upsert | update
agent status | config | models | respond | classify | suggest | knowledge-map
kb list | get | create | update | delete | publish | search | ingest | crawl | categories
widget config | set | snippet | custom-fields
integrations list | get | connect | configure | disconnect
forms list | get | create | update | archive | submissions
beacons list | get | create | update | archive
webhooks list | get | create | update | delete | test | deliveries | rotate-secret
analytics overview | report-views
status (project status overview)
mcp Run as an MCP server (stdio) — for Claude Desktop / Claude Code
mcp list-toolsRun rogeriq <group> to see all subcommands, or rogeriq <group> <sub> --help
for command-specific flags.
Config
~/.rogeriq/config.json (mode 0600). Overridden by env vars:
| Key | Env var |
|-------------|------------------|
| apiKey | RIQ_API_KEY |
| apiBase | RIQ_API_BASE |
| orgId | RIQ_ORG_ID |
| projectId | RIQ_PROJECT_ID |
Scopes
API keys can be coarse or granular:
| Scope | Grants |
|-----------------------|----------------------------------------------------------------|
| admin | Everything. |
| write | All *:read and *:write. Not *:admin. |
| read | All *:read. |
| <resource>:admin | <resource>:read, :write, :admin. |
| <resource>:write | <resource>:read, :write. |
| <resource>:read | <resource>:read only. |
Resources: conversations, messages, contacts, kb, agent, widget,
integrations, forms, beacons, webhooks, projects, analytics,
audit.
Examples — least privilege for an agent that only drafts KB articles + reads conversations:
rogeriq keys create kb-writer --scopes kb:write,conversations:readExit codes
| Code | Meaning | |------|----------------------| | 0 | Success | | 1 | User error / usage | | 2 | API error | | 3 | Auth error | | 4 | Rate-limited (after retry exhausted) |
AI agents
See AGENTS.md. TL;DR: pass RIQ_API_KEY and RIQ_PROJECT_ID as env, use
--json, branch on code from stderr error JSON, or run rogeriq mcp
and let Claude call tools directly over MCP.
Develop
npm install
npm run build # bundle to dist/index.mjs
npm run typecheck
./dist/index.mjs --help