Sentry CLI

A natural-language CLI for developers and AI agents. Investigate issues, get AI-powered root cause analysis, and manage Sentry projects from your terminal.

The Sentry CLI is a command-line tool built for developers and AI agents. It auto-detects your project from .env files and the local codebase, so you don't need config files or flags. Type natural commands, investigate issues, get AI-powered root cause analysis from Seer, and manage your Sentry projects directly from the terminal.

For full documentation, visit cli.sentry.dev.

Install the CLI using the install script:

Copied
curl https://cli.sentry.dev/install -fsS | bash

Or install globally with a package manager:

Copied
npm install -g sentry

You can also run it directly without installing:

Copied
npx sentry --help

Authenticate using the OAuth device flow:

Copied
sentry auth login

You'll receive a URL and code to enter in your browser. Once authorized, the CLI stores your credentials automatically.

You can also authenticate with an API token directly:

Copied
sentry auth login --token YOUR_SENTRY_API_TOKEN

Create API tokens in your Sentry account settings.

The CLI auto-detects your project context, so most commands work without specifying a project or organization.

Copied
sentry issue list

Get AI-powered root cause analysis from Seer:

Copied
sentry issue explain <short-id>

Generate a step-by-step fix you can apply:

Copied
sentry issue plan <short-id>

Copied
sentry project list
sentry org list

Every command supports JSON output for scripting and pipelines:

Copied
sentry org list --json | jq '.[0]'

AI coding agents like Claude Code can use the Sentry CLI through the agent skill system. This allows agents to list issues, inspect events, and interact with Sentry from your development environment.

Add the Sentry CLI skill to your agent:

Copied
npx skills add https://cli.sentry.dev

The agent uses your existing CLI authentication, so run sentry auth login first.

For more details on agentic usage, see the Agentic Usage guide on cli.sentry.dev.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").