sentry-cli

Interact with Sentry issues, traces, logs, releases, and dashboards from the command line.

1|Updated Aug 6, 2025
One-click install
npx skills add https://github.com/azaidrahman/zaid-sani-dotfiles --skill sentry-cli-azaidrahman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sentry-cli
Source: https://github.com/azaidrahman/zaid-sani-dotfiles/tree/main/dot_claude/skills/sentry-cli
Command: npx skills add https://github.com/azaidrahman/zaid-sani-dotfiles --skill sentry-cli-azaidrahman

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Investigating production errors, traces, and logs usually requires switching to the Sentry web UI and clicking through multiple pages. This Skill lets you query issues, events, spans, replays, releases, and dashboards directly from the terminal using the sentry CLI, with automatic org/project detection and JSON output for scripting. ## Core Features & Use Cases - Issue Investigation: List, view, resolve, archive, and merge issues, plus get AI root-cause analysis and fix plans via sentry issue explain and sentry issue plan. - Observability Queries: Explore traces, spans, logs, session replays, and aggregate event data with time filters and Sentry search syntax. - Release & Dashboard Management: Create and finalize releases, associate commits, record deploys, and build dashboards with widgets on a 6-column grid. - Use Case: When a user reports a crash referencing issue FRONT-ABC, run sentry issue view FRONT-ABC to see the stack trace, then sentry issue explain FRONT-ABC for a Seer AI root-cause analysis, all without leaving the terminal. ## Quick Start Ask the assistant to show the details of a specific Sentry issue, for example by saying: use the sentry CLI to view issue PROJECT-123 and explain its root cause.

Frequently Asked Questions about sentry-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I view a Sentry issue from the command line?

Run `sentry issue view PROJECT-123` using the issue's short ID, which includes the project prefix. The CLI auto-detects the org and project from config files, DSNs, or directory names, so explicit scoping is usually unnecessary.

How do I authenticate the Sentry CLI?

Run `sentry auth login` for OAuth-based login, or `sentry auth login --token YOUR_TOKEN` for token-based auth. The CLI detects missing or expired auth automatically and prompts when needed, so pre-authenticating before every command is unnecessary.

How do I get machine-readable output from sentry CLI commands?

Add the `--json` flag to list and view commands, and combine it with `--fields` to select specific fields and reduce output size. You can pipe the result to `jq` for filtering, for example `sentry issue list --json | jq '.[] | .shortId'`.

Can the Sentry CLI make arbitrary API requests?

Yes, `sentry api <endpoint>` provides curl-style access to any Sentry API endpoint with automatic authentication. It supports `--method`, `--data`, `--header`, and `--dry-run` flags, though dedicated CLI commands are preferred when available.

Why does sentry release set-commits --auto fail in CI?

The `--auto` flag requires a local git checkout to discover the origin remote and HEAD commit. In CI, ensure the checkout step runs first with full history, such as `actions/checkout` with `fetch-depth: 0`, or use `--local` to read commits from git history instead.

How do I capture Sentry events locally without sending them to production?

Run your app with `sentry local run -- <command>` to start a local server that receives events. With no DSN set, events go only to the local server and never reach your Sentry org or consume quota.