Quickstart guide for the Adapty Developer CLI
Using an AI assistant? An Adapty CLI skill is available to help LLMs work with the 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, paywall, and placement are all visible in the Adapty dashboard.
1. Install the CLI
Requires Node.js 18 or later.
To install the CLI, run the command:
npm install -g adapty-cli
Or, directly:
npx adapty-cli 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 (--ios-product-id, --android-product-id) cannot be changed after creation. To use different store product IDs, create a new product.
The command returns a <product-id>.
6. Create a paywall
A paywall is the container that holds your products. In Adapty, paywalls are the only way to deliver products to users. Every product must be in a paywall before it can appear in your app.
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 paywall. The only thing you hardcode in your app code is the placement ID. Everything else — which 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 which paywall to display at this point. Pick something that describes the location, like "main", "onboarding", or "settings".
adapty placements create --app <app-id> --title "Main" --developer-id "main" --paywall-id <paywall-id>
What’s next
All entities are now visible in the Adapty dashboard. Next:
- Design your paywall — use the no-code Paywall Builder to add visuals, layout, and copy to the paywall you just created.
- Integrate the Adapty SDK — add the SDK to your app to fetch and display the placement.