---
id: "tools/cli/agents"
title: "RevenueCat CLI for coding agents"
description: "The RevenueCat CLI is built so a coding agent can use it without a person translating each step. You don't have to configure anything to allow this. This article covers the properties agents rely on: runtime discovery, structured output, non-interactive execution, browserless signup, and the command that installs your agent's RevenueCat knowledge."
permalink: "/docs/tools/cli/agents"
slug: "agents"
version: "current"
original_source: "docs/tools/cli/agents.mdx"
---

> **AI agents:** This is the Markdown version of a RevenueCat documentation page. For the complete documentation index, see [llms.txt](https://www.revenuecat.com/docs/llms.txt).

The RevenueCat CLI is built so a coding agent can use it without a person translating each step. You don't have to configure anything to allow this. This article covers the properties agents rely on: runtime discovery, structured output, non-interactive execution, browserless signup, and the command that installs your agent's RevenueCat knowledge.

## How agents discover commands

The CLI describes its own surface, so an agent enumerates what's available at runtime instead of depending on a command list baked into its training data:

```bash
rc commands --json       # the full command tree with capabilities
rc commands --schemas    # the same tree with every command's schema inlined
rc schema <cmd>          # flags, arguments, and examples for any command
```

Two annotations in that output matter for agents. Commands marked `"experimental": true` are hidden from `rc --help` until their feature ships but are still runnable, so an agent can detect them and choose to skip them. Commands marked `requires_human` carry a `requires_human_reason` explaining why a person has to run them: the store credential flows sign in to Apple or Google with two-factor authentication in a local terminal, and Apple credentials should never be collected in chat. `rc setup` is the special case: interactively it launches a local AI agent, but run non-interactively (`rc setup --json`) it returns the setup prompt for your own agent to follow directly.

For anything the CLI doesn't cover, `rc api` calls any RevenueCat API v2 endpoint with the CLI's credentials:

```bash
rc api GET /projects/proj_abc/customers
rc api POST /projects/proj_abc/offerings --body '{"lookup_key":"sale"}'
```

## Structured output

Every command supports `--json`, so a caller parses a result rather than scraping formatted text:

```bash
rc customers list --json | jq '.data.items[].id'
```

Errors come back as JSON in `--json` mode too, with stable types and exit codes, so the same parser handles both transport and CLI errors:

```json
{
  "error": {
    "type": "resource_missing",
    "message": "Could not find entitlement 'entl_nope' within this project",
    "exit_code": 5,
    "request_id": "fc53f50e-…",
    "doc_url": "https://errors.rev.cat/resource-missing"
  },
  "schema_version": 1
}
```

The global `--format` flag applies a jq expression to `--json` output directly, without a separate jq install. Exit codes are stable and enumerated in the [command reference](https://www.revenuecat.com/docs/tools/cli/commands#exit-codes).

## Running without prompts

Interactive prompts hang automation, so the CLI can refuse them:

- `--no-input` makes any command fail rather than prompt.
- `--yes` skips confirmation prompts on destructive commands.
- `RC_API_KEY` and `RC_PROJECT_ID` environment variables replace the on-disk login and project selection entirely.

```bash
RC_API_KEY=sk_... RC_PROJECT_ID=proj_abc rc entitlements list --json --no-input
```

## Creating an account from an agent

An agent can create a RevenueCat account and receive renewable credentials without opening a browser:

```bash
rc auth signup \
  --email dev@example.com \
  --name "Example Developer" \
  --generate-password \
  --save-password \
  --accept-terms \
  --no-input --json
```

Three rules keep this safe:

- **Consent is explicit.** Pass `--accept-terms` only after the user authorizes accepting the Terms of Service and Privacy Policy, and add `--marketing-emails` only on a separate opt-in.
- **Passwords stay out of the shell.** `--generate-password --save-password` creates a one-time password in memory and stores it in the macOS login Keychain without printing it. Prefer the `RC_PASSWORD` environment variable over `--password`, which can leak via shell history and process listings.
- **Verify the result.** Check that `account_created`, `authenticated`, and `password_saved_to_keychain` are `true` in the response.

## Installing skills for your agent

The CLI installs the [AI Toolkit skills](https://www.revenuecat.com/docs/tools/ai-toolkit/skills), the playbooks that give your agent the right order of operations for RevenueCat workflows:

```bash
rc skills install            # global; installs the core project-setup skills
rc skills install --project  # repository-local instead
rc skills install --all      # the full skill catalog
```

By default the skills install for the coding agents RevenueCat supports; pass `--agent` (for example `--agent codex`) to target a specific one, or `--skill` to install a single skill by name.

`rc` delegates to the Skills CLI (`npx skills add RevenueCat/ai-toolkit`), so the workflows update in one place rather than shipping a stale copy. Re-run `rc skills install` to update, then reload your agent to pick up changes.

Skills don't run on install; the agent selects one when a request matches its description. Run `rc skills prompts` for copy-ready starter prompts.

If you'd rather install through a plugin marketplace, see [Plugins](https://www.revenuecat.com/docs/tools/ai-toolkit/plugins), which sets up the skills and the MCP server together.

## CLI or MCP server?

The CLI and the [MCP Server](https://www.revenuecat.com/docs/tools/mcp) both let an agent act on your RevenueCat account, and their capabilities overlap:

- **The MCP server** fits inside a coding assistant, where the agent already holds a connection to your projects and is working in your codebase.
- **The CLI** fits scripted or repeatable setup, CI, and environments where the agent runs shell commands rather than MCP tools. It's also the only path for the local store credential flows (`rc setup apple`, `rc setup google`), which have to run on your machine.

You don't have to choose one: the [plugin](https://www.revenuecat.com/docs/tools/ai-toolkit/plugins) configures the MCP server, and the skills it installs use the CLI when a workflow calls for it.

## Next steps

- [Install and authenticate the CLI](https://www.revenuecat.com/docs/tools/cli/setup)
- [Look up a command](https://www.revenuecat.com/docs/tools/cli/commands)
- [Set up the MCP server](https://www.revenuecat.com/docs/tools/mcp/setup)
