RevenueCat CLI
$ rc 官方出品 高风险RevenueCat CLI(rc / @revenuecat/cli)通过原生 Go 二进制管理应用、Offering、Package、Entitlement 与客户数据。专为编程 Agent 打造,支持 --json、--no-input、--yes、内置 --format 类 jq 过滤及官方 Agent 使用指南。
brew install RevenueCat/tap/rc rc 提供原生 Go 二进制(及 npx @revenuecat/cli)并自带 --json、--no-input 与 --format 过滤,专为本地编码 Agent 流水线优化。
Agent 友好度体检单
当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。
FCRS-1.0 六维评分拆解
原生面向 Agent 设计,提供 --json、--no-input 快速失败模式、内置 --format jq 过滤与 RC_API_KEY 支持。
--jsonand--no-inputprevent interactive hangs and stabilize schemas- Built-in
--format <expr>filters JSON natively
破坏性操作默认需要确认(除非显式传入 --yes),且支持 --project-id 与 --profile 作用域隔离。
- Destructive commands gate on confirmation unless
--yesis passed - Official RevenueCat Coding Agents guide documents safe flags
支持 Homebrew(RevenueCat/tap/rc)、npm/npx(@revenuecat/cli)以及跨平台原生 Go 二进制。
- Zero-install
npx @revenuecat/cliandbrew install RevenueCat/tap/rc
单工具统一管理应用、Offering、Entitlement、付费墙与客户记录。
- Replaces manual dashboard clicks for mobile subscription configuration
RevenueCat 官方仓库(RevenueCat/cli),采用 MIT 协议开源。
- First-party RevenueCat open-source CLI
官方提供完整的命令参考与 revenuecat.com/docs/tools/cli/agents Agent 专属指南。
- Official command reference and agent integration docs
安全边界、鉴权与放权指南
在本地配置中以多档案方式保存 API 密钥(--profile),或在 CI 与 Agent 沙盒中直接读取 RC_API_KEY 与 RC_PROFILE 环境变量。
MIT 开源 CLI 免费;RevenueCat 提供免额度的免费层级,超出营收阈值后按方案计费。
# RevenueCat CLI (rc) Agent Rules - Always pass `--json --no-input` so missing flags fail immediately instead of blocking on prompts. - Authenticate via `RC_API_KEY` and scope mutations with explicit `--project-id`. - Never pass `--yes` on delete or entitlement-revoking commands without explicit user confirmation.
Agent 高频安全命令配方
只读查询(安全推荐)
rc projects list --json --no-input
以严格 JSON 格式列出可访问的项目,并在缺少参数时立即失败而不阻塞。
rc offerings list --project-id <project_id> --json --no-input --format '.items[].lookup_key'
利用 --format 表达式直接提取 Offering 的 lookup_key,无需额外管道调用 jq。
受控写入与预演
rc entitlements create --project-id <project_id> --lookup-key pro --display-name "Pro" --json --no-input
以非交互方式创建新的权益标识并返回创建后的 JSON 资源。
核心优势
- +
--json --no-input结合内置--format表达式使rc自动化调用极其稳定。 - + 同时提供 Homebrew 原生二进制与
npx @revenuecat/cli零安装方式。
注意事项与踩坑点
- ! 写命令暂不支持全局
--dry-run预演,变更会直接生效于目标--project-id。 - ! 修改线上 Offering 或 Entitlement 会直接影响已上线移动端的付费墙配置。