Add RevTurbine with a Coding Agent
If you integrate through a coding agent, you don’t have to hand-wire the first gate. Point the agent at your app with the prompt below — it does the inspection and the edit, and you review the diff.
Paste-in prompt
Section titled “Paste-in prompt”You're adding RevTurbine (@revturbine/sdk) to this app to gate one paid feature.
1. Inspect the app and find ONE non-critical feature currently gated by a hard-coded plan check (e.g. `user.plan === 'pro'`). Pick the safest one.2. Install @revturbine/sdk and wrap the app in <RevTurbineProvider> if it isn't already. Use local_only mode with a bundled playbook.json fixture so it runs with no account.3. Add a minimal playbook.json fixture with: a free and a pro plan, one entitlement for the feature, and a gate placement (upgrade modal) for free users.4. Replace the hard-coded check with <Gate id="..." can="<entitlement>">, keeping the existing UI as the gated children and letting the placement render the upsell.5. Do NOT touch any billing-critical or server-side enforcement path. Leave those checks in place — the client Gate is UI only.6. Run the type checker, then explain the diff: what moved into config, what stayed in code, and why the server-side check (if any) was left alone.Automate the config loop with the CLI
Section titled “Automate the config loop with the CLI”Everything RevTurbine decides lives in the Playbook, and the CLI (@revturbine/cli, command revturbine) manages the Playbook lifecycle from the terminal — so a customer’s own agent can enhance monetization on a cadence with deterministic guardrails. Anything you can do in the studio UI, you can do through the CLI.
A recurring loop looks like:
# 1. Your agent proposes a config change (new segment, adjusted limit, new copy).# 2. Validate it against the real schema before anything ships.revturbine validate ./playbook.json
# 3. Upload it as the open draft, then preview and evaluate that draft.revturbine upload ./playbook.jsonrevturbine previewrevturbine evaluate --draft --entitlement data_export
# 4. Launch it through the review lifecycle.revturbine launch --draftThe guardrails are the point: the agent proposes, the CLI verifies against the real schema and lets you preview the impact before deploy, and the change moves through the same draft → submit → approve → deploy lifecycle a human would use. Your app code never changes — the agent only ever edits config.
Related
Section titled “Related”- Replace Hard-Coded Plan Checks — the before/after the agent produces
- Beyond Gating — what the config can express
- Client vs Server Enforcement — the paths the agent must not touch