⚠️ Experimental: This wizard is still in an experimental phase. If you have any feedback, please drop an email to joshua [at] posthog [dot] com.
To use the wizard, you can run it directly using:
npx @posthog/wizard
Currently the wizard can be used for Next.js only. If you have other platforms you would like the wizard to support, please open a GitHub issue!
The following CLI arguments are available:
Option | Description | Type | Default | Choices | Environment Variable |
---|---|---|---|---|---|
--help |
Show help | boolean | |||
--version |
Show version number | boolean | |||
--debug |
Enable verbose logging | boolean | false |
POSTHOG_WIZARD_DEBUG |
|
--integration |
Choose the integration to setup | choices | Select integration during setup | "nextjs" | POSTHOG_WIZARD_INTEGRATION |
--force-install |
Force install the SDK NPM package (use with caution!) | boolean | false |
||
--install-dir |
Relative path to install in | string | . |
POSTHOG_WIZARD_INSTALL_DIR |
|
--region |
PostHog region to use | choices | "us", "eu" | POSTHOG_WIZARD_REGION |
|
--default |
Select the default option for all questions automatically (where possible) | boolean | false |
POSTHOG_WIZARD_DEFAULT |
Note: A large amount of the scaffolding for this came from the amazing Sentry wizard, which you can find here 💖