diff --git a/AGENTS.md b/AGENTS.md index 7e579b57..08863fb6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,7 @@ Instructions for AI coding agents working in this repository (Superwall docs site). -For documentation-writing guidelines (tone, content conventions, etc.), see `content/README/AGENTS.md`. +For documentation-writing tone and conventions, match the existing pages under `content/docs/**`; there is no separate writing-guidelines file. ## Project overview - **Stack**: Next.js + Fumadocs (MDX) + TailwindCSS @@ -23,21 +23,18 @@ For documentation-writing guidelines (tone, content conventions, etc.), see `con ## Common commands (run from repo root) ```bash -# Dev (http://localhost:8293) +# Dev (http://localhost:3000; override with `bun run dev:port `) bun run dev -# Build (runs all generators, then MDX + Next build) +# Build (runs generators, then Vite build + static cache + search index) bun run build # Clear caches (when build/dev gets weird) -rm -rf .next -bun run clear:cache +rm -rf node_modules/.vite -# Content generation / assets -bun run generate:llm -bun run generate:md -bun run copy:docs-images -bun run watch:images +# Content generation / assets (images auto-copy via predev/prebuild) +bun run scripts/copy-docs-images.cjs +bun run generate:changelog # Cloudflare builds / preview bun run build:cf @@ -57,7 +54,7 @@ bun run deploy - Create the `.mdx` file under the correct `content/docs/**` folder. - Update the folder’s `meta.json` to include it in navigation. - Run `bun run build` to verify generation + routing. -- **Images**: assets in docs content are copied into `public/` during build (use `bun run copy:docs-images`; in dev use `bun run watch:images`). +- **Images**: assets in docs content are copied into `public/` automatically before dev and build (`predev`/`prebuild` run `scripts/copy-docs-images.cjs`). ## Routing, redirects, and base path - The site is served under **`/docs`** (`basePath` + `assetPrefix` in `next.config.ts`). @@ -128,7 +125,8 @@ This clones/pulls SDK repos into `reference/` (gitignored). Use the source to co ## Troubleshooting - **Build failures**: check MDX syntax; validate `meta.json`; ensure listed pages exist; run `bun run build` for full errors. -- **Dev server issues**: `rm -rf .next`, `bun run clear:cache`, verify port 8293 is free, reinstall dependencies if needed. +- **Dev server issues**: `rm -rf node_modules/.vite`, verify port 3000 is free, reinstall dependencies if needed. +- **Preview shows stale content after a rebuild**: restart `bun run preview` - its Cloudflare cache emulation keeps serving the previous build (`cf-cache-status: HIT`). ## Skill mirrors - Keep `.agents/skills/` and `.claude/skills/` in sync for shared skills. \ No newline at end of file diff --git a/content/docs/dashboard/guides/query-clickhouse.mdx b/content/docs/dashboard/guides/query-clickhouse.mdx index 7ebdec4a..c59523e4 100644 --- a/content/docs/dashboard/guides/query-clickhouse.mdx +++ b/content/docs/dashboard/guides/query-clickhouse.mdx @@ -5,6 +5,8 @@ description: "Use the Superwall API to query your organization's ClickHouse-back The ClickHouse query API gives you direct SQL access to the same analytics data Superwall uses for charts and campaign results. Use it when you need flexible reporting, internal dashboards, or ad hoc analysis without maintaining a separate data warehouse. +Querying from the terminal or a coding agent? The [Superwall CLI](/dashboard/guides/superwall-cli#query-your-analytics-data) wraps this API: `superwall query "SELECT count() FROM sw.events_rep"` runs against your logged-in session, with no key handling needed. + Requests are scoped to your organization and require an organization API key with the `data:read` scope. Superwall provisions a read-only ClickHouse user for your organization on first use, then applies row-level policies so queries only return data for your organization's applications. diff --git a/content/docs/dashboard/guides/superwall-cli.mdx b/content/docs/dashboard/guides/superwall-cli.mdx new file mode 100644 index 00000000..c42278de --- /dev/null +++ b/content/docs/dashboard/guides/superwall-cli.mdx @@ -0,0 +1,216 @@ +--- +title: "Superwall CLI" +description: "Set up the SDK, manage products, campaigns, and paywalls, query your analytics data, and call the API from your terminal or coding agent using the Superwall CLI." +--- + +The [Superwall CLI](https://github.com/superwall/cli) brings your whole Superwall account to the terminal: set up the SDK in your app, manage products, campaigns, and paywalls, run SQL against your analytics data, and call the Superwall and App Store Connect APIs. It's built for humans and coding agents alike, so everything it can do, your agent can do too. + + +The CLI is also what powers the [Superwall Skill](/dashboard/guides/superwall-skill). Installing the skill teaches your coding agent to use these commands on your behalf, so you rarely need to memorize them. This page is the full reference for when you're driving the terminal yourself, or want to know exactly what your agent can do. + + +## Installation + +Install the CLI globally with npm, then log in: + +```bash +npm install --global superwall +superwall login +``` + +You can also run it without installing via `npx superwall`. The package installs two commands that behave identically: `superwall` and the shorter `sw`. + +The CLI tells you when a new version is available. Update any time with: + +```bash +superwall upgrade +``` + +## Authentication + +`superwall login` opens your browser once, and every command shares that session. The session is stored in `~/.superwall`. + +```bash +superwall login # opens the browser +superwall whoami # shows the logged-in account +superwall logout # ends the session +``` + +![Running superwall login in the terminal. The CLI shows a device code, waits for browser approval, then confirms the logged-in account and checks the agent skills.](/images/cli_prompt_for_auth.png) + +Approve the login on the page that opens, and you're done. The terminal picks it up automatically: + +![The auth.superwall.com confirmation page after approving the login, telling you the device is connected and the page can be closed.](/images/cli_confirmation.jpg) + +In CI or other headless environments, log in with an API key instead of a browser: + +```bash +superwall login --api-key +``` + +If your account belongs to more than one organization, pick one with `superwall orgs use`. Otherwise, the CLI asks the first time it matters. + + +Logging in also installs the [Superwall agent skills](/dashboard/guides/superwall-skill) into your coding agents and keeps them updated. See [Install agent skills](#install-agent-skills) below. + + +## Set up your app + +The CLI's workflow commands handle SDK setup end to end: + +```bash +npx 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 +``` + +`integrate` is the fastest way to get started, and it works even before you have a Superwall account: run it in your project directory and it walks you through signing up right from the terminal. It works out what kind of app it's looking at, connects it to your Superwall account, and then runs the coding agent already on your machine (Claude Code or Codex, headless) to install and configure the SDK. From there it walks you through the rest: products, campaigns, placements, paywalls, and verifying everything on a real device. + +`migrate` does the same for apps moving off RevenueCat, Adapty, or Qonversion, and `review` audits an existing integration, with `--fix` applying verified, safe fixes. Here's the end of a `review` run against a real iOS app: findings ranked by severity, proposed fixes written to a plan file, and nothing modified without your say-so: + +![The end of a superwall review report on an iOS app, summarizing verified strengths, genuine findings, and a plan file with proposed fixes. No files were modified.](/images/cli_improvements_report_iOS_example.jpg) + +### Drive the agent yourself + +The CLI normally runs its workflows through a headless Claude Code or Codex on your machine. Add `--skill` to `integrate`, `migrate`, or `review` and instead of running anything, the CLI prints the exact instructions it would have given that agent: the bundled playbook for the task, composed for your project's framework, so an Expo project gets Expo instructions and never sees Swift ones. + +```bash +superwall integrate --skill # prints the playbook, runs nothing +``` + +Reach for this when: + +- **You use a different agent.** The CLI only drives Claude Code and Codex headlessly. Paste the playbook into Cursor, Gemini CLI, or any other agent and it can follow the same guided workflow there. +- **You want to stay in the loop.** A headless run works autonomously and reports back. Running the playbook in your own agent session lets you watch every step, approve each change, and steer as it goes. +- **You want to read it first.** Review exactly what the agent will be told to do before anything touches your codebase. + +## Manage your account + +Everything in the dashboard, from the terminal: + +```bash +superwall apps list +superwall products create pro_monthly --price 9.99 --period month +superwall products storekit # generate a local .storekit file +superwall entitlements create pro +superwall campaigns create "Onboarding upsell" onboarding_complete +superwall paywalls list +superwall bootstrap # the whole account tree at a glance +``` + +| Command | Actions | Notes | +|---------|---------|-------| +| `bootstrap` | | Prints the complete account tree: orgs, projects, apps, campaigns, placements, and products | +| `apps` | `list`, `create`, `use` | Projects and platform apps; `create` takes `--platform` and `--bundle` | +| `products` | `list`, `create`, `storekit` | `create` takes `--price`, `--currency`, `--period`, `--period-count`, `--trial-days`, `--entitlement`; `storekit` writes a local `.storekit` file (`--out`) | +| `entitlements` | `list`, `create` | | +| `campaigns` | `list`, `create`, `placement` | `create` takes a name and a placement name | +| `paywalls` | `list` | | +| `orgs` | `list`, `use` | Only needed if you belong to multiple organizations | + +`list` is the default action, so `superwall products` means `superwall products list`. Add `--json` for machine-readable output, and `--project ` or `--app ` to scope when you have more than one. Run `superwall --help` for every action and flag. + +## Query your analytics data + +Run SQL directly against your organization's ClickHouse analytics data: + +```bash +superwall query "SHOW TABLES FROM sw" +superwall query "SELECT count() FROM sw.events_rep" +superwall query --file mrr.sql # runs a saved .sql file +cat query.sql | superwall query # or pipe SQL on stdin +``` + +Use 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 (leave any `FORMAT` clause out of the SQL; the CLI requests JSON for you). Your session needs data read access. + +See [Query with ClickHouse](/dashboard/guides/query-clickhouse) for the available tables and schema. + +## Call the API + +Make raw, authenticated requests to any Superwall API endpoint: + +```bash +superwall get /v2/products +superwall post /v2/products -d name="Pro Monthly" -d price:=9.99 +superwall delete /v2/products/prod_123 +``` + +Params follow an httpie-style convention: `-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, with no `.p8` file or JWT to manage locally. Connect your credentials once: + +```bash +superwall asc keys set --key-id --issuer --key-file AuthKey.p8 +``` + +From there, you can call any endpoint in the ASC API. 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, without hunting through Apple's docs: + +```bash +superwall asc docs # browse every resource +superwall asc docs "introductory offer" # search by keyword +superwall asc docs /v1/subscriptions post # required fields, enums, relationships +``` + +Write 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 `409` errors: + +```bash +superwall asc post /v1/subscriptions \ + -d name="Premium Monthly" -d productId=com.acme.pro \ + -d subscriptionPeriod=MONTHLY -d group= +``` + +``` +✗ Invalid POST /v1/subscriptions body: + • subscriptionPeriod "MONTHLY" not allowed — use ONE_WEEK|ONE_MONTH|…|ONE_YEAR +``` + +Fix the value and it goes through. Shortcuts cover the common reads (`asc apps`, `asc products `, `asc subscriptions `, `asc iaps `); everything else is `asc get|post|patch|delete /v1/...`. If your organization has more than one ASC team connected, scope with `--team `. + +## Install agent skills + +Logging in installs the [Superwall agent skills](/dashboard/guides/superwall-skill) into your coding agents automatically and keeps them updated. To reinstall them (or a subset) manually: + +```bash +npx superwall skills +``` + +The CLI shows a picker with every skill pre-selected, so pressing **Enter** installs them all, globally, for every coding agent detected on your machine (Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, and more). To skip the picker or force a refresh: + +```bash +superwall skills --skill superwall # install specific skills by name +superwall skills --force # reinstall even if already up to date +``` + +## For agents and scripts + +Pass `--json` to any command: stable output shape, structured errors, and it never prompts. `--no-interactive` keeps the human-readable output but drops the prompts. + +```bash +superwall products list --json +superwall query "SELECT count() FROM sw.events_rep" --json +``` + +## Feedback + +Something broken, confusing, or missing? Send feedback straight to the team: + +```bash +superwall feedback "migrate crashed on Expo" +``` + +## Telemetry + +The CLI sends fully anonymous usage events (which workflow ran and whether it succeeded, never emails, IDs, file paths, SQL, prompts, or error messages). Opt out with `SUPERWALL_TELEMETRY_DISABLED=1` or `DO_NOT_TRACK=1`. + +## Related + +- [Superwall Skill](/dashboard/guides/superwall-skill): Give your coding agent live Superwall docs and this CLI. +- [Superwall MCP](/dashboard/guides/superwall-mcp): Manage your account from MCP-compatible AI tools. +- [Query with ClickHouse](/dashboard/guides/query-clickhouse): The analytics tables behind `superwall query`. +- [Editor MCP](/dashboard/dashboard-creating-paywalls/paywall-editor-mcp): Connect an agent to the paywall open in your editor. +- [Vibe Coding](/sdk/guides/vibe-coding): All the AI tools available for working with Superwall in one place. diff --git a/content/docs/dashboard/guides/superwall-mcp.mdx b/content/docs/dashboard/guides/superwall-mcp.mdx index 9b1cea93..055181b5 100644 --- a/content/docs/dashboard/guides/superwall-mcp.mdx +++ b/content/docs/dashboard/guides/superwall-mcp.mdx @@ -79,6 +79,7 @@ When the agent creates an application, it returns a `public_api_key`. That's wha - [Superwall Agents](/agents): AI workspace for Superwall analysis with connected tooling, automations, webhooks, and hosted machines. - [Superwall Skill](/dashboard/guides/superwall-skill): Recommended if you want docs access, guided SDK integration, and account management in one tool. +- [Superwall CLI](/dashboard/guides/superwall-cli): Manage your account, query analytics, and integrate the SDK from the terminal. - [Editor MCP](/dashboard/dashboard-creating-paywalls/paywall-editor-mcp): Connect an external agent to the paywall currently open in the editor. - [AI Chat Builder](/dashboard/dashboard-creating-paywalls/paywall-editor-ai-chat): Build and refine paywalls with Superwall's built-in editor chat. - [Vibe Coding](/sdk/guides/vibe-coding): Overview of the AI tools available for working with Superwall. diff --git a/content/docs/dashboard/guides/superwall-skill.mdx b/content/docs/dashboard/guides/superwall-skill.mdx index b07932e1..398d3908 100644 --- a/content/docs/dashboard/guides/superwall-skill.mdx +++ b/content/docs/dashboard/guides/superwall-skill.mdx @@ -1,105 +1,78 @@ --- title: "Superwall Skill" -description: "Give AI coding agents up-to-date Superwall docs, API access, and step-by-step SDK integration guides using the Superwall Skill." +description: "Give AI coding agents up-to-date Superwall docs, authenticated API access, and hands-on control of the paywall editor using the Superwall Skills." --- -The [Superwall Skill](https://github.com/superwall/skills) is a set of [Agent Skills](https://agentskills.io) that give AI coding agents everything they need to work with Superwall. It has access to live documentation, API access, dashboard information, and guided SDK integration flows for every platform. +The [Superwall Skills](https://github.com/superwall/skills) are a set of [Agent Skills](https://agentskills.io) that give AI coding agents everything they need to work with Superwall: live documentation, authenticated access to your account through the [Superwall CLI](/dashboard/guides/superwall-cli), guided SDK integration flows for every platform, and hands-on control of the paywall editor. This is different from [Superwall Agents](/agents), which is the Superwall AI workspace for chats, analysis, automations, webhooks, and hosted machine work. The Superwall Skill is for giving AI coding agents Superwall docs, API access, and SDK guidance. The Skill can perform all of the tasks the [Superwall MCP](/dashboard/guides/superwall-mcp) can, and is recommended when you are working in an external coding agent. - -The Skill can also connect to a live paywall editor session. Open **AI Chat** in the paywall editor, expand the agent connection panel, choose **Skill**, install the Skill if needed, then paste the pairing-code prompt into your agent. See [Editor MCP](/dashboard/dashboard-creating-paywalls/paywall-editor-mcp) for the full flow. - - ## Installation -Install with the [skills.sh](https://skills.sh) CLI. This works with any agent that supports skills, including Claude Code, Cursor, and Codex. - -Install all skills (recommended): +Install with one command: ```bash -npx skills add superwall/skills +npx superwall skills ``` -Or install individual skills: +The CLI shows a picker with every skill pre-selected. Press **Enter** and the skills install globally for every coding agent detected on your machine: Claude Code, Cursor, Codex, Gemini CLI, Copilot, Windsurf, and 70+ more. Run the same command again any time to update; it checks whether your installed skills are out of date first. + +To install specific skills, or force a reinstall: ```bash -# General skill (docs, API, dashboard links) -npx skills add superwall/skills --skill superwall - -# Platform-specific quickstart -npx skills add superwall/skills --skill superwall-ios-quickstart -npx skills add superwall/skills --skill superwall-android-quickstart -npx skills add superwall/skills --skill superwall-flutter-quickstart -npx skills add superwall/skills --skill superwall-expo-quickstart +npx superwall skills --skill superwall # just one skill +npx superwall skills --force # reinstall even if up to date ``` -## What's included - -The Superwall Skill is made up of a general-purpose skill and platform-specific quickstart skills. - -### General skill +If you use the [Superwall CLI](/dashboard/guides/superwall-cli), you don't need to run this at all: `superwall login` installs the skills automatically and keeps them updated. -The `superwall` skill gives agents access to: +You can also install straight from the repo with the [skills.sh](https://skills.sh) CLI, which is what `superwall skills` uses under the hood: `npx skills add superwall/skills`. -- **Live documentation**: Agents fetch docs on demand from `llms.txt` and per-page markdown endpoints, so they always have the latest information. -- **API access**: A bundled `sw-api.sh` helper wraps the Superwall V2 API. Agents can list projects, inspect applications, and manage resources directly from the terminal. -- **Dashboard links**: URL patterns for every dashboard page, so agents can link you to the right place (settings, campaigns, paywalls, users, and more). -- **SDK source cloning**: Agents can clone SDK repos locally to trace internal behavior when debugging. -- **Webhook and integration catalog**: Fetched live from the Superwall integrations endpoint. -- **Editor pairing**: Agents can attach to the paywall currently open in the editor when you provide the pairing code from the editor's agent connection panel. +## What's included -### Platform quickstart skills +Three skills, each covering a different job: -Each quickstart skill walks the agent through a full SDK integration, step by step: +| Skill | What it does | +|-------|--------------| +| `superwall` | The Superwall expert: docs, account resources, analytics, App Store Connect, and SDK workflows | +| `superwall-editor` | Hands-on control of the paywall editor session open in your browser | +| `wwdc` | WWDC session lookup, comparison, transcripts, and timestamped citations | -| Skill | Platform | -|-------|----------| -| `superwall-ios-quickstart` | iOS (Swift / Objective-C) | -| `superwall-android-quickstart` | Android (Kotlin / Java) | -| `superwall-flutter-quickstart` | Flutter | -| `superwall-expo-quickstart` | Expo | +### superwall -Every quickstart follows the same flow: +The general-purpose skill teaches your agent to work through the [Superwall CLI](/dashboard/guides/superwall-cli), so everything runs against your real account: -1. **Install**: Installs the SDK dependency. -2. **Configure**: Ensures Superwall is ready at app launch. -3. **User management**: Identify users on sign-in, reset on logout. -4. **Feature gating**: Register placements and present paywalls. -5. **Subscription tracking**: Observe subscription status changes. -6. **User properties**: Set custom attributes for audience targeting. -7. **Paywall previews**: Sset up deep links for on-device previews. +- **Live documentation**: fetched on demand from `llms.txt` and per-page markdown endpoints, so the agent always works from today's docs instead of training-data memory. +- **Account resources**: projects, apps, products, entitlements, campaigns, and paywalls, listed and created via the CLI. +- **SQL analytics**: ad hoc queries over your organization's ClickHouse analytics data with `superwall query`. +- **App Store Connect workflows**: the full ASC API through Superwall's signed proxy, with schema lookup and local validation. +- **SDK integration**: step-by-step integration flows for iOS, Android, Flutter, and Expo. +- **Migration and review**: guided migration off RevenueCat, Adapty, or Qonversion, and integration audits before you ship. +- **Dashboard links**: URL patterns for every dashboard page, so the agent can link you to the right place. +- **SDK source cloning**: the agent can clone SDK repos locally to trace internal behavior when debugging. -The agent reads bundled reference docs for each step, inspects your project, and implements minimal, production-safe changes before moving on to the next step. +### superwall-editor -## API access +Attaches your agent to the paywall editor session open in your browser, using a pairing code. Once attached, the agent can build and restyle paywalls from a prompt, and edit onboarding and web2app flows live, while you watch the changes land in the editor. -The general skill includes a bash helper (`sw-api.sh`) that wraps the Superwall REST API V2. It requires a `SUPERWALL_API_KEY` environment variable. That's an org-scoped bearer token you can generate from [API Keys settings](https://superwall.com/select-application?pathname=/applications/:app/settings/api-keys). +To pair: open **AI Chat** in the paywall editor, expand the agent connection panel, choose **Skill**, and paste the pairing prompt into your agent. See [Editor MCP](/dashboard/dashboard-creating-paywalls/paywall-editor-mcp) for the full flow. -```bash -# List all available API routes (no API key needed) -sw-api.sh --help +### wwdc -# Show the full spec for a specific route -sw-api.sh --help /v2/projects +WWDC on tap: find and compare WWDC sessions, navigate full session transcripts, cite sessions with timestamps, and summarize what changed platform to platform. Powered by [wwdc.ai](https://wwdc.ai). -# List all projects -sw-api.sh /v2/projects +## Authentication -# Get a specific project -sw-api.sh /v2/projects/{id} +The `superwall` skill authenticates through the official CLI, so resource and data commands run against your real account: -# Create a project -sw-api.sh -m POST -d '{"name":"My Project"}' /v2/projects +```bash +npm install --global superwall +superwall login ``` -The `--help` flag fetches the live OpenAPI spec, so the route reference is always current. - -### Data hierarchy - -Superwall organizes data as **Organization → Projects → Applications**. Each application has a `platform` (ios, android, flutter, react_native, web), a `bundle_id`, and a `public_api_key` used for SDK initialization. The org-scoped `SUPERWALL_API_KEY` is separate, it's used for API calls. +The session lives in `~/.superwall` and every command shares it. In CI, authenticate with an API key instead of a browser: `superwall login --api-key `. See the [Superwall CLI guide](/dashboard/guides/superwall-cli) for the full command reference. ## Quick start @@ -107,12 +80,13 @@ Ask your AI agent to integrate Superwall into your app. The agent will: 1. Detect your platform from the project structure (e.g., `Package.swift` → iOS, `pubspec.yaml` → Flutter). 2. Determine your purchase controller path, whether you're using Superwall's default purchase handling, RevenueCat, or a custom setup. -3. Walk through the quickstart steps, implementing each one in your codebase. +3. Walk through the integration steps, implementing each one in your codebase. -If you've installed the general skill with an API key, the agent can also look up your projects and applications to find the right `public_api_key` for SDK configuration. +Want the fully automated version? `npx superwall integrate` signs you up and integrates the SDK in one shot, driven by the Claude Code or Codex on your machine. See [Set up your app](/dashboard/guides/superwall-cli#set-up-your-app) in the CLI guide. ## Related +- [Superwall CLI](/dashboard/guides/superwall-cli): The command line tool the `superwall` skill drives. - [Superwall Agents](/agents): For experiment analysis with connected Superwall tooling, automations, webhooks, and hosted machines. - [Superwall MCP](/dashboard/guides/superwall-mcp): For managing your Superwall account from AI tools. - [Editor MCP](/dashboard/dashboard-creating-paywalls/paywall-editor-mcp): For connecting external agents to the paywall currently open in the editor. diff --git a/content/docs/dashboard/meta.json b/content/docs/dashboard/meta.json index 2b681b3f..8cf6bc47 100644 --- a/content/docs/dashboard/meta.json +++ b/content/docs/dashboard/meta.json @@ -28,6 +28,7 @@ "---Guides---", "guides/query-clickhouse", "guides/superwall-skill", + "guides/superwall-cli", "guides/superwall-mcp", "guides/migrating-from-revenuecat-to-superwall", "guides/pre-launch-checklist", diff --git a/content/docs/images/cli_confirmation.jpg b/content/docs/images/cli_confirmation.jpg new file mode 100644 index 00000000..0d35cee1 Binary files /dev/null and b/content/docs/images/cli_confirmation.jpg differ diff --git a/content/docs/images/cli_improvements_report_iOS_example.jpg b/content/docs/images/cli_improvements_report_iOS_example.jpg new file mode 100644 index 00000000..8c675e2d Binary files /dev/null and b/content/docs/images/cli_improvements_report_iOS_example.jpg differ diff --git a/content/docs/images/cli_prompt_for_auth.png b/content/docs/images/cli_prompt_for_auth.png new file mode 100644 index 00000000..c7454c36 Binary files /dev/null and b/content/docs/images/cli_prompt_for_auth.png differ diff --git a/content/shared/vibe-coding.mdx b/content/shared/vibe-coding.mdx index c1db278a..545f69b5 100644 --- a/content/shared/vibe-coding.mdx +++ b/content/shared/vibe-coding.mdx @@ -9,6 +9,7 @@ We've built a few tools to help you Vibe Code using the knowledge of the Superwa - [Superwall Agents](#superwall-agents): An AI workspace for analyzing Superwall data exposed by connected tooling, reviewing experiments, working with available files, scheduling recurring reports, and connecting webhooks. - [Superwall Skill (Recommended for coding agents)](#superwall-skill-recommended-for-coding-agents): Gives AI agents live docs, API access, and step-by-step SDK integration guides. If you are working in an external coding agent, pick this one. +- [Superwall CLI](#superwall-cli): Set up the SDK, manage your account, and query analytics from the terminal. Also the fastest way to integrate: `npx superwall integrate`. - [Superwall MCP](#superwall-mcp): Expose your Superwall account (projects, paywalls, campaigns) to work with AI tools. - [Editor AI](#editor-ai): Build and refine a paywall directly inside the visual editor using AI Chat or an external MCP-compatible agent. @@ -29,13 +30,23 @@ Use it from [superwall.ai](https://superwall.ai). Superwall Agents works with a The [Superwall Skill](/dashboard/guides/superwall-skill) is the best way to give external AI coding agents full context on Superwall. It bundles live documentation, API access, dashboard links, and guided SDK integration flows for every platform, all in one install. If you are already working in Claude Code, Cursor, Codex, or another coding agent, pick this one. ```bash -npx skills add superwall/skills +npx superwall skills ``` -Once installed, your agent can look up any Superwall doc on demand, call the API to inspect your projects and applications, and walk through a complete SDK integration step by step. It supports iOS, Android, Flutter, and Expo out of the box with platform-specific quickstart skills. +Once installed, your agent can look up any Superwall doc on demand, call the API to inspect your projects and applications, and walk through a complete SDK integration step by step. It supports iOS, Android, Flutter, and Expo out of the box, and also includes the `superwall-editor` skill for editing live paywalls and the `wwdc` skill for WWDC session lookup. If you're only going to set up one tool, this is the one to use. See the full [Superwall Skill guide](/dashboard/guides/superwall-skill) for details. +## Superwall CLI + +The [Superwall CLI](/dashboard/guides/superwall-cli) puts your whole Superwall account in the terminal, for you and your coding agent: SDK setup, products, campaigns, paywalls, SQL analytics, and the Superwall and App Store Connect APIs. + +```bash +npx superwall integrate # sign up & integrate the SDK in one command +``` + +`integrate` detects your app, connects it to your Superwall account (creating one from the terminal if needed), and runs the Claude Code or Codex on your machine to install and configure the SDK. See the full [Superwall CLI guide](/dashboard/guides/superwall-cli) for every command. + ## Superwall MCP The Superwall MCP connects AI tools to your **Superwall account**, letting agents create and manage projects, paywalls, campaigns, products, entitlements, and webhooks directly. Instead of switching to the dashboard, your AI assistant can set everything up for you.