init
Print instructions for a coding agent to set up Sentry
sentry init
Section titled “sentry init”Print instructions for a coding agent to set up Sentry
Examples:
# Print the setup guidesentry init
# Print the guide as JSONsentry init --jsonAll commands support --json for machine-readable output and --fields to select specific JSON fields.
Setting up Sentry with an agent
Section titled “Setting up Sentry with an agent”sentry init prints a guide for a coding agent to follow; it changes nothing
itself. Ask your agent to run it:
Set up Sentry for me. Run
sentry initand follow the steps.
If the CLI isn't installed yet, point the agent at the published copy, which starts by installing it:
Set up Sentry for me. Fetch https://cli.sentry.dev/get-started-with-sentry.md and follow it.
When the output is piped, as it is for agents, the command prints the guide's Markdown source. In a terminal it renders the guide.
What the guide covers
Section titled “What the guide covers”- Install the CLI and log in with
sentry auth login - Map the project: which apps to set up, which SDKs each one needs (a framework on a specific runtime, such as TanStack Start on Cloudflare, needs both SDKs), and whether Sentry is already there. If it is, upgrade the SDKs or turn on more features instead
- Pick or create a Sentry project and read its DSN
- Choose features: errors, tracing, logs, metrics, Session Replay, profiling, crons, User Feedback, AI agent monitoring, and MCP monitoring
- Install and configure the SDKs from the current docs (
sentry docs), never from remembered versions or APIs - Verify that a test error reaches Sentry with
sentry local run --verifyandsentry issue list - Report what changed and what is left for you to do