@innoapm/wizard
v0.2.0
Published
One-command setup wizard for innoAPM SDKs (Next.js, Node.js, React Native)
Readme
@innoapm/wizard
One-command setup wizard for innoAPM SDKs. Detects your project's platform, installs the right SDK, scaffolds the init files, and writes the DSN — in a single command.
Supports Next.js (App Router and Pages Router), Node.js, and React Native / Expo.
Usage
npx @innoapm/wizard --dsn "http://PUBLIC_KEY@your-innoapm-host/PROJECT_ID"That's it. The wizard:
- Detects the platform (Next.js / RN / Node) from your
package.json. - Installs the matching SDK (
@innoapm/sdk-nextjs,-react-native, or-node). - Scaffolds the init module in the right place (
instrumentation.tsfor Next.js,innoapm.jsfor RN, prepended import for Node). - For Next.js: mounts the browser init in
app/layoutand/orpages/_app, adds a reportingpages/_errorfor Pages Router projects, wrapsnext.config, enables source maps, writes.env.local.
Run it from the folder that contains app/ or pages/ (or src/). On Next.js 14 the wizard warns that pages/api errors need a manual captureException, since the onRequestError hook only exists on 15+.
Idempotent — safe to re-run.
Options
--dsn <DSN> Your project DSN (or set INNOAPM_DSN / reuse one from .env)
--platform <id> Force a platform: nextjs, react-native, node
--dry-run Print the changes without writing anything
--skip-install Don't run the package install
--yes Don't prompt (fail instead of asking for a DSN)
--release <ref> Release identifier (Next.js; defaults to the git short SHA)
--help Show this messageDocs
Full usage guide and DSN format live in the main repo.
License
MIT © Innoworks Software Solutions Pvt Ltd
