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:
curl https://cli.sentry.dev/install -fsS | bash
Or install globally with a package manager:
npm install -g sentry
You can also run it directly without installing:
npx sentry --help
Authenticate using the OAuth device flow:
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:
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.
sentry issue list
Get AI-powered root cause analysis from Seer:
sentry issue explain <short-id>
Generate a step-by-step fix you can apply:
sentry issue plan <short-id>
sentry project list
sentry org list
Every command supports JSON output for scripting and pipelines:
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:
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.
- Full CLI documentation — installation, authentication, and configuration details
- Commands reference — complete list of available commands
- Agentic usage — using the CLI with AI coding agents
- GitHub repository — source code and issue tracker
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").