Overview: what rc is and when to use it

0:03:00

rc is RevenueCat's official command line interface. It manages your RevenueCat integration from the terminal: projects, apps, store credentials, the product catalog, Customers, subscriptions, and Paywalls. Commands map to the same API the dashboard uses, so anything you change with rc shows up in the dashboard right away, and anything you change in the dashboard is visible to rc.

The CLI is one of the four parts of the RevenueCat AI Toolkit, next to the plugins, the skills, and the MCP server. It is not only for agents, though: every command behaves the same whether you, a script, or an agent runs it.

Diagram comparing three ways into one RevenueCat project: the dashboard in a browser for exploring and visual work; the MCP server inside an AI agent, with no shell, no access to local files, and some areas the CLI lacks such as virtual currencies; and the rc CLI for the terminal, scripts, and CI, which uploads paywall images and fonts and runs Apple credential setup and support actions such as refunds

The dashboard, the MCP server, and rc all work on the same project. Pick the one that fits where you are.

When to reach for rc

  • You live in a terminal and want quick answers: which Offering is current, which entitlements exist, what a customer has.
  • You want the same result every time, from a script or a CI job.
  • You need to upload a paywall image or a custom font. The MCP server runs remotely and cannot read files on your disk, so it has no upload tools for these. rc does.
  • Your agent runs shell commands rather than MCP tools.
  • You need the Apple credential setup (rc setup apple), which signs in to Apple on your own machine.
  • You handle customer support: refunds, cancellations, and transfers have rc commands and no MCP tools.
You do not have to pick one. The AI Toolkit plugin configures the MCP server, and the skills it installs use the CLI when a workflow calls for it. The two overlap a lot, and neither is a superset. Both can generate and edit paywalls with RevenueCat's AI Editor. Only the CLI uploads paywall images and fonts, runs the local Apple credential setup, and issues refunds, cancellations, and transfers. The MCP server covers areas the CLI does not, such as virtual currencies, customer sign-in methods, editing Audiences, and SDK feature gates.

What you will do

  1. Install rc (or run it with no install at all) and log in.
  2. Point it at a project and explore it, in human and in JSON form.
  3. Upload a paywall image and a custom font.
  4. Run it in CI with a secret key, and let your AI agent drive it.
  5. Learn which commands change real things, and how to recover when something goes wrong.

Before you start

  • A RevenueCat account and a project. No account yet? rc auth signup creates one from the terminal, and rc projects create makes a project.
  • macOS, Linux, or Windows. rc is a native binary; you only need Node.js 18 or later if you run it through npx or install it with npm.
  • jq is optional. The CLI has a jq built in.
Written against rc 1.0.1, the latest release when this codelab was written. If yours is newer, rc <command> --help is the source of truth for flags.

Install rc

0:05:00

Try it without installing

If you have Node.js 18 or later, you can run any command straight from npm:

bash
npx @revenuecat/cli --version

If npm asks whether it may download the package, say yes (or add -y). The npm package is a small launcher: it starts a prebuilt native binary for your platform (macOS, Linux, and Windows, on x64 and arm64). Everywhere this codelab writes rc, you can write npx @revenuecat/cli instead.

Install it

MethodCommandPlatforms
Homebrewbrew install RevenueCat/tap/rcmacOS, Linux
npmnpm install -g @revenuecat/climacOS, Linux, Windows (Node.js 18+)
Release binaryDownload from GitHub Releases (checksums included)macOS, Linux, Windows (amd64, arm64)
bash
# macOS or Linux
brew install RevenueCat/tap/rc

# or, anywhere Node.js 18+ runs (including Windows)
npm install -g @revenuecat/cli

Homebrew and npm both give you two names for the same binary: rc and revenuecat. If another program on your PATH is already called rc, use revenuecat.

Check it works

bash
rc --version

You should see rc version 1.0.1 or newer. Run rc with no arguments to see where to start.

Terminal running npx -y @revenuecat/cli@1.0.1 --version, which prints rc version 1.0.1, then running it with no arguments, which shows a not logged in banner and suggests rc setup, rc auth login, and rc projects use

Real output from rc 1.0.1 run through npx: the version check, then rc with no arguments on a machine that is not logged in yet. In a terminal you may also see a one-time hint to run rc skills install.

Pin the version in scripts. npx -y @revenuecat/cli@1.0.1 ... always runs exactly that release, so a new CLI version cannot change your script's behavior overnight.
Tab completion. rc completion bash, zsh, fish, and powershell print a completion script. rc completion zsh --help (or your shell's name) shows where to put it.

Log in

0:05:00
bash
rc auth login

The CLI asks how you want to log in:

ChoiceWhat happensGood for
Log in with RevenueCat (opens browser)You approve access in the browser. Tokens are stored and refreshed automatically.Your own machine
API key (paste from dashboard)You paste a RevenueCat API v2 secret key (sk_...) into a masked prompt. The CLI checks it by listing your projects, then stores it as-is. It is never refreshed.A machine where a browser login is awkward

To skip the menu, use rc auth login --oauth, or rc auth login --api-key sk_.... The second form leaves the key in your shell history, so prefer the masked prompt, or the RC_API_KEY variable from step 7.

Secret key, not SDK key. The CLI is a server-side tool, so it uses a secret key (sk_...). The public SDK keys (appl_, goog_, amzn_) belong in your app's code and are not what rc wants. Never put a secret key in an app, and never paste one into an AI chat.
Already use the RevenueCat MCP server? rc keeps its own login. One shortcut exists: when you run the login through npx, and your Claude Code (~/.claude.json) or Cursor (~/.cursor/mcp.json) config has a RevenueCat MCP entry with an Authorization header, the menu also offers to reuse that credential. A reused sk_ key stays logged in; a reused OAuth token expires within the hour and cannot refresh. An installed rc (Homebrew or npm -g) does not offer this.

Check who you are

bash
rc auth status

rc whoami is a shortcut for the same command. You should see Logged in, your profile name, and which credential is in control.

Terminal session: rc auth login records the browser login method, opens the browser, and reports Logged in for the default profile; rc auth status shows the account, the OAuth credential, and the token expiry; rc projects use proj_example sets the active project

Illustration: a browser login, shortened. The name, email, project, and dates are examples; your output shows your own account.

Before you log in, the same command prints this (real output from rc 1.0.1):

text
· Not logged in (profile: default)
  Log in:  rc auth login

Where your credentials live

  • Each profile is a file in ~/.config/revenuecat/ (or $XDG_CONFIG_HOME/revenuecat/ if you set that), named <profile>.json and readable only by you (mode 0600).
  • The secrets themselves (the API key and OAuth tokens) go to your OS keychain first: the macOS Keychain, Windows Credential Manager, or the Linux Secret Service. Only when no keychain is available, for example on a headless Linux server or in Docker, do they stay in the profile file.
  • RC_API_KEY is never written to disk, and while it is set it overrides the stored login. rc auth status warns you when more than one credential is present.

Profiles for staging and production

A profile bundles a credential and a default project. Log in once per profile:

bash
rc auth login --profile staging
rc auth login --profile prod

rc --profile staging offerings list   # one command against staging
rc profiles use prod                  # make prod the default from now on
rc profiles list

The active profile is the --profile flag if you pass it, then the RC_PROFILE variable, then whatever rc profiles use chose, then default.

Log out

rc auth logout clears the API key and OAuth tokens from the active profile, along with its saved default project. The profile file itself stays. To remove a profile completely, run rc profiles delete <name> (this cannot be undone).

Choose a project

0:03:00

Most commands act on one project, so tell rc which one once instead of passing it every time.

bash
rc projects list               # in a terminal, opens an interactive browser
rc projects list --no-input    # plain table; the active project is marked with *
rc projects use                # pick one from a list

In a terminal, most list and show commands open a full-screen browser you can scroll and drill into. Press q to leave it (Esc steps back). Add --no-input for a plain table, or --json for JSON.

rc projects use with no argument opens a picker. If you hop between projects, choose Ask me every time and rc asks per command instead of saving a default. Pass the ID to skip the picker: rc projects use proj_abc. No project yet? rc projects create --name "My App" --use creates one and makes it active.

How rc decides which project to use

From highest to lowest precedence:

  1. The --project-id flag on the command.
  2. The RC_PROJECT_ID environment variable.
  3. The nearest .revenuecat.json file, looking in the current directory and then each parent.
  4. The profile's default, set by rc projects use.

Pin a repository to a project

Create a .revenuecat.json file at the root of your app's repository and commit it. rc finds it from any subfolder, the way git finds .git, so everyone working in that repository targets the same project whatever their own default is.

json
{
  "project_id": "proj_abc"
}

Replace proj_abc with your project ID from rc projects list. If you later run rc projects use inside that repository and pick a different project, rc warns you that the file still wins there.

A broken file stops every command. If .revenuecat.json exists but is not valid JSON or has no project_id, every rc subcommand in that folder tree fails (even rc version; only --help and --version still work) with an error that names the file, for example .../.revenuecat.json: missing or empty project_id. That is on purpose: a broken file should not silently send your commands to another project. Fix or delete the file, or override it with --project-id or RC_PROJECT_ID.

Checkpoint: run rc projects show --no-input. You should see the details of the project you just chose.

Explore your project

0:10:00

rc --help groups the commands by job. Every group has its own help, for example rc offerings --help.

Map of the rc 1.0.1 command groups: Get started (auth, browse, open, profiles, projects, setup), Design paywalls (fonts, media-assets, paywalls), Manage your catalog (entitlements, offerings, packages, products, targeting), Manage customers and revenue (audiences, charts, customers, experiments, invoices, metrics, purchases, subscriptions), Connect apps and integrations (apps, webhooks), Automate with AI (rico, skills), and Advanced (api, audit, commands, completion, help, schema, version)

The command groups listed by rc --help in rc 1.0.1.

Read before you write

Start with commands that only read. Replace the example IDs with your own. In a terminal, most list and show commands (projects, apps, entitlements, offerings, products, customers) open an interactive browser, and rc browse opens a full-screen hub for the active project. Add --no-input to get a plain table instead (the current Offering and the active project are marked with * there), or --json for JSON. rc browse only works interactively: with --json or --no-input it stops with an error.

bash
rc apps list                 # apps and their store credentials
rc entitlements list         # lookup keys and names
rc offerings list            # current Offering marked with * (plain output)
rc offerings show ofrng_abc  # one Offering in detail
rc products list --app-id app_abc
rc customers show cus_abc    # entitlements, subscriptions, purchases
rc metrics                   # trials, subscriptions, MRR, revenue
rc charts show mrr           # see filters: rc charts options mrr
rc audit --limit 50          # who changed what, newest first

To jump to the dashboard, rc open paywalls opens that section in your browser, and --print only prints the URL.

JSON output

Add --json to any command and the result arrives on stdout inside a stable envelope: {"data": ..., "schema_version": 1}. This is real output:

text
$ rc version --json
{
  "data": {
    "version": "1.0.1"
  },
  "schema_version": 1
}

List commands put the page of results under data, so the rows are in data.items[] and data.next_page tells you whether there is more. A few commands use other keys, so look at one response before you write a script around it.

Filter it with jq, built in or piped

--format runs a jq expression on the --json output, with no jq install needed. Strings come out without quotes, one per line, ready for a shell loop.

bash
# built-in jq
rc entitlements list --json --format '.data.items[].lookup_key'

# or pipe to your own jq
rc offerings list --json | jq '.data.items[] | select(.is_current)'

# a bigger page of customers
rc customers list --json --limit 100 --format '.data.items[].id'
Terminal session: rc entitlements list with --format prints two lookup keys; rc offerings list piped to jq prints the current Offering's id and lookup key; rc projects list with no credential prints a JSON error envelope with exit_code 4 on stderr while jq receives nothing, and echo $? prints 0

Illustration: the lookup keys and IDs are examples. The error envelope is real rc 1.0.1 output with no credential set, and so is the 0 from echo $?.

Errors go to stderr, so check the exit code

When a command fails under --json, the error envelope goes to stderr, not stdout. Piped into jq, that means jq gets empty input, prints nothing, and exits 0. The shell then reports jq's exit code, not rc's, so a script carries on as if everything worked. Two ways to keep the real exit code:

bash
# 1. Let rc run the jq expression: no pipe, rc's exit code survives
rc offerings list --json --no-input --format '.data.items[].lookup_key'

# 2. Keep the pipe, but fail when rc fails (bash and zsh)
set -o pipefail
rc offerings list --json --no-input | jq '.data.items[].lookup_key'
Exit codeMeaning
0Success
1Error
2Bad usage, such as an unknown flag
4Authentication or authorization
5Not found
6Rate limited
130You pressed Ctrl+C at a prompt
A typo in the last field name of --format fails quietly. rc drops null results, so .data.items[].lookupkey prints nothing and exits 0. A typo earlier in the path, before [], fails loudly instead: invalid --format expression: cannot iterate over: null, exit 2. Either way, run the command with plain --json first and check the field names.

Let the CLI describe itself

You never have to guess a flag. The CLI can print its own surface:

bash
rc commands --json             # the full command tree
rc commands --schemas --json   # every command's flags and examples
rc schema apps create          # one command, as JSON

Write the command for rc schema as separate words. rc commands shows IDs like apps:create, but rc schema apps:create quietly returns the schema of the whole CLI instead.

Checkpoint: rc offerings list --json --format '.data.items[].id' prints one Offering ID per line, and echo $? right after it prints 0.

Upload paywall images and fonts

0:08:00

Paywalls look best with your own hero image, logo, and fonts. The MCP server cannot help here: it runs remotely and cannot read files on your disk, so it has no upload tools for the Media Gallery or the font library. rc reads the file locally and uploads it for you.

Upload an image

bash
rc media-assets upload ./hero.png

You should see Uploaded <id> (hero.png, <size> KB), followed by a line that says Reference it from paywall components as and the image's full URL. That URL is what you put on a paywall.

In --json output there is no single URL field. The URL is asset_base_url, a slash, and object_name, so build it with --format:

bash
rc media-assets upload ./hero.png --json --format '.data.asset_base_url + "/" + .data.object_name'

Use the URL your own upload returns rather than a host you copied from an example. rc media-assets list shows everything already in the gallery, with a REFERENCE column holding each image's URL.

Upload a font

bash
rc fonts upload ./Inter-Bold.ttf

# just the key, for a script
rc fonts upload ./Inter-Bold.ttf --json --format '.data.font_key'

The result includes a font_key that starts with RCFM:. That key is how a paywall refers to the font. The server registers the font for the whole project automatically, so there is no further setup call. rc fonts list shows every uploaded font and its key. Upload each style you need (regular, bold, and so on) as its own file; if a style is already there, the CLI tells you to look up its key with rc fonts list.

Terminal session: uploading hero.png prints Uploaded with an ID and size plus the URL to reference; a --json upload with --format prints only the URL; uploading Inter-Bold.ttf prints Uploaded with the font name and weight plus an RCFM font key; uploading logo.gif fails with unsupported image type and the list of accepted types

Illustration: IDs, sizes, the asset host, and the font key are examples. The rejected .gif at the bottom is real rc 1.0.1 output.

What you can upload

File typesMaximum size
Images.jpg .jpeg .png .webp .avif .heic .heif2 MiB
Fonts.ttf .otf5 MiB

The CLI checks the file extension (upper or lower case both work) and the size on your machine before anything is sent, so a wrong file fails fast with a clear message. A .gif, an .svg, or a .woff2 is rejected; convert it first.

Put them on a paywall

rc paywalls edit changes a paywall from a plain-language prompt. Paste the image URL into the prompt and say where it goes, and name the font key and the text it applies to. Its help recommends one kind of change per turn, and each turn takes one to several minutes:

bash
rc paywalls edit pw_abc --prompt "Use <your image URL> as the hero image"
rc paywalls edit pw_abc --prompt "Set headings to font_name <your RCFM font key>"
  • Images passed with --image or --attachment are visual references for the editor only. They are never placed on the paywall. To place your own image, paste its uploaded URL into the prompt. The editor can also generate a new hero or background image if you ask for one.
  • The editor does not list custom fonts by itself, so always name the key.
  • The preview screenshot may not render a custom font referenced this way. Check the result in the dashboard's paywall builder; the command prints its URL.
  • Each edit is saved to the paywall's draft. Customers see nothing new until someone publishes it with rc paywalls publish (see step 9).
Fonts belong to one project. If you duplicate a paywall into another project, its custom fonts do not come along: upload them to that project too, and set them on the paywall again.

How the AI Toolkit uses this

The toolkit's revenuecat-paywall-design skill knows the MCP server cannot upload. When your agent has a shell, the skill tells it to write or generate the file on disk, run the install and login checks from the revenuecat-cli skill (step 8), and then upload with rc media-assets upload or rc fonts upload. Without a shell, it gives you the rc command to run yourself, or asks you to upload in the dashboard. Images that the MCP server's AI paywall tools generate during an edit are not a Media Gallery upload; for a reusable project asset, the skill uploads with rc.

Checkpoint: rc media-assets list shows your image, and rc fonts list shows your font with its RCFM: key.

Use rc in CI

0:10:00

A CI runner has no browser and no one to answer prompts. rc handles that with environment variables and one flag:

  • RC_API_KEY: a RevenueCat API v2 secret key. It replaces the stored login and writes nothing to disk. (--api-key does the same per command.)
  • RC_PROJECT_ID: the project to act on.
  • --no-input: fail instead of waiting for a prompt that nobody will answer.
  • --json: output your next step can parse.

1. Store the key as a secret

Create a secret API key on your project's API keys page in the dashboard (rc open api-keys takes you there). Choose V2 as the version (v1 secret keys also start with sk_, but they do not work with API v2) and give it read-only permissions, since this workflow only reads. A leaked read-only key cannot change your project, though it can still read your data, so keep it secret. In your GitHub repository, open Settings > Secrets and variables > Actions, add a secret named RC_API_KEY with the key, and a variable named RC_PROJECT_ID with your project ID. The project ID is not a secret, so a variable keeps it readable in logs.

2. Add a read-only workflow

Start with commands that only read. Save this as .github/workflows/revenuecat.yml:

yaml
name: RevenueCat read-only check

on:
  workflow_dispatch:

permissions: {}

jobs:
  revenuecat:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/setup-node@v7
        with:
          node-version: 24

      - name: Read the RevenueCat project
        env:
          RC_API_KEY: ${{ secrets.RC_API_KEY }}
          RC_PROJECT_ID: ${{ vars.RC_PROJECT_ID }}
        run: |
          npx -y @revenuecat/cli@1.0.1 auth status
          npx -y @revenuecat/cli@1.0.1 entitlements list --json --no-input --format '.data.items[].lookup_key'
          npx -y @revenuecat/cli@1.0.1 offerings list --json --no-input > offerings.json

Why it is written this way:

  • The version is pinned (@1.0.1), so the job behaves the same until you choose to upgrade.
  • The secret is set with env on the one step that runs rc, not on the whole job, so other steps (including the third-party setup-node action) never see it. permissions: {} turns off the GITHUB_TOKEN permissions this job does not need. If you add actions/checkout later, give the job contents: read.
  • rc auth status is there for the log. It exits 0 even when no credential is set, so it never fails the job by itself. It also does not check that the key works; with a wrong key it still says Logged in. The next command catches that.
  • The list commands are the real check. With a missing or rejected key they exit with code 4. GitHub runs this script with bash -e, so the step stops and fails at the first command that fails. The commands use --format or a plain redirect instead of a pipe, so rc's exit code is the one that counts.

3. Run it

Open the Actions tab, pick RevenueCat read-only check, and run it. The log should look like this:

text
✓ Logged in (profile: default)
  Credential                  the RC_API_KEY environment variable
premium
pro_lifetime

Illustration: the lookup keys are examples. If RC_PROJECT_ID names a project the key cannot reach, rc auth status adds a line saying it could not validate the project, or that the project is no longer accessible.

When you are ready to write

Under --no-input, commands that ask for confirmation (deletes, refunds, publishing, store writes) refuse to run unless you also pass --yes. That is deliberate: add --yes only to the specific step that is meant to make a change, never to a whole script by habit. Give that job its own key with write permissions, and keep the read-only key for read-only jobs. A good pattern for store changes is plan, review, then apply the exact plan you reviewed:

bash
plan_id=$(rc products store plan app_abc --file catalog.csv --json --no-input --format '.data.id')
rc products store show "$plan_id" --json       # review the diff
rc products store apply "$plan_id" --yes       # writes to the store
Usage analytics. When the CI environment variable is set, as it is on GitHub Actions, rc labels its requests as CI usage. Set DO_NOT_TRACK=1 to leave its analytics headers off.

Checkpoint: the workflow run is green and its log lists your entitlement lookup keys.

Let your AI agent use rc

0:05:00

A coding agent with a shell can run rc just like you. What makes it run it well is the AI Toolkit's revenuecat-cli skill. There are two ways to install it:

  • The AI Toolkit plugin installs the skills and the MCP server together. Follow the AI Toolkit codelab.
  • From the CLI: rc skills install runs npx skills add RevenueCat/ai-toolkit --global for you.
bash
rc skills install              # core skills, for every supported agent, globally
rc skills install --project    # only for the current repository
rc skills install --all        # every RevenueCat skill
rc skills prompts              # starter prompts to paste into a new agent session

The core bundle includes create-revenuecat-project, integrate-revenuecat, revenuecat-cli, revenuecat-paywall, revenuecat-store-state, and revenuecat-status. By default it targets Claude Code, Codex, Cursor, Gemini CLI, and GitHub Copilot in VS Code; --agent codex picks one. Start a new agent session or reload the agent afterwards so it sees the skills.

What the revenuecat-cli skill makes your agent do

  1. Check that rc is installed with rc --version. If it is missing, the agent can use npx @revenuecat/cli, which needs only Node.js 18 or later, or install it with Homebrew or npm install -g. Installing changes your machine, so the skill tells the agent to ask you first.
  2. Check the login with rc auth status --json. The CLI does not share the MCP server's login, so if nothing is active the agent asks you to run rc auth login (it opens your browser). In CI it uses RC_API_KEY or --api-key instead.
  3. Check the project: it passes --project-id, or asks you to set a default with rc projects use.
  4. Discover instead of guessing: rc commands --schemas --json or rc schema with space-separated words, never a flag from memory.
  5. Read the output safely: --json and --no-input, and it inspects the response instead of assuming every list lives in data.items. It prefers a specific command and only falls back to rc api for endpoints the CLI does not cover yet.
  6. Keep secrets out: it never puts a secret key in your app and never asks you to paste one into the chat.
Chat between a developer and an AI coding agent: the agent finds rc is not installed and asks whether to use npx or install with Homebrew; after the developer picks npx, it finds the CLI is not logged in and asks the developer to run npx @revenuecat/cli auth login; then it uploads assets/hero.png and returns the image URL

Illustration: a typical exchange, shortened. The URL and wording are examples, and the project check is left out.

Starting a brand-new app? rc setup, run in your app's folder, installs the toolkit skills and launches the agent you pick with a full setup prompt. You approve each step, and the Apple sign-in is handed back to you.
An agent cannot answer a terminal prompt. To run a command that asks for confirmation it has to pass --yes, so the only confirmation left is your conversation with it. Ask it to check with you before anything in the next step's table. The CLI's own help for rc paywalls publish tells agents to get your approval before publishing.

Checkpoint: in a new agent session, ask "Which RevenueCat project is the rc CLI using?" With the skill loaded, you should see the agent check rc --version and rc auth status --json (or their npx form) before it answers.

Stay safe with commands that change things

0:05:00

rc works on your live project. The commands below change what customers see, get, or pay, or cannot be undone. Most of them ask for confirmation when you run them in a terminal. --yes skips that question, and under --no-input they refuse to run without --yes. One --yes approves every confirmation in that command, so treat it like a signature. Not every change asks, though: the table marks the ones that run straight away.

CommandWhat it changesBefore you run it
rc offerings set-currentWhich Offering apps receive as the current oneNote the current one with rc offerings list --no-input. To undo, set the old one current again.
rc paywalls publish, unpublishWhat customers see on the paywallReview the preview and the dashboard builder, and get approval.
rc paywalls attach (published paywall)Lets customers who get that Offering see this paywallSame as publish: review and get approval.
rc paywalls deleteDeletes a paywall for good. One that is attached or published also needs --force.It may be serving customers or be someone's work in progress. Ask first.
rc products delete, rc offerings delete, rc entitlements deletePermanent catalog deletesPrefer archive, which restore can undo.
rc packages delete, rc apps delete, rc webhooks deletePermanent deletes. Deleting an app disconnects its store integration; deleting a webhook stops its events.Irreversible. Double-check the ID.
rc targeting create, rc targeting update (active or scheduled rules)Changes which Offering matching customers seeCheck rc targeting list and the rule's audience.
rc targeting deleteDeletes a targeting rule. Active or scheduled rules also need --force.It can change which Offering customers see.
rc subscriptions refund, rc purchases refundReturns real money and removes access immediately (Google Play and Web Billing only)Irreversible.
rc subscriptions cancelStops a Web Billing subscription from renewingIt cannot be uncancelled through the API.
rc customers transferMoves all purchases from one Customer to anotherNot automatically reversed.
rc customers grantGives a customer free access for the chosen durationCheck the customer ID and --duration.
rc customers revokeRemoves a promotional entitlementRe-grant with rc customers grant if needed.
rc subscriptions extendPushes back a subscription's next renewalIts help mentions no confirmation step, so check the ID and the --by duration.
rc customers restore-googleRe-syncs a Google Play purchase from its purchase tokenRuns with no prompt. The token's consumption with Google cannot be undone.
rc products push, rc products store applyWrites to the connected store: App Store Connect, Google Play, Web Billing, or Test Store (products push also covers Stripe)Review the plan with rc products store show. Undoing means pushing or applying the old state.
rc experiments start, pause, resume, updateChanges which Offering new customers are enrolled intoCheck the experiment with rc experiments show first.
rc experiments stopPermanently stops an experimentMake sure you have the results you need.
rc rico "..." --approve-tools --yes --no-inputLets Rico, RevenueCat's AI assistant, run tools that change and delete data with no one watchingPrefer an interactive rc rico, where every change pauses for your approval.
rc api POST, PUT, PATCH, DELETERaw API v2 calls with your credentialsIts help mentions no confirmation step. Treat it like curl with your secret key.
rc profiles deleteRemoves a local profileIrreversible; you log in again to recreate it.

Habits that prevent accidents

  • Check where you are first. rc auth status shows the profile and credential; keep staging and production in separate profiles (step 3).
  • Archive instead of delete for products, Offerings, and entitlements.
  • Read the audit log afterwards. rc audit lists who changed what, newest first.
  • Keep secrets out of your shell history. Use the masked prompts or environment variables, not flags. For example, the help for the Apple setup recommends RC_APPLE_PASSWORD over --apple-password.

Checkpoint: run rc offerings set-current --help. Its help states what the command changes, whether it asks for confirmation, and how to reverse it. Read that part of the help before you run any command from the table for the first time.

Troubleshooting

0:05:00
What you seeWhyFix
not authenticated: run `rc login` or pass --api-key / set RC_API_KEY (exit 4)No credential for the active profileRun rc auth login (rc login is the same command) or set RC_API_KEY. Check --profile and RC_PROFILE too.
no active project: run `rc projects use <id>` or pass --project-id (exit 1)None of the four project sources is set, and --no-input stops rc from askingRun rc projects use, or pass --project-id, or set RC_PROJECT_ID.
Commands hit the wrong projectA higher source wins: an RC_PROJECT_ID left in your shell, or a .revenuecat.json in a parent folderrc auth status --json shows the project_id in use. Logging in again also clears the saved default, so run rc projects use after a new login.
.../.revenuecat.json: missing or empty project_id on every commandA broken binding file in this folder treeFix or delete the file (step 4).
rc ... --json | jq prints nothingThe command failed and its error went to stderrRead the error above the prompt. Use --format or set -o pipefail (step 5).
--format prints nothing and exits 0The last field name in your expression does not existRun with plain --json and check the field names.
invalid --format expression: cannot iterate over: null (exit 2)A name before [] is misspelled or missingRun with plain --json and check the field names.
rc browse requires an interactive terminal; use individual subcommands with --json or --no-input insteadrc browse ran with --json, --no-input, or outside a terminalRun it in an interactive terminal, or use a specific command such as rc offerings list --no-input.
! --format is only applied to --json output; ignoring--format without --jsonAdd --json.
unsupported image type "./logo.gif" (accepted: jpg, jpeg, png, webp, avif, heic, heif) (exit 1)The extension is not on the listConvert the image to one of the accepted types.
image ./hero.png is 3072 KB: the upload limit is 2 MiBToo bigResize or compress to 2 MiB or less. Fonts have a 5 MiB limit.
unsupported font type "./font.woff2" (accepted: ttf, otf)Web font formats are not acceptedUpload the .ttf or .otf file.
A font upload says the style is already uploadedThat style is already in the projectFind its key with rc fonts list and reuse it.
unknown flag: --something (exit 2)The flag does not exist in your versionCheck rc <command> --help or rc schema <command words>.
rc schema apps:create shows the whole CLIColon formUse spaces: rc schema apps create.
@revenuecat/cli: no prebuilt binary available for ...npm skipped optional dependencies (for example with --no-optional), or the platform is not supportedReinstall without skipping optional dependencies, or use Homebrew or a release binary.
rc auth status warns about more than one credentialRC_API_KEY or --api-key overrides your stored loginUnset RC_API_KEY if you meant to use the login.
rc rico says it needs a RevenueCat loginRico does not accept API keysLog in with the browser: rc auth login --oauth.

If none of these match, run the command again with --json and read the error object on stderr: it carries a type, a message, the exit_code, and often a hint.

Conclusion

0:01:00

You can now drive RevenueCat from a terminal, a script, a CI job, or an agent:

  • rc is installed (or a pinned npx away), logged in, and pointed at the right project, with .revenuecat.json pinning a repository when you need it.
  • You read your project with --json, filter it with --format or jq, and check exit codes because errors go to stderr.
  • You upload paywall images and fonts, which the MCP server cannot do, and use the returned URL and RCFM: key on a paywall.
  • CI runs with RC_API_KEY, RC_PROJECT_ID, and --no-input, starting read-only.
  • Your agent follows the revenuecat-cli skill, and you know which commands deserve a second look.

Keep going

Official docs