sentry-cli▌
sentry/dev · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
Command-line interface for querying and managing Sentry issues, projects, organizations, and distributed traces.
- ›Supports 15+ command categories: authentication, organizations, projects, issues, events, dashboards, repositories, teams, logs, spans, traces, and API calls
- ›Includes AI-powered issue analysis via sentry issue explain and sentry issue plan using Seer AI
- ›Offers JSON output for all major commands, enabling easy integration with scripts and tools
- ›Provides flexible project
Sentry CLI Usage Guide
Help users interact with Sentry from the command line using the sentry CLI.
Agent Guidance
Best practices and operational guidance for AI coding agents using the Sentry CLI.
Key Principles
- Just run the command — the CLI handles authentication and org/project detection automatically. Don't pre-authenticate or look up org/project before running commands. If auth is needed, the CLI prompts interactively.
- Prefer CLI commands over raw API calls — the CLI has dedicated commands for most tasks. Reach for
sentry issue view,sentry issue list,sentry trace view, etc. before constructing API calls manually or fetching external documentation. - Use
sentry schemato explore the API — if you need to discover API endpoints, runsentry schemato browse interactively orsentry schema <resource>to search. This is faster than fetching OpenAPI specs externally. - Use
sentry issue view <id>to investigate issues — when asked about a specific issue (e.g.,CLI-G5,PROJECT-123), usesentry issue viewdirectly. - Use
--jsonfor machine-readable output — pipe throughjqfor filtering. Human-readable output includes formatting that is hard to parse. - The CLI auto-detects org/project — most commands work without explicit targets by scanning for DSNs in
.envfiles, source code, config defaults, and directory names. Only specify<org>/<project>when the CLI reports it can't detect the target or detects the wrong one.
Design Principles
The sentry CLI follows conventions from well-known tools — if you're familiar with them, that knowledge transfers directly:
gh(GitHub CLI) conventions: ThesentryCLI uses the same<noun> <verb>command pattern (e.g.,sentry issue list,sentry org view). Flags followghconventions:--jsonfor machine-readable output,--fieldsto select specific fields,-w/--webto open in browser,-q/--queryfor filtering,-n/--limitfor result count.sentry apimimicscurl: Thesentry apicommand provides direct API access with acurl-like interface —--methodfor HTTP method,--datafor request body,--headerfor custom headers. It handles authentication automatically. If you know how to call a REST API withcurl, the same patterns apply.
Context Window Tips
- Use
--json --fieldsto select specific fields and reduce output size. Run<command> --helpto see available fields. Example:sentry issue list --json --fields shortId,title,priority,level,status - Use
--jsonwhen piping output between commands or processing programmatically - Use
--limitto cap the number of results (default is usually 10–100) - Prefer
sentry issue view PROJECT-123over listing and filtering manually - Use
sentry apifor endpoints not covered by dedicated commands
Safety Rules
- Always confirm with the user before running destructive commands:
project delete,trial start - For mutations, verify the org/project context looks correct in the command output before proceeding with further changes
- Never store or log authentication tokens — the CLI manages credentials automatically
- If the CLI reports the wrong org/project, override with explicit
<org>/<project>arguments
Workflow Patterns
Investigate an Issue
# 1. Find the issue (auto-detects org/project from DSN or config)
sentry issue list --query "is:unresolved" --limit 5
# 2. Get details
sentry issue view PROJECT-123
# 3. Get AI root cause analysis
sentry issue explain PROJECT-123
# 4. Get a fix plan
sentry issue plan PROJECT-123
Explore Traces and Performance
# 1. List recent traces (auto-detects org/project)
sentry trace list --limit 5
# 2. View a specific trace with span tree
sentry trace view abc123def456...
# 3. View spans for a trace
sentry span list abc123def456...
# 4. View logs associated with a trace
sentry trace logs abc123def456...
Stream Logs
# Stream logs in real-time (auto-detects org/project)
sentry log list --follow
# Filter logs by severity
sentry log list --query "severity:error"
Explore the API Schema
# Browse all API resource categories
sentry schema
# Search for endpoints related to a resource
sentry schema issues
# Get details about a specific endpoint
sentry schema "GET /api/0/organizations/{organization_id_or_slug}/issues/"
Arbitrary API Access
# GET request (default)
sentry api /api/0/organizations/my-org/
# POST request with data
sentry api /api/0/organizations/my-org/projects/ --method POST --data '{"name":"new-project","platform":"python"}'
Dashboard Layout
Sentry dashboards use a 6-column grid. When adding widgets, aim to fill complete rows (widths should sum to 6).
Display types with default sizes:
| Display Type | Width | Height | Category | Notes |
|---|---|---|---|---|
big_number |
2 | 1 | common | Compact KPI — place 3 per row (2+2+2=6) |
line |
3 | 2 | common | Half-width chart — place 2 per row (3+3=6) |
area |
3 | 2 | common | Half-width chart — place 2 per row |
bar |
3 | 2 | common | Half-width chart — place 2 per row |
table |
6 | 2 | common | Full-width — always takes its own row |
stacked_area |
3 | 2 | specialized | Stacked area chart |
top_n |
3 | 2 | specialized | Top N ranked list |
categorical_bar |
3 | 2 | specialized | Categorical bar chart |
text |
3 | 2 | specialized | Static text/markdown widget |
details |
3 | 2 | internal | Detail view |
wheel |
3 | 2 | internal | Pie/wheel chart |
rage_and_dead_clicks |
3 | 2 | internal | Rage/dead click visualization |
server_tree |
3 | 2 | internal | Hierarchical tree display |
agents_traces_table |
3 | 2 | internal | Agents traces table |
Use common types for general dashboards. Use specialized only when specifically requested. Avoid internal types unless the user explicitly asks.
Available datasets: spans (default), tracemetrics, discover, issue, error-events, logs. Run sentry dashboard widget --help for dataset descriptions, query formats, and examples.
Row-filling examples:
# 3 KPIs filling one row (2+2+2 = 6)
sentry dashboard widget add <dashboard> "Error Count" --display big_number --query count
sentry dashboard widget add <dashboard> "P95 Duration" --display big_number --query p95:span.duration
sentry dashboard widget add <dashboard> "Throughput" --display big_number --query epm
# 2 charts filling one row (3+3 = 6)
sentry dashboard widget add <dashboard> "Errors Over Time" --display line --query count
sentry dashboard widget add <dashboard> "Latency Over Time" --display line --query p95:span.duration
# Full-width table (6 = 6)
sentry dashboard widget add <dashboard> "Top Endpoints" --display table \
--query count --query p95:span.duration \
--group-by transaction --sort -count --limit 10
Quick Reference
Time filtering
Use --period (alias: -t) to filter by time window:
sentry trace list --period 1h
sentry span list --period 24h
sentry span list -t 7d
Scoping to an org or project
Org and project are positional arguments following gh CLI conventions:
sentry trace list my-org/my-project
sentry issue list my-org/my-project
sentry span list my-org/my-project/abc123def456...
Listing spans in a trace
Pass the trace ID as a positional argument to span list:
sentry span list abc123def456...
sentry span list my-org/my-project/abc123def456...
Dataset names for the Events API
When querying the Events API (directly or via sentry api), valid dataset values are: spans, transactions, logs, errors, discover.
Release Workflow
The sentry release command group manages Sentry releases for tracking deploys and associating commits with errors. A typical CI workflow:
# Create a release (version must match Sentry.init() release value)
sentry release create my-org/1.0.0 --project my-project
# Associate commits via repository integration (requires git checkout)
sentry release set-commits my-org/1.0.0 --auto
# Mark the release as finalized
sentry release finalize my-org/1.0.0
# Record a deploy
sentry release deploy my-org/1.0.0 production
Key details:
- The
org/versionpositional is<org-slug>/<version>, NOT a version prefix.sentry release create sentry/1.0.0means org=sentry, version=1.0.0. This is how org is specified — not viaSENTRY_ORG. - The release version (e.g.,
1.0.0) must match thereleasevalue in yourSentry.init()call. If your SDK uses bare semver, the release must be bare semver too. --autorequires both a Sentry repository integration (GitHub/GitLab/Bitbucket) and a local git checkout. It lists repos from the API and matches against your localoriginremote URL, then sends the HEAD commit SHA. Without a checkout, use--localinstead.- When neither
--autonor--localis specified, the CLI tries--autofirst and falls back to--localon failure.
CI/CD Setup Notes
- The
sentrynpm package requires Node.js >= 22. CI runners likeubuntu-latestship Node.js 20 — addactions/setup-node@v6withnode-version: 22. - If
SENTRY_AUTH_TOKENis scoped to a GitHub environment (e.g.,production), setenvironment: productionon the job. - A full git checkout (
fetch-depth: 0) is needed for--autoto discover the remote URL and HEAD. set-commits --autohascontinue-on-errorin most workflows because it requires a working repository integration. If the integration isn't configured, the step fails but the rest of the release workflow succeeds.
Common Mistakes
- Wrong issue ID format: Use
PROJECT-123(short ID), not the numeric ID123456789. The short ID includes the project prefix. - Pre-authenticating unnecessarily: Don't run
sentry auth loginbefore every command. The CLI detects missing/expired auth and prompts automatically. Only runsentry auth loginif you need to switch accounts. - Missing
--jsonfor piping: Human-readable output includes formatting. Use--jsonwhen parsing output programmatically. - Specifying org/project when not needed: Auto-detection resolves org/project from DSNs, env vars, config defaults, and directory names. Let it work first — only add
<org>/<project>if the CLI says it can't detect the target or detects the wrong one. - Confusing
--querysyntax: The--queryflag uses Sentry search syntax (e.g.,is:unresolved,assigned:me), not free text search. - Not using
--web: View commands support-w/--webto open the resource in the browser — useful for sharing links. - Fetching API schemas instead of using the CLI: Prefer
sentry schemato browse the API andsentry apito make requests — the CLI handles authentication and endpoint resolution, so there's rarely a need to download OpenAPI specs separately. - Release version mismatch: The
org/versionpositional is<org-slug>/<version>, whereorg/is the org, not part of the version.sentry release create sentry/1.0.0creates version1.0.0in orgsentry. If yourSentry.init()usesrelease: "1.0.0", this is correct. Don't double-prefix likesentry/myapp/1.0.0. - Running
set-commits --autowithout a git checkout:--autoneeds a local git repo to discover the origin remote URL and HEAD commit. In CI, ensureactions/checkoutwithfetch-depth: 0runs beforeset-commits --auto. - Using
sentry apiwhen CLI commands suffice:sentry issue list --jsonalready includesshortId,title,priority,level,status,permalink, and other fields at the top level. Some fields likecount,userCount,firstSeen, andlastSeenmay be null depending on the issue. Use--fieldsto select specific fields and--helpto see all available fields. Only fall back tosentry apifor data the CLI doesn't expose.
Prerequisites
The CLI must be installed and authenticated before use.
Installation
curl https://cli.sentry.dev/install -fsS | bash
curl https://cli.sentry.dev/install -fsS | bash -s -- --version nightly
# Or install via npm/pnpm/bun
npm install -g sentry
Authentication
sentry auth login
sentry auth login --token YOUR_SENTRY_API_TOKEN
sentry auth status
sentry auth logout
Command Reference
Auth
Authenticate with Sentry
sentry auth login— Authenticate with Sentrysentry auth logout— Log out of Sentrysentry auth refresh— Refresh your authentication tokensentry auth status— View authentication statussentry auth token— Print the stored authentication tokensentry auth whoami— Show the currently authenticated user
→ Full flags and examples: references/auth.md
Org
Work with Sentry organizations
sentry org list— List organizationssentry org view <org>— View details of an organization
How to use sentry-cli on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add sentry-cli
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches sentry-cli from GitHub repository sentry/dev and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate sentry-cli. Access the skill through slash commands (e.g., /sentry-cli) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★28 reviews- ★★★★★Daniel Dixit· Sep 17, 2024
sentry-cli has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Sakshi Patil· Sep 13, 2024
Solid pick for teams standardizing on skills: sentry-cli is focused, and the summary matches what you get after install.
- ★★★★★Omar Khanna· Sep 13, 2024
Registry listing for sentry-cli matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Harper Thomas· Sep 1, 2024
sentry-cli fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Noah Kapoor· Aug 20, 2024
sentry-cli has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Nia Taylor· Aug 8, 2024
sentry-cli fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Chaitanya Patil· Aug 4, 2024
I recommend sentry-cli for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Diya Sharma· Aug 4, 2024
Useful defaults in sentry-cli — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Diya Kapoor· Jul 27, 2024
I recommend sentry-cli for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
- ★★★★★Piyush G· Jul 23, 2024
sentry-cli fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
showing 1-10 of 28