By getsentry
Interact with Sentry from the command line using Sentry CLI to authenticate, list and view organizations, projects, issues, and events, plus execute API calls for terminal-based error monitoring workflows.
The command-line interface for Sentry. Built for developers and AI agents.
Documentation | Getting Started | Commands
curl https://cli.sentry.dev/install -fsS | bash
brew install getsentry/tools/sentry
npm install -g sentry
pnpm add -g sentry
bun add -g sentry
npx sentry@latest
# Authenticate with Sentry
sentry auth login
# List issues (auto-detects project from your codebase)
sentry issue list
# Get AI-powered root cause analysis
sentry issue explain PROJ-ABC
# Generate a fix plan
sentry issue plan PROJ-ABC
.env files or source code. No flags needed.--json for scripting and pipelines.-w flag to open any resource in your browser.| Command | Description |
|---|---|
sentry auth | Login, logout, check authentication status |
sentry org | List and view organizations |
sentry project | List, view, create, and delete projects |
sentry issue | List, view, explain, and plan issues |
sentry event | View event details |
sentry trace | List and view distributed traces |
sentry span | List and view spans |
sentry log | List and view logs (with streaming) |
sentry dashboard | List, view, and create dashboards with widgets |
sentry sourcemap | Inject debug IDs and upload sourcemaps |
sentry init | Initialize Sentry in your project |
sentry schema | Browse the Sentry API schema |
sentry api | Make direct API requests |
sentry cli | Upgrade, setup, fix, and send feedback |
For detailed documentation, visit cli.sentry.dev.
Credentials are stored in ~/.sentry/ with restricted permissions (mode 600).
Use Sentry CLI programmatically in Node.js (≥22) or Bun without spawning a subprocess:
import createSentrySDK from "sentry";
const sdk = createSentrySDK({ token: "sntrys_..." });
// Typed methods for every CLI command
const orgs = await sdk.org.list();
const issues = await sdk.issue.list({ orgProject: "acme/frontend", limit: 5 });
const issue = await sdk.issue.view({ issue: "ACME-123" });
// Nested commands
await sdk.dashboard.widget.add({ display: "line", query: "count" }, "my-org/my-dashboard");
// Escape hatch for any CLI command
const version = await sdk.run("--version");
const text = await sdk.run("issue", "list", "-l", "5");
Options (all optional):
token — Auth token. Falls back to SENTRY_AUTH_TOKEN / SENTRY_TOKEN env vars.url — Sentry instance URL for self-hosted (e.g., "sentry.example.com").org — Default organization slug (avoids passing it on every call).project — Default project slug.text — Return human-readable string instead of parsed JSON (affects run() only).cwd — Working directory for DSN auto-detection. Defaults to process.cwd().signal — AbortSignal to cancel streaming commands (--follow, --refresh).Streaming commands return AsyncIterable — use for await...of and break to stop.
Errors are thrown as SentryError with .exitCode and .stderr.
git clone https://github.com/getsentry/cli.git
cd cli
bun install
# Run CLI in development mode
bun run dev --help
# With environment variables
bun run --env-file=.env.local src/bin.ts --help
bun run build # Build for current platform
bun run typecheck # Type checking
bun run lint # Check for issues
bun run lint:fix # Auto-fix issues
bun test # Run tests
See DEVELOPMENT.md for detailed setup and CONTRIBUTING.md for contribution guidelines.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub getsentry/cli --plugin sentry-cliSentry-specific agent skills for code review, commits, and more
Sentry error tracking and performance monitoring via MCP
Sentry MCP with experimental features enabled
Sentry Plugin for Claude Code to help with debugging including MCP, commands, and skill capabilities.
Sentry SDK skills
Sentry Plugin for Claude Code to help with debugging including MCP, commands, and skill capabilities.
Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`. Originally from OpenAI's curated skills catalog.
Sentry error tracking and performance monitoring via MCP
Claude Code skill pack for Sentry (30 skills)
Bugsnag API integration: view and manage errors, organizations, projects
Talk to your Faultline error tracker from Claude Code — query error groups, occurrences, captured locals, and APM traces while debugging.