Skip to content
DocsGitHub

wizard

Set up the Sentry SDK in your project interactively

Set up the Sentry SDK in your project interactively

Options:

Option Description
-i, --integration <integration> Integration to set up (skips the picker)
-u, --url <url> URL of your self-hosted Sentry instance
--org <org> Slug of the Sentry organization to use
--project <project> Slug of the Sentry project to use
--saas Use Sentry SaaS (sentry.io) without asking
--spotlight Set up Spotlight for local development, without a Sentry account
--force-install Install the SDK even when the package manager's checks fail
--ignore-git-changes Don't ask before changing a project with uncommitted changes
--disable-telemetry Don't send telemetry about this run to Sentry
--debug Print the wizard's debug output

Examples:

Terminal window
# Pick an integration and set it up
sentry wizard
# Set up Next.js for a known org and project on sentry.io
sentry wizard -i nextjs --saas --org my-org --project my-project
# Set up Next.js for Spotlight, without a Sentry account
sentry wizard -i nextjs --spotlight

All commands support --json for machine-readable output and --fields to select specific JSON fields.

sentry wizard sets up the Sentry SDK in the project in the current directory. It asks a few questions, installs the SDK for your framework, writes its configuration, and sets up source map or debug file uploads. Pass -i with an integration, such as nextjs, to skip the integration picker.

It logs in with your sentry auth login account, or starts a login when you have none, and lets you pick or create the Sentry project to send data to. Pass --org and --project to skip those questions.

sentry wizard changes your project's files. To have a coding agent set up Sentry instead, run sentry init, which prints the agent's setup guide and changes nothing.

sentry wizard takes the same integrations and flags as npx @sentry/wizard, so npx @sentry/wizard -i nextjs and sentry wizard -i nextjs do the same thing. These were removed:

  • The sign-up flags --signup, --promo-code and --coming-from. Passing one fails with an explanation. Sign up at https://sentry.io/signup/ (and apply a promo code there), then run the wizard.
  • The Cordova and Electron wizards. Follow their setup guides in the Sentry docs instead.