Install with the wizard
On this page
Run in your application directory with Node 18 or later:
npx @saaspro/wizard
Or run the same dependency-free script:
curl -fsSL https://saaspro.dev/wizard.mjs | node --input-type=module
No stdin reads or terminal prompts. The wizard prints a code and opens /device
in your browser. Sign in with Google and a passkey, or an existing passkey,
compare the code against your terminal and select your organization, application
and environment. Approval requires keys.write and a passkey verified within
thirty minutes. Approve only a wizard you started. Deny creates no key. Codes
expire in ten minutes and cannot be reused.
Approval creates a public ingest key labelled Wizard. The one-time reveal is encrypted with RSA-OAEP-SHA256 to the CLI's RSA-2048 public key. The private key stays in CLI memory. The server stores the ingest-key hash, prefix and last four characters, plus temporary ciphertext. The first token claim deletes that ciphertext. Public keys send events and evaluate flags; they do not grant management access. The wizard never creates or writes secret keys.
Files and commands#
Detects Next.js, Vite/React, Expo/React Native, Node and Python. The lockfile selects
npm, pnpm, Yarn or Bun. Installs @saaspro/react, @saaspro/react-native or
@saaspro/node as appropriate. Python uses the deployment's archive at
/downloads/saaspro-0.1.0.tar.gz, rather than PyPI.
The wizard writes:
.env.localfor Next.js (NEXT_PUBLIC_SPM_KEY), or.envfor other projects (VITE_SPM_KEY,REACT_APP_SPM_KEY,EXPO_PUBLIC_SPM_KEYorSPM_PUBLIC_KEY), withSPM_HOST. It adds the env filename to.gitignorewhen needed.- A new
app/saaspro-provider.tsx(or.jsx),src/app/saaspro-provider.tsx(or.jsx),src/saaspro-provider.tsx(or.jsx) orsaaspro-init.mjsonly when the target is absent and the pattern is unambiguous. Otherwise it prints exact initialization and integration steps. Existing application source stays intact. .mcp.jsonand.cursor/mcp.json, merging asaasprohosted MCP entry while preserving other settings. Conflicting env values orsaasproentries cause a refusal. Existing credentials are not printed.
Import the provider or initialization file as instructed. Connect browser/mobile
consent controls before collecting application events. Mobile storage and secure
randomness adapters need the printed setup. Node uses @saaspro/node/native for
manual events with a public key. Python's SDK requires a secret key: the wizard
prints its real initialization API but does not write SPM_INGEST_KEY or create
that client. Supply a separate secret key through your server's secret manager.
MCP uses https://saaspro.dev/api/mcp (or your selected host). In Claude Code run
/mcp; in Cursor open MCP settings to finish separate browser OAuth sign-in.
The wizard sends one spm.wizard.verified event and checks for one accepted event.
This proves CLI collection. Verify your application's actual events after setup.
The public key appears once in the terminal reveal; later messages omit its value.
Options#
| Flag | Effect |
|---|---|
--host <origin> |
Override https://saaspro.dev; HTTPS except loopback development |
--dry-run |
Preview commands and files; no writes, install or verification event; device approval still runs |
--key <spm_pub_...> |
Use an existing public key and skip device approval |
--no-install |
Print installation commands without running them |
--no-mcp |
Leave MCP configuration untouched |
--no-open |
Print the approval link without opening a browser, for SSH sessions and CI |
--help |
Show usage |