Skip to content

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.

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.

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:

Terminal window
# 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.json
revturbine preview
revturbine evaluate --draft --entitlement data_export
# 4. Launch it through the review lifecycle.
revturbine launch --draft

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