---
id: "tools/cli/setup"
title: "Install and authenticate the RevenueCat CLI"
description: "This article shows you how to install the RevenueCat CLI and connect it to your RevenueCat account. By the end, rc auth status will report your authenticated account and the project the CLI acts on."
permalink: "/docs/tools/cli/setup"
slug: "setup"
version: "current"
original_source: "docs/tools/cli/setup.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).

This article shows you how to install the RevenueCat CLI and connect it to your RevenueCat account. By the end, `rc auth status` will report your authenticated account and the project the CLI acts on.

## Prerequisites

- A [RevenueCat account](https://app.revenuecat.com/signup). If you don't have one, the CLI can create one for you with `rc auth signup` after you install it.
- A RevenueCat project. If you don't have one, create one with `rc projects create` after authenticating, or see [Projects](https://www.revenuecat.com/docs/projects/overview).

The CLI ships as a native binary for macOS, Linux, and Windows, so there's no runtime requirement. Node.js is only needed if you install through npm.

## Install the CLI

On macOS and Linux, install with Homebrew:

```bash
brew install RevenueCat/tap/rc
```

For CI, agent sandboxes, and React Native projects, install through npm instead. The package ships the same native binary; Node only dispatches to it:

```bash
npm install -g @revenuecat/cli
```

Both methods install the command as `rc` and `revenuecat` (the same binary); use whichever you prefer. Every command also runs without installing anything, via `npx @revenuecat/cli <command>`.

Download a binary directly

Binaries for macOS, Linux, and Windows (amd64 and arm64) are attached to each release on the [releases page](https://github.com/RevenueCat/cli/releases), with checksums.

## Authenticate

Log in with your browser, or paste an API key when prompted:

```bash
rc auth login
```

The CLI acts with your RevenueCat account's permissions. See [collaborator permissions](https://www.revenuecat.com/docs/projects/collaborators#permissions) for what each role can reach.

If you don't have an account yet, create one without leaving the terminal:

```bash
rc auth signup
```

For CI and scripts, skip the login flow and pass a [RevenueCat API v2 secret key](https://www.revenuecat.com/docs/projects/authentication) through the `RC_API_KEY` environment variable or the `--api-key` flag.

## Select a project

Set the project the CLI acts on by default:

```bash
rc projects use
```

With no argument, this opens an interactive picker. Choose **Ask me every time** if you work across multiple projects and want to pick per command. You can also override the project per invocation: the `--project-id` flag takes highest precedence, then the `RC_PROJECT_ID` environment variable, then a `.revenuecat.json` file in the directory tree, then the profile default.

To keep separate credentials for staging and production, log in once per profile and name the profile per command:

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

rc --profile staging customers list
rc --profile prod customers list
```

## Verify your setup

Confirm the CLI is authenticated and pointed at the right project:

```bash
rc auth status
```

This prints your auth state and cached account identity without changing anything. `rc whoami` is a shortcut for the same command.

## Continue with guided setup

With the CLI installed and authenticated, `rc setup` walks the rest of the RevenueCat setup while you approve each step, and emits a prompt your coding agent can run non-interactively. If your project already exists, point it straight at a store:

```bash
rc setup apple app_abc      # App Store Connect: create and upload keys
rc setup google app_xyz     # Google Play: bootstrap and upload the service-account credential
```

The argument is the RevenueCat app ID (like `app_abc`), not a bundle ID or a store app ID. See the [Setup commands](https://www.revenuecat.com/docs/tools/cli/commands#setup) for what each flow does, and the manual paths in [App Store Connect API keys](https://www.revenuecat.com/docs/service-credentials/itunesconnect-app-specific-shared-secret/app-store-connect-api-key-configuration) and [Google Play service credentials](https://www.revenuecat.com/docs/service-credentials/creating-play-service-credentials) if you'd rather create credentials yourself.

## Next steps

- [Look up a command](https://www.revenuecat.com/docs/tools/cli/commands)
- [Use the CLI from a coding agent](https://www.revenuecat.com/docs/tools/cli/agents)
- [Install the AI Toolkit skills](https://www.revenuecat.com/docs/tools/ai-toolkit/skills) so your agent knows RevenueCat workflows
