Skip to content

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.

revcat init

FileCommitted?ModePurpose
revcat.tomlyes0644project_id + optional apps[]. Documents which RC project this repo belongs to.
.revcat/config.jsonno (gitignored)0600OAuth 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.

Terminal window
revcat init [flags]

Requires an authenticated global profile (run revcat auth login first), or REVCAT_REFRESH_TOKEN set in the environment.

FlagDescription
--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-appsSkip the apps section entirely (still writes project_id)
--no-local-credsWrite only revcat.toml; skip .revcat/config.json
--forceOverwrite an existing revcat.toml or .revcat/config.json
--path <dir>Where to write files (default: cwd)

Interactive — pick project + apps from a list:

Terminal window
cd ~/your-repo
revcat init

Scripted — for CI / agents / re-init in another shell:

Terminal window
revcat init --project-id projaac376d8 --no-apps --force

Re-init after switching active global profile (the local config is rewritten with the new credential):

Terminal window
revcat auth use work
revcat init --force

Just record project context without copying credentials (e.g., when committing a fresh repo and you want the next dev to log in themselves):

Terminal window
revcat init --project-id projaac376d8 --no-local-creds

Inside the directory, project-scoped commands work without flags:

Terminal window
revcat offerings list
revcat entitlements list
revcat publish offering pro --paywall ./paywalls/pro.json

cd 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.

Terminal window
revcat auth status --validate

source should be local and source_path should point at your .revcat/config.json. project_source should be that same path.

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 match