@superwall/cli
v2.7.2
Published
The official CLI for managing Superwall from your terminal or coding agent.
Readme
Install
npm install --global superwall
superwall loginThis package is the engine behind the superwall command — every command
lives here — and the superwall
package installs it for you, along with the framework and both the
superwall and the short sw binaries. Install superwall, not this
package; everything below is what you get.
superwall login opens your browser once and every command shares that
session. Where it can't open one (a server, or over SSH), it says so: open the
URL it prints on any device and approve the code there. In CI, log in without
a browser: superwall login --api-key <key>.
A coding agent can log you in too. Without a terminal, superwall login prints
the link and code and returns at once; the agent shows you the link, and once
you've approved it, superwall login --poll finishes the login (it waits up to
--timeout seconds, 60 by default, and says pending until then). A new
account without an organization needs --org-name "<name>" on either command;
add --app-name "<name>" --platform ios|android|web (and --bundle-id) to
create its first app too. BROWSER=none stops the CLI from opening a browser
itself.
There are no organizations to pick: superwall apps list shows every app you
can open, grouped by organization, and commands take --app <id|dashboard link>.
apps create adds a new project: when you belong to several organizations, pass
--org <id> to say which, or --project <id> to add the app to one you have.
Upgrade any time with superwall upgrade. When a newer release is out, the CLI
says so on stderr after each command (and when superwall dev starts), with
the exact command to run: superwall upgrade, or the project's own bump such as
cd superwall && pnpm add superwall@latest when the project pins superwall.
A patch or minor gets one line; a major gets a warning that it may contain
breaking changes and a link to its release notes. A beta compares against the
newest beta (superwall@next). The check reads a once-a-day cache, so it never
slows a command, and stdout stays clean under --json. The studio
superwall dev opens shows the same update as a banner you can dismiss for
that version. Its Copy prompt button copies instructions for your coding agent:
read the release notes (for a major, list what will break first), run the
update command, then rebuild your paywalls.
Set up your app
superwall integrate # set up Superwall in your app from scratch
superwall migrate # switch from RevenueCat, Adapty, or Qonversion
superwall review # audit an existing setup; add --fix to repair issues
superwall doctor # quick health check
superwall feedback # tell us what's working and what isn'tintegrate works out what kind of app it's looking at, connects it to your
Superwall account, and runs your own coding agent (Claude Code or Codex,
headless) to install and configure the SDK. Then it walks you through the
rest: products, campaigns, placements, paywalls, and verifying it all on a
real device.
With neither Claude Code nor Codex installed, it can run the bundled Superwall
Agent instead, which needs one more package:
npm install @anthropic-ai/[email protected].
Prefer to drive the agent yourself? Add --skill to integrate, migrate,
or review and the CLI prints the full playbook for your project's framework
instead of running it — paste it into any agent.
Build paywalls & funnels
superwall create # start a paywalls project — minimal, or any public example
superwall create --from {ID} # rebuild a dashboard paywall as code: its config.ts, a migration brief, Compare › Original in the studio
superwall migrate {ID} # …then rebuild its pages with your coding agent, or copy the prompt (--skill prints it)
superwall migrate --screen App/UpdateRequiredView.swift # rebuild a native screen (Swift, Kotlin, RN, Flutter) as a Superwall surface (no path: pick from candidates)
superwall dev # open the studio and preview everything live
superwall push # build and push immutable versions (production untouched)
superwall promote # point production at a pushed version
superwall publish # push and promote in one step
superwall pull # bring teammates' paywalls from the app's source repo into this projectEvery paywall and web funnel is a mini React app: file-based routes, your
components, your design system, plain React state. The superwall package is
the framework too — definePaywall, the hooks, the typed router, web
checkout — and Superwall takes it from there: products and purchases,
localization, trials, experimentation, and delivery through the native SDKs
(iOS, Android, Flutter, React Native) and the web.
create sets up a superwall/ directory in your app — always that name,
always self-contained. It asks for a starting point (--example with-rive
to begin from any example in the
public repo),
then looks at the app around it: if the Superwall SDK is already configured,
it finds your app by its API key and binds pushes to it; otherwise it can log
you in, pick an app, or create one on the spot. --yes accepts the defaults;
--no-install and --no-connect skip those steps, and --app <id> connects a
specific Superwall app (the dashboard's Copy Prompt passes it) instead of
detecting or asking.
In a folder that is not inside a git repository yet, create also runs
git init and commits everything in that folder — your app included — as
"New superwall project". --no-git skips that step, so nothing is initialized,
staged or committed; a folder already under git is never touched either way.
A project is a directory
superwall/
├── package.json the project's own deps, and the project marker
├── superwall.lock app + paywall bindings, per platform (commit it)
├── components/ shared design system
├── messages/en.ts shared strings, inherited by every surface
├── assets/ shared images, video, and fonts
├── paywalls/
│ └── plus-upgrade/ each paywall is a mini React app
│ ├── config.ts required — name, products, platforms, settings
│ ├── app/ routes only — every .tsx here is a route
│ │ ├── layout.tsx optional — wraps every route
│ │ ├── index.tsx where the flow starts
│ │ ├── plans.tsx one file per route
│ │ └── goals/ directories prefix route names
│ │ └── setup.tsx "goals/setup"
│ ├── components/
│ └── messages/en.ts
└── funnels/
└── onboarding/ same shape — onboarding, web2app, win-backIdentity is the path: paywalls/plus-upgrade is the paywall's ID. No name
fields, no registration, no build config — the tooling owns bundling.
components/, messages/, and assets/ work at both levels: shared at the
superwall/ root (@/… aliases it), local inside a surface.
config.ts
import { definePaywall } from "superwall/config";
export default definePaywall({
name: "Plus — Annual, 3-day trial",
platforms: ["ios", "android"],
products: {
monthly: "pro_999_month",
annual: { ios: "pro_5999_year", android: "pro_5999_year_play" },
},
presentation: { style: "drawer", height: 70 },
featureGating: "gated",
});config.ts is the whole truth for its paywall — there are no project-wide
defaults. platforms is a typed array of ios | android | web; the project
binds one Superwall app per platform, and a project on several platforms
never guesses which one a paywall means. products are slots by reference:
one store identifier, or one per platform when the store product differs —
purchase("annual") stays one call, and each platform's build carries only
its own ids. Product data (price, period, trial…) arrives from the SDK at
runtime and is never invented locally. Presentation style, feature gating,
caching, scrolling, game controller, introductory-offer eligibility,
background, and web checkout are all settings here too: pushed with the
version, stamped on promote, and an omitted key resets to its default. Share
settings by exporting a plain object and spreading it.
Hooks
import { useProducts, usePurchase, useTranslation } from "superwall/hooks";
export default function PlusUpgrade() {
const { getProduct } = useProducts();
const { purchase, isPurchasing } = usePurchase();
const { t } = useTranslation();
// your components, your design system — superwall is headless
}One concern each: useProducts, usePurchase (resolves completed |
abandoned | failed, never throws for flow outcomes), useActions,
useHaptics, useColorScheme, useTranslation, useIntroductoryOffer,
useDevice / useUser / useVariables, useLocalResource,
useSuperwallEvent, useGameController.
Navigation
import { useRouter } from "superwall/navigation";
const router = useRouter();
router.push("goals/setup");
router.push("plans", { transition: "fade" });
router.back();expo-router's API, method for method. Route names are generated into
superwall.d.ts on every dev and push, so a typo is a compile error.
Routes are names, not paths — the whole flow ships as one HTML file — and
useQueryState (nuqs's API) keeps web funnel state in the URL so hosted
checkout and in-app browsers hand a flow back where it left off.
Dev — the studio
superwall dev discovers every surface and opens the studio: every paywall
and funnel as a live card, and an editor with a device-frame preview (nine
devices, iPhone SE to Desktop), light/dark, locale switching, and live
controls for the user, device, params, and product variables the SDK
reports. The studio hosts each preview the way the native SDK hosts a
webview: it answers the paywall's ping over the SDK protocol with products,
device, user and eligibility, and asks you for every purchase, restore,
permission and callback outcome. Product data is read from Superwall, never
invented, and the same build runs unchanged inside a real SDK webview.
Build
superwall build writes the same single-file HTML document a push would
version — superwall/.superwall/build/<kind>/<id>/[<platform>/]index.html —
and stops there, no login needed. --id, --platform, --out, --json.
Push, promote, publish
Git semantics on purpose: push saves, promote ships. Every push builds
each paywall once per platform, uploads assets by content hash, and mints an
immutable version; nothing users see changes until promote repoints
production. promote --version <n> makes a rollback one command, -m "why"
records a note in the source commit that rides along with every version, and
--platform <p> narrows push, promote, and publish to one platform.
Renames are resolved, never guessed — interactively, or with
push --rename old=new in CI.
A push also saves the source of each paywall it pushes to the app's repo.
Only that paywall's directory and the files outside every paywall and funnel
(your package.json, shared components) come from you; every other paywall
and funnel stays as the repo has it, and superwall.lock keeps their entries.
Your changes land on top of whatever teammates have published since your last
push (the commit it last synced to is in superwall.lock), so two people
working on different paywalls never undo each other, even from a checkout
that never synced. If a teammate changed a file you are pushing, the push
stops and names only those files: run superwall pull and publish again, or
--overwrite-source to replace that paywall's source with yours. The
overwrite never touches other paywalls.
superwall pull merges the app's source repo into your project: teammates'
paywalls, their superwall.lock bindings and the sync point. Your own edits
stay. If you both changed a file it names the files and changes nothing;
pull --theirs takes the repo's copy of them. A version whose source never
landed stays pending, so promote still won't ship it. With no project,
superwall pull --app <id> [dir] creates superwall/ from the app's source,
so you can work on an app's paywalls without its codebase or GitHub.
pull needs superwall 2.3.0 or later. Inside a project, the superwall your
project depends on is the one that runs, whichever copy you start (global,
npx superwall@…). When that copy is older, the CLI says so on stderr with the
command that updates it, such as cd superwall && npm i superwall@latest;
superwall upgrade and superwall doctor name it too.
A change to the shared design system (DESIGN.md, design/, components/)
reaches every paywall that imports it. publish --existing --source ships it:
--existing rebuilds only the paywalls already on Superwall and never creates
one, and --source pushes the project source to every app, also those whose
paywalls built the same. Push and build warn when a paywall hard-codes a value
that design/tokens.css already holds, naming the token to use instead.
The full reference — assets, localization, trials, transitions, web checkout, troubleshooting — lives at superwall.com/docs/framework.
Manage your account
Everything in the dashboard, from the terminal. Commands follow the API,
Stripe-style: superwall <resource> <operation> [ids] [--field value].
superwall apps get <app> # everything about one app: bundle ID, Apple team, keys
superwall apps <app> # the same: an id where the operation goes means get
superwall apps update <app> --team-id <team-id>
superwall apps create --name "My App" --platform ios --org <org-id> # a new project in that organization
superwall entitlements create --identifier pro --app <app>
superwall products create --identifier pro_monthly --price 9.99 --period month --entitlement pro
superwall products storekit # generate a local .storekit file
superwall campaigns create --description "Onboarding upsell" --placement onboarding_complete
superwall campaigns placements create <campaign-id> --event-name onboarding_complete
superwall campaigns audiences readout <campaign-id> <audience-id>
superwall users subscriptions <app-user-id> --app <app>
superwall webhooks list --app <app>
superwall annotations create --app <app> --label "v4.2.0 released" --start-at 2026-10-28T14:00:00Z
superwall bootstrap # the whole account tree at a glanceResources: apps, products, entitlements (+ grants),
campaigns (+ placements, audiences, variants), paywalls, users,
webhooks, events, annotations. Each has list, get, create, update, delete where
the API does, plus its own actions (archive, publish, duplicate, ...).
- Every command, and every subcommand of
asc,asa,setupandapi, has its own--helppage with only the flags it takes. A group on its own (superwall asc) shows that page. superwall <resource> --helplists its operations;superwall <resource> <operation> --helplists that operation's flags, read from the live API reference, so new API fields work without a CLI update.- A flag is a request field:
--event-name xsendsevent_name. Anything else goes in with-d key=value(key:=jsonfor numbers and objects). A flag the endpoint doesn't take is refused before anything is sent. --app <id|name|link>fills in the project, app and organization ids, so nobody types/v2/projects/{id}/applications/{application_id}.--dry-runprints the request instead of sending it. Deleting, archiving and other changes that can't be undone ask first, and need--yesoutside a terminal.- Creating takes flags too (
--identifier,--name,--description,--placement), never positionals. One way to change a thing: an app's bundle ID and revenue provider areapps updatefields like any other. listis the default, sosuperwall productsmeanssuperwall products list.--jsonreturns the API's response unformatted.
An app's bundle ID (package name on Android) decides which builds the SDK
treats as that app; any other build runs in test mode. apps get shows the one
saved and the IDs the app's SDK reported in the last 30 days, each marked live
or test mode. Change it like any other field:
superwall apps get <app> # saved, and what the SDK reported
superwall apps update <app> --bundle-id com.acme.app # save itWhen builds the SDK reported would run in test mode under the new ID, it says
how many and asks first (--yes outside a terminal).
setup apple and asc keys create purchase_key
keep the In-App Purchase key and the app on one bundle ID. An app with none
gets the Apple app's (or the one --bundle-id names) saved with the key, both
or neither, and they say so and how many reported builds would run in test
mode. An app with a different bundle ID stops before anything is created or
saved, and points at apps update <app> --bundle-id <id>.
Lists stay usable on big accounts: --search <text> matches ids, names and
identifiers, --limit <n> caps the rows, and a terminal shows the first 50 with
a count of the rest (--json returns everything unless --limit caps it).
bootstrap --app <id> loads one project instead of the whole account.
Query your data
Run SQL directly against your organization's ClickHouse analytics data:
superwall query "SHOW TABLES FROM sw"
superwall query "SELECT count() FROM sw.<table>"
superwall query --file mrr.sql
cat query.sql | superwall queryUse it for anything you'd build on raw data: ad hoc analysis, custom
dashboards, scheduled reports, agent workflows. --json returns ClickHouse's
native JSON envelope. Your session needs data:read access.
Many apps receive revenue from both the store and RevenueCat, so the same
purchase can arrive twice, and each app's revenue provider decides which one
its figures count. --app <app> passes that to the query as ClickHouse
parameters, so SQL counts revenue the way the dashboard does:
-- superwall query --file revenue.sql --app <app>
SELECT sum(price)
FROM open_revenue.attributed_events_by_ts_rep FINAL
WHERE applicationId = {app:UInt64}
AND (integration IN {revenue_integrations:Array(String)} OR source = 'sdk')
AND NOT (coalesce(integration, '') = 'revenue_cat' AND store = 'STRIPE'){revenue_provider:String} holds the provider itself, and --param name=value
adds any other parameter.
Call the API
superwall api docs searches the live API reference, so you can find any
endpoint and its exact body before calling it (no login needed):
superwall api docs variant # search by keyword
superwall api docs /v2/campaigns/123/audiences/9/variants post # one endpoint in fullAny Superwall API endpoint, authenticated with your session. A request that fails names the reference entry to read:
superwall get /v2/products
superwall post /v2/products -d name="Pro Monthly" -d price:=9.99
superwall put /v2/campaigns/123/audiences/456/weights -d 'weights:=[{"variant_id":"789","percentage":100}]'
superwall delete /v2/products/prod_123-d key=value sends a string, key:=value sends typed JSON (numbers,
booleans, objects), and key[sub]=value nests. On get and delete, -d
params become query parameters.
App Store Connect
The entire App Store Connect API, proxied and signed by Superwall — no
.p8 file or JWT to manage locally. Connect an app in one command:
superwall setup appleIt signs you in to Apple, creates the App Store Connect API key and the In-App Purchase key the app doesn't have yet, saves them on the app, and points the app's App Store Server Notifications at Superwall. Your Apple password goes from your computer straight to Apple; Superwall never receives it and it is not saved. The Apple Account must be an Admin or the Account Holder. It never creates a second key of a kind the app already has, never replaces a server notification URL that another server holds (it reports it and exits non-zero), and never changes the app's revenue provider.
In a terminal it asks for your Apple Account email, your password (masked) and
the verification code Apple sends. Type sms at the code prompt, or pass
--sms, to get the code by text. Pass --team <id|name> when the account is
on several teams, --bundle-id <id> to create the Superwall app from an App
Store Connect app, and --dry-run to sign in and check key access without
changing anything.
A coding agent can run it for you if you want it to. You decide that by putting
the password where the agent's shell can read it, as SUPERWALL_APPLE_PASSWORD;
never paste it into a chat. Without a prompt the command runs in two steps,
because Apple sends the code after the sign-in starts:
superwall setup apple --apple-id [email protected] --app <id> --no-interactive # Apple sends you a code
superwall setup apple --code 123456 --app <id> --no-interactive # same flags, within 10 minutesThe first run exits non-zero saying a code is required; give the agent the code
and it runs the second. Only Apple's pre-verification cookies are kept between
the two runs, in ~/.superwall/apple-sign-in.json, for 10 minutes.
--apple-password exists too, but it lands in shell history and the process
list.
Each step is also its own command, so you or an agent can do one thing at a time:
superwall asc keys list --app <id> # which of the two keys the app has
superwall asc keys import --app <id> # reuse a key your organization already has
superwall asc keys promote --app <id> # copy the app's saved key to your organization
superwall asc keys create api_key --app <id> # sign in to Apple and create just this key
superwall asc keys create purchase_key --app <id>
superwall asc notification-url check --app <id> # what Apple has, and whose it is
superwall asc notification-url set --app <id> # set it where Apple has noneasc keys import saves a key only when Apple confirms it for the app's bundle
ID. asc keys create does nothing when the app already has that key; pass
--replace to create another. A key Apple created but Superwall couldn't save
is written to ./AuthKey_<id>.p8 (or SubscriptionKey_<id>.p8), and the
warning prints the asc keys create <kind> --app <id> --key-file <path>
command that saves it. asc keys sources lists the keys on your other
apps, asc keys import <kind> --from <app> reuses one of them, and
asc keys delete <kind> --app <id> removes one from an app. superwall asc --help says what
each command changes, what it never does, and its exit codes.
asc notification-url check says for production and sandbox whose URL Apple
has: this app's, another Superwall app's (named when you can read that app),
someone else's, or none. asc notification-url set never replaces a URL
another server holds. If RevenueCat or your own server receives Apple's
notifications today, keep it there and have it forward them to the URL
apps get shows. Both work with a superwall login session or
an API key.
Receiving Apple's notifications and choosing which revenue source your
dashboard counts are separate decisions. The second one is the revenue
provider, and superwall query --app <app> hands it to your SQL (see Query
your data):
superwall apps get <app> # what is counted, and how many events each source sent
superwall apps update <app> --revenue-provider open_revenue # count the store's own events
superwall apps update <app> --revenue-provider revenue_cat # count RevenueCat's eventsA change asks first in a terminal and needs --yes outside one.
Already have a key file? Save it on an app, or on your organization for the signed proxy:
superwall asc keys create api_key --app <id> --key-id <id> --issuer <id> --key-file AuthKey.p8
superwall asc keys create --key-id <id> --issuer <id> --key-file AuthKey.p8
superwall asc keys create --team <team id> --key-id <id> --issuer <id> --key-file AuthKey.p8With --team the key is saved as the organization's key for that Apple team,
once Apple confirms the key belongs to it; a key from another team, or one
Apple can't place on a team, is refused before anything is saved.
The organization keeps one key per team: when it already has one, the command
stops and names the asc keys update --team command that replaces it.
Saving an API key on an app also gives the organization a key for that Apple
team when it has none. An app whose key was saved before that, which the
asc_* commands answer with "isn't connected", gets it with
superwall asc keys promote --app <id>: it copies the app's saved API key to
the organization for its Apple team, and changes nothing when the team already
has one. asc keys update --team <team id> replaces the
organization's key for a team, and is refused unless Apple confirms the new key
belongs to the same team.
Then it's the raw ASC API with the sharp edges filed off, because the CLI is schema-aware: it keeps a copy of Apple's own OpenAPI spec (fetched on first use, refreshed in the background) and knows every endpoint, field, and enum.
Look up the exact schema for anything — no guessing, no hunting through Apple's docs:
superwall asc docs # browse every resource
superwall asc docs "introductory offer" # search by keyword
superwall asc docs /v1/subscriptions post # required fields, enums, relationshipsWrite with flat params. The CLI assembles the JSON:API body for you and
validates it locally, so a mistake comes back as a precise fix instead of one of
Apple's opaque 409s:
superwall asc post /v1/subscriptions \
-d name="Premium Monthly" -d productId=com.acme.pro \
-d subscriptionPeriod=MONTHLY -d group=<groupId>✗ Invalid POST /v1/subscriptions body:
• subscriptionPeriod "MONTHLY" not allowed — use ONE_WEEK|ONE_MONTH|…|ONE_YEARFix the value and it goes through. Anything the commands below don't cover is
asc get|post|patch|delete /v1/….
Subscriptions and in-app purchases
What an app sells has its own commands, each with list, get, create,
update and delete. They take the App Store app as an id or a bundle ID, and
flags named after Apple's own fields:
superwall asc apps # your apps at Apple
superwall asc products com.acme.app # everything the app sells
superwall asc subscription-groups create --asc-app com.acme.app \
--reference-name Pro --display-name "Acme Pro"
superwall asc subscriptions list com.acme.app
superwall asc subscriptions get <id> # localizations, prices, offers, availability, what's missing
superwall asc iaps create --asc-app com.acme.app --product-id coins.100 --name "100 Coins" \
--in-app-purchase-type consumable --price 0.99 --display-name "100 Coins"asc subscriptions create does everything Apple asks for before review, in
order: the subscription, its localization, where it's sold, its price in one
territory equalized to every other, and a free trial if you want one. It ends by
reading the subscription back and saying what's still missing. It checks
--price against a subscription the app already has before it creates anything,
so a price Apple has no point for is refused with the closest ones. If a step
still fails after the subscription exists, the error names it and prints the
commands that finish it, with the same --app and --team: Apple keeps a
product ID once used, so running create again would fail. When the price was the
problem, those commands list the price points to pick a new one from.
superwall asc subscriptions create --group Pro --asc-app com.acme.app \
--product-id com.acme.pro.monthly --name "Pro Monthly" --subscription-period ONE_MONTH \
--price 9.99 --display-name "Pro" --description "Everything, monthly" --trial ONE_WEEKThe details have commands of their own:
superwall asc localizations add --subscription <id> --locale de-DE --name "Pro"
superwall asc prices points --subscription <id> --territory USA --price 9.99
superwall asc prices set --subscription <id> --price 12.99 --preserve-current-price
superwall asc offers create --subscription <id> --offer-mode FREE_TRIAL --duration TWO_WEEKS
superwall asc availability set --iap <id> --available-territories USA,CAN
superwall asc screenshots upload --subscription <id> paywall.png
superwall asc submit --asc-app com.acme.app --group <id> --subscription <id>Every change takes --dry-run: it prints each request it would send, bodies
included, and changes nothing. Deletes ask first (--yes in scripts).
Releases
The steps of an App Store release have commands too. A version is its id, or
its version string with --asc-app (and --platform off iOS):
superwall asc versions create --asc-app com.acme.app --version-string 1.3.0 --release-type MANUAL
superwall asc builds list com.acme.app --version-string 1.3.0 --processing-state VALID
superwall asc builds attach <build> 1.3.0 --asc-app com.acme.app
superwall asc metadata update 1.3.0 --asc-app com.acme.app --locale en-US --whats-new "Faster sync"
superwall asc release submit 1.3.0 --asc-app com.acme.app --subscription <id>
superwall asc release status 1.3.0 --asc-app com.acme.app # state, build, review submission, phased release
superwall asc release release 1.3.0 --asc-app com.acme.app # once it's pending developer release
superwall asc release phased pause 1.3.0 --asc-app com.acme.appasc release submit puts the version in the app's review submission, with any
--subscription, --iap or --group alongside: Apple reviews an app's first
in-app purchases only together with a version. asc versions delete works only
while a version is still editable; it, asc builds expire and asc release
release ask first.
asc get, asc post, asc patch, asc delete and asc docs warn when an
endpoint is one Apple has replaced (the v1 subscription and in-app purchase
localizations, the v1 product submissions, subscriptionAvailabilities, the old
in-app purchase and version-submission endpoints, screenshot and preview sets),
and name the replacement.
Apple Search Ads
The entire Apple Ads Platform API (v1), proxied by Superwall — no client
secret, OAuth token, or account id to manage locally. It uses the credentials
you connect in the dashboard (app → Integrations → Apple Search Ads →
Advanced); the CLI finds the connected app on its own, or takes --app <id>.
Without --ad-account-id, requests go to the only ad account the key reaches; when it reaches several, pass --ad-account-id.
superwall asa campaigns list
superwall asa campaigns list --field status --op EQUALS --values ENABLED --all
superwall asa keywords list --adgroup 456 --order-by text:asc --limit 50
superwall asa keywords create --campaign 123 --adgroup 456 \
--text "grammar checker" --match-type EXACT --bid 1.25
superwall asa reports campaigns --start 2025-01-01 --end 2025-01-31 --group-by countryOrRegionEvery resource follows the same shape — asa <resource> <action> [id] — and
lists are Apple queries: --campaign / --adgroup / --adam-id narrow them,
--field --op --values and --order-by add a filter and a sort, and --query
takes Apple's whole query request. The catalog is the documentation:
superwall asa docs # every endpoint, grouped
superwall asa docs keywords # one resource: usage, flags, Apple links
superwall asa docs campaigns create # Apple's own page: fields, enums, examplesWrites take typed flags (money flags pick up the ad account's currency),
-d key=value for any other field, or --body for the whole payload; several
keyword ids or an array body go to Apple's bulk endpoints. Anything not covered
is asa get|post|put|delete /path, sent straight to Apple with your access
token and ad account context attached. A path without a version gets /v1;
one that starts with /v1 or /api/ is sent as written. Asset upload
(POST /v1/assets/upload) takes form data and isn't supported.
For agents and scripts
Pass --json to any command: stable output shape, structured errors, never
prompts. --no-interactive keeps the human-readable output but drops the
prompts.
Logging in also installs the Superwall agent skills
into your coding agent and keeps them updated. superwall skills reinstalls
them (or a subset) manually; superwall skills -y installs everything without
asking. The framework itself is built to be written by agents: a plain npm
project, file-based routes, ordinary React state — conventions an agent
already knows, so it gets a paywall right on the first try.
When an agent confirms a Superwall bug, a wrong doc or a capability you needed
that Superwall lacks, it reports it with superwall feedback on its own and
tells you in one line. Reports reach the Superwall team with your account, and
the same request from many teams is merged into one:
superwall feedback "no way to end a campaign on a schedule" --kind idea \
--use-case "runs a Black Friday offer that must stop at midnight" --app <app> --jsonUpgrading to 2.0
2.0 renamed several commands; the old names are unknown commands now. The CLI guide maps each one to its replacement.
Channels
Set SUPERWALL_CHANNEL=next to opt into experimental and beta features:
commands that are not in the stable set yet, and the matching agent skills
from the next branch of the skills repo. Everything else is unchanged.
Export it in your shell rc so every terminal and agent sees it. Unset it to
go back to the stable set. The framework (create, dev, build, push,
promote, publish, pull, migrate <paywall-id>, migrate --screen) is in public
beta on the stable set and needs no channel.
Telemetry
The CLI sends fully anonymous usage events for every command (which command
and subcommand ran, whether it succeeded, how long it took, and flags like
--json or --dry-run — never emails, IDs, file paths, SQL, prompts, API
paths, or error messages). Events carry a random per-machine id that is never
linked to your account. Opt out with SUPERWALL_TELEMETRY_DISABLED=1 or
DO_NOT_TRACK=1.
Package layout
packages/cli/
├── bin.ts the entry the `superwall` launcher runs
├── src/
│ ├── entry.ts main(): run the program, flush telemetry
│ ├── program/ the command system: defineCommand, parser, help, lifecycle
│ ├── commands/ registry.ts + one directory per section of `superwall --help`
│ │ ├── workflows/ integrate, review, migrate
│ │ ├── paywalls/ create, dev, build, push, promote, publish, pull
│ │ ├── main/ bootstrap, apps, products, entitlements, campaigns, paywalls, users, webhooks, events, annotations
│ │ ├── analytics/ query
│ │ ├── api/ docs, get, post, put, patch, delete
│ │ ├── app-store-connect/ setup/, keys/, notification-url/, store/ (apps, products, …), api/ (get, post, …, docs)
│ │ ├── apple-search-ads/ asa (the catalog), keys, api/ (get, post, put, delete, docs)
│ │ ├── account/ login, logout, whoami
│ │ └── support/ doctor, feedback, skills, upgrade
│ ├── core/ the logic behind every command, by domain
│ └── ui/ the renderer: human output, --json envelopes, prompts, help layout
├── dist/skills/ the playbooks integrate/migrate/review run, bundled from superwall/skills at build
└── tests/ mirrors src/The paywall commands load the framework's tooling contract
(superwall/build, superwall/preview, superwall/discover) dynamically
from the project's own install, so they always run against the framework
version in the project's lockfile.
Develop
This package lives in the superwall/superwall
monorepo. Read AGENTS.md
first - command naming, UI rules, skill authoring, and the sync checklist
are decided conventions, not suggestions.
bun install
bun dev # run from source (bun bin.ts)
bun run build # build dist/ with tsdown
bun run typecheck
bun run testThe global superwall/sw binaries are declared by the framework package:
cd ../superwall && bun link links them. They run this package's built
dist/, so rebuild after every change.
License
MIT. The framework it launches is licensed under the Functional Source License (FSL-1.1-ALv2).
