init
Bind the current directory to a RevenueCat project. Writes:
- revcat.toml (committed): project_id + optional apps
- .revcat/config.json (gitignored, mode 0600): credentials + project_id
After init, every command run inside this directory inherits the project context. Agents and sandboxes that have access to the directory can run revcat without touching the global ~/.revcat/config.json.
Interactive (default): lists projects you can access, prompts for one, then optionally lists apps in that project and lets you tag them.
Scripted: pass —project-id (and optional —app-id, repeated). Skip the apps block entirely with —no-apps. Skip the local creds copy with —no-local-creds (writes only revcat.toml).
Full flag reference: see the CLI reference.

What it writes
Section titled “What it writes”| File | Committed? | Mode | Purpose |
|---|---|---|---|
revcat.toml | yes | 0644 | project_id + optional apps[]. Documents which RC project this repo belongs to. |
.revcat/config.json | no (gitignored) | 0600 | OAuth credential blob + project_id + apps. Walked up from cwd by every revcat command. |
.revcat/ is auto-appended to .gitignore (idempotent). The committed half (revcat.toml) is non-secret; the gitignored half (.revcat/config.json) carries the refresh token and must not be committed.
Synopsis
Section titled “Synopsis”revcat init [flags]Requires an authenticated global profile (run revcat auth login first), or REVCAT_REFRESH_TOKEN set in the environment.
| Flag | Description |
|---|---|
--project-id <id> | Skip the project picker and use this id (also reads from REVCAT_PROJECT_ID) |
--app-id <id> | Record an app id (repeatable). Skips the app picker. |
--no-apps | Skip the apps section entirely (still writes project_id) |
--no-local-creds | Write only revcat.toml; skip .revcat/config.json |
--force | Overwrite an existing revcat.toml or .revcat/config.json |
--path <dir> | Where to write files (default: cwd) |
Examples
Section titled “Examples”Interactive — pick project + apps from a list:
cd ~/your-reporevcat initScripted — for CI / agents / re-init in another shell:
revcat init --project-id projaac376d8 --no-apps --forceRe-init after switching active global profile (the local config is rewritten with the new credential):
revcat auth use workrevcat init --forceJust record project context without copying credentials (e.g., when committing a fresh repo and you want the next dev to log in themselves):
revcat init --project-id projaac376d8 --no-local-credsAfter init
Section titled “After init”Inside the directory, project-scoped commands work without flags:
revcat offerings listrevcat entitlements listrevcat publish offering pro --paywall ./paywalls/pro.jsoncd out of the directory and the binding goes away. Commands fall back to the global ~/.revcat/config.json, and project-scoped commands need --project-id.
Verifying
Section titled “Verifying”revcat auth status --validatesource should be local and source_path should point at your .revcat/config.json. project_source should be that same path.
Mismatch detector
Section titled “Mismatch detector”If revcat.toml.project_id and .revcat/config.json.project_id disagree (e.g., someone hand-edited the toml), revcat auth doctor flags it:
FAIL toml/local mismatch revcat.toml says proj_x, .revcat/config.json says proj_y hint: rerun `revcat init --force` to realign, or edit revcat.toml to matchRelated
Section titled “Related”auth login— required before initauth status— show resolved credential + project contextauth doctor— diagnose auth + project binding issues- Configuration — full env var list and resolution order