Quickstart guide for the Adapty Developer CLI
The Adapty CLI lets you set up your app configuration entirely from the command line. Use it as an alternative to the dashboard quickstart if you prefer terminal tooling or MCP clients.
Connecting Adapty to App Store Connect and Google Play still requires a one-time setup in the dashboard — covered in step 3.
By the end, your app, access level, product, flow or paywall, and placement are all visible in the Adapty dashboard.
If you run the CLI in Claude Cowork, set it up in Claude first — see Set up the Adapty CLI in Claude Cowork.
1. Install the CLI
Requires Node.js 18 or later.
To install the CLI, run the command:
npm install -g adapty
Or, directly:
npx adapty auth login
2. Authenticate
Run the login command to connect the CLI to your Adapty account.
adapty auth login
The CLI opens a browser tab. Match the code shown in the terminal to the code shown in the browser, then click Authorize. The terminal confirms when authentication is complete.
3. Create your app
An app in Adapty represents your mobile application. One Adapty app connects to both App Store and Google Play — you only need to create one, regardless of how many stores you publish to.
The command returns an <app-id>. Use this ID in all subsequent commands.
Before continuing, connect your app to App Store Connect and Google Play in the Adapty dashboard. Product IDs from both stores are required in step 5.
4. Create an access level (optional)
Access levels control what users can access after purchase. Instead of checking whether a user bought a specific product, your app checks whether the user has a given access level. This decouples your app logic from specific product IDs.
A premium access level is automatically created with every new app. For most apps, you can skip this step. Use premium as the access level ID in step 5.
Only run this command if different products unlock different features for different user groups — for example, if a “Basic” subscriber and a “Pro” subscriber get access to different parts of the app.
adapty access-levels create --app <app-id> --sdk-id "pro" --title "Pro"
--sdk-idis the identifier you’ll use in your app code to check whether a feature should be available to the user (for example,if user.hasAccessLevel("pro")). If you skip this step and use the default access level, its--sdk-idispremium.--titleis a display label for your own reference in the Adapty dashboard.
The command returns an <access-level-id>.
5. Create a product
In Adapty, a product represents anything your app sells — a subscription or a one-time purchase. Items from App Store Connect and Google Play can be grouped into a single Adapty product and managed from one place.
You’ll need the product IDs from each store: the Apple product ID from App Store Connect, and the Android product ID and base plan ID from Google Play Console. See Products for details on where to find them.
If you skipped step 4, use the default_access_level.id returned by the apps create command in step 3 as your <access-level-id>.
The store product IDs you link here cannot be changed after creation. To use different store product IDs, create a new product.
The command returns a <product-id>.
If you also sell this product on the web through Stripe or Paddle, add those IDs to the same command. See products create in the command reference.
6. Create a flow or paywall
Every product must be inside a flow or a paywall before it can appear in your app. Pick one:
- A flow is a screen, or a sequence of screens, that you design in the no-code Flow & Paywall Builder and the Adapty SDK renders natively: a paywall screen, an onboarding, a quiz. Choose a flow when you want Adapty to render the purchase screen. Flows require Adapty SDK 4.0 or later.
- A paywall is a set of products with no design attached. Choose a paywall when you render the purchase screen in your own app code and only need Adapty to deliver the products, optionally with a remote config.
A placement serves one content type, so decide before step 7.
6a. Create a flow
The CLI creates the flow record. Its screens live in a builder config, a JSON document the CLI doesn’t generate. To author the config from the terminal, use the flow-generator skill, which drives the CLI for you.
Create the flow:
adapty flows create --app <app-id> --name "Onboarding"
The command returns a <flow-id>.
Build its screens with the flow-generator skill or in the Flow & Paywall Builder. Either way, the result is a saved draft that your users don’t see yet.
Publish the flow:
adapty flows publish --app <app-id> <flow-id>
The command asks for confirmation. Publication runs in the background, so check the status with adapty flows get --app <app-id> <flow-id> until it reads published. On publication_failed, flows config get reports why. A placement accepts only a published flow.
6b. Create a paywall
A paywall is the container that holds your products.
Once a paywall is linked to a placement, its products cannot be changed. To use different products, create a new paywall and update the placement to point to it.
The command returns a <paywall-id>.
7. Create a placement
A placement is the point in your app where you show a flow or paywall. The only thing you hardcode in your app code is the placement ID. Everything else — which flow or paywall to show and to which users — is managed in the dashboard without releasing a new app version.
--developer-id is the string you’ll reference later in your app code when you ask Adapty what to display at this point. Pick something that describes the location, like "main", "onboarding", or "settings".
The --audiences flag controls which flow or paywall is shown to which users. The examples above set a single default audience: every user at this placement sees the same content. A placement serves one content type, so every audience entry must carry the same content_type. For targeting by segment, see Audiences shape in the command reference.
What’s next
All entities are now visible in the Adapty dashboard. Next:
- Change a flow later — describe the change to the flow-generator skill, or open the flow in the Flow & Paywall Builder.
- Render a paywall in your app — fetch the paywall and its products with the SDK and build the screen in your own code.
- Integrate the Adapty SDK — add the SDK to your app to fetch and display the placement.
- Route different user segments to different flows or paywalls — see
placements updateandsegments listin the command reference.