Migrations commands

Move a RevenueCat project into Adapty: its catalog, then optionally its store events and transaction history. Adapty runs each migration as a sequence of steps and tells you which actions you can run next, so read status before each action. For the whole procedure, see Migration from RevenueCat.

All commands except list, create, use, current, and unuse accept the migration flag:

FlagRequiredDescription
-m, --migrationNoMigration ID. Without it, the CLI uses the ADAPTY_MIGRATION environment variable, then the migration saved by create or use.

adapty migrations list

List your migrations and the migration flows you can start, grouped by app.

adapty migrations list

adapty migrations create

Start a migration and save it as the current one.

adapty migrations create --name <app-name>
adapty migrations create --flow <flow> --app <app-id>
FlagRequiredDescription
--nameOne of --name or --flowName of the new Adapty app. Starts the catalog migration. Can’t be combined with --flow or --app.
--flowOne of --name or --flowFlow to start in an existing app, as adapty migrations list shows it. Requires --app.
--appWith --flowApp ID (UUID)
--no-selectNoCreate the migration without saving it as the current one

The flows available for an existing app after its catalog migration:

FlowDescription
transactionsImport the transaction history from a daily RevenueCat Cloud Export
transactions_supportImport the transaction history through RevenueCat support and Adapty support, for RevenueCat plans without Cloud Export
apple_eventsForward App Store notifications to Adapty while RevenueCat keeps receiving them
google_eventsSubscribe Adapty to the Pub/Sub topic RevenueCat uses for Google Play notifications
codeHave your coding agent replace the RevenueCat SDK in one codebase of the app
integrationsHave your coding agent find the analytics, attribution, and messaging tools in the app code to set up in Adapty
paywall_designHave your coding agent rebuild the RevenueCat paywall designs in the flows the catalog migration created

adapty migrations use

Save a migration as the current one, so the other commands don’t need -m.

adapty migrations use <migration-id>
ArgumentDescription
migration-idMigration ID from adapty migrations list

The CLI checks that you can access the migration before it saves the ID. The saved migration belongs to the current token and applies in every terminal.

adapty migrations current

Show the current migration and where it comes from: the ADAPTY_MIGRATION environment variable or the saved selection.

adapty migrations current

adapty migrations unuse

Clear the saved migration. An ADAPTY_MIGRATION value set in your shell stays in effect until you unset it.

adapty migrations unuse

adapty migrations status

Show the state of a migration, its issues, and the actions you can run next.

adapty migrations status
FlagRequiredDescription
--waitNoPoll until the migration changes, then return the latest state
--timeoutNoPolling time for --wait: 1–600 seconds, 120 by default. Accepts 300, 300s, or 5m. Requires --wait.

With --json, next_actions and available_actions list each action’s ID, the resources it reads, its input_schema, and its confirm text.

Exit code 0 means the request succeeded, not that the migration did. Check migration.state in the response.

adapty migrations steps

Show the migration checklist and the status of each step.

adapty migrations steps

adapty migrations show

List the resources you can read now, or read one.

adapty migrations show [resource]
ArgumentDescription
resourceResource name, for example apps, mapping, report, or export-config. Omit it to list the resources available at the current step.

adapty migrations run

Run an action from adapty migrations status.

adapty migrations run <action-id>
ArgumentDescription
action-idAction ID from next_actions or available_actions in adapty migrations status
FlagRequiredDescription
--inputNoAction input as a JSON object that matches the action’s input_schema. Without input, the CLI sends {}.
--input-fileNoPath to a file with the action input, or - to read it from stdin. Can’t be combined with --input.
-y, --yesFor actions with a confirm textConfirm the action after you read its confirm text. There is no interactive prompt.
--openNoOpen the action’s link even with a pipe or --json
--no-browserNoPrint the action’s link without opening a browser

Actions come in three kinds:

  • Input actions send your data to Adapty, for example the RevenueCat apps to migrate or your mapping decisions.
  • External actions open a page in the Adapty Dashboard, for example to paste the RevenueCat secret API key. Complete the page, then check status.
  • Agent actions, for example migrate_code, are work for your coding agent. Run them from the app’s git repository: the CLI saves the migration’s data under .git/adapty/<migration-id>/ and prints the instructions for the agent. The agent reports the result by running the action again with --input.

adapty migrations close

Finish or cancel a migration. You can’t reopen it afterwards.

adapty migrations close --outcome finish --yes
FlagRequiredDescription
--outcomeYesfinish marks the migration as completed; cancel abandons it
-y, --yesYesConfirm the closure

What’s next