npm package: @izantech/revenuecat-cli
Description: Unofficial RevenueCat API v2 command line interface (not affiliated with RevenueCat)
Latest version: 0.1.1

# @izantech/revenuecat-cli

[![npm version](https://img.shields.io/npm/v/@izantech/revenuecat-cli)](https://www.npmjs.com/package/@izantech/revenuecat-cli) [![node](https://img.shields.io/node/v/@izantech/revenuecat-cli)](https://nodejs.org/) [![npm last update](https://img.shields.io/npm/last-update/@izantech/revenuecat-cli)](https://www.npmjs.com/package/@izantech/revenuecat-cli)

Unofficial RevenueCat API v2 CLI for scripting and automation.
Not affiliated with RevenueCat.

## Install

```bash
npm install --save-dev @izantech/revenuecat-cli
```

Run directly with:

```bash
npx revcat --help
```

Install the bundled agentic skill (optional):

```bash
npx revcat install-skill codex --global
```

## Authentication

Set a v2 secret API key and project id:

```bash
export REVENUECAT_SECRET_API_KEY=sk_...
export REVENUECAT_PROJECT_ID=proj_...
```

The CLI automatically loads `.env.local` and `.env` from the current directory and workspace root.

## Quickstart

List available operations:

```bash
npx revcat api operations
```

Show one operation:

```bash
npx revcat api show create-product
```

Run an operation by id:

```bash
npx revcat api run list-products --query app_id=app_123 --query limit=20
```

Run with generated command aliases:

```bash
npx revcat products list --query app_id=app_123 --limit 20
```

For scripting, use JSON output:

```bash
npx revcat --format json subscriptions search --query customer_id=user_123
```

## Mutation Safety

Mutating operations (`POST` / `DELETE`) require both `--apply` and `--yes`.

```bash
npx revcat products create --body-file ./payload.json
# blocked

npx revcat products create --body-file ./payload.json --apply --yes
# executes
```

## Optional Config

Default config path: `config/revenuecat-cli.json`

```json
{
  "defaultProfile": "prod",
  "profiles": {
    "prod": {
      "projectId": "proj_prod",
      "apiBaseUrl": "https://api.revenuecat.com/v2",
      "timeoutMs": 15000
    },
    "staging": {
      "projectId": "proj_staging"
    }
  }
}
```

Use a profile with:

```bash
npx revcat --profile staging api operations
```

Or environment variable:

```bash
export REV_CAT_PROFILE=staging
```

## Agentic Skill Install

Install for Codex globally (`~/.agents/skills`):

```bash
npx revcat install-skill codex --global
```

Install for Codex in the current project (`.agents/skills`):

```bash
npx revcat install-skill codex --local
```

Install for Claude Code globally (`~/.claude/commands`):

```bash
npx revcat install-skill claude --global
```

Install for Claude Code in the current project (`.claude/commands`):

```bash
npx revcat install-skill claude --local
```

Install for Gemini CLI globally (`~/.gemini/commands`):

```bash
npx revcat install-skill gemini --global
```

Install for Gemini CLI in the current project (`.gemini/commands`):

```bash
npx revcat install-skill gemini --local
```

Install for Cursor in the current project (`.cursor/rules`, local-only):

```bash
npx revcat install-skill cursor --local
```

Install for Aider globally (`~/.aider.conf.yml` + `~/.aider/agentic-revcat.md`):

```bash
npx revcat install-skill aider --global
```

Install for Aider in the current project (`.aider.conf.yml` + `.aider/agentic-revcat.md`):

```bash
npx revcat install-skill aider --local
```

Overwrite existing installation:

```bash
npx revcat install-skill claude --global --force
```

## Docs

- Usage guide: [`docs/usage.md`](./docs/usage.md)
- Command reference: [`docs/command-reference.md`](./docs/command-reference.md)
- Scope matrix: [`docs/scope-matrix.md`](./docs/scope-matrix.md)