| name | sentry-cli |
| description | Guide for using the Sentry CLI to interact with Sentry from the command line. Use when the user asks about viewing issues, events, projects, organizations, making API calls, or authenticating with Sentry via CLI. |
Sentry CLI Usage Guide
Help users interact with Sentry from the command line using the sentry CLI.
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
brew install getsentry/tools/sentry
npm install -g sentry
Authentication
sentry auth login
sentry auth login --token YOUR_SENTRY_API_TOKEN
sentry auth status
sentry auth logout
Available Commands
Auth
Authenticate with Sentry
sentry auth login
Authenticate with Sentry
Flags:
--token <value> - Authenticate using an API token instead of OAuth
--timeout <value> - Timeout for OAuth flow in seconds (default: 900) - (default: "900")
Examples:
sentry auth login
sentry auth login --token YOUR_TOKEN
sentry auth logout
Log out of Sentry
Examples:
sentry auth logout
sentry auth refresh
Refresh your authentication token
Flags:
--json - Output result as JSON
--force - Force refresh even if token is still valid
Examples:
sentry auth refresh
sentry auth status
View authentication status
Flags:
--show-token - Show the stored token (masked by default)
Examples:
sentry auth status
sentry auth token
Print the stored authentication token
sentry auth whoami
Show the currently authenticated user
Flags:
Org
Work with Sentry organizations
sentry org list
List organizations
Flags:
-n, --limit <value> - Maximum number of organizations to list - (default: "30")
--json - Output JSON
Examples:
sentry org list
sentry org list --json
sentry org view <org>
View details of an organization
Flags:
--json - Output as JSON
-w, --web - Open in browser
Examples:
sentry org view <org-slug>
sentry org view my-org
sentry org view my-org -w
Project
Work with Sentry projects
sentry project list <org/project>
List projects
Flags:
-n, --limit <value> - Maximum number of projects to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
-p, --platform <value> - Filter by platform (e.g., javascript, python)
Examples:
sentry project list
sentry project list <org-slug>
sentry project list --platform javascript
sentry project view <org/project>
View details of a project
Flags:
--json - Output as JSON
-w, --web - Open in browser
Examples:
sentry project view
sentry project view <org>/<project>
sentry project view <project>
sentry project view my-org/frontend
sentry project view my-org/frontend -w
Issue
Manage Sentry issues
sentry issue list <org/project>
List issues in a project
Flags:
-q, --query <value> - Search query (Sentry search syntax)
-n, --limit <value> - Maximum number of issues to list - (default: "25")
-s, --sort <value> - Sort by: date, new, freq, user - (default: "date")
-t, --period <value> - Time period for issue activity (e.g. 24h, 14d, 90d) - (default: "90d")
--json - Output JSON
-c, --cursor <value> - Pagination cursor — only for <org>/ mode (use "last" to continue)
Examples:
sentry issue list <org>/<project>
sentry issue list <org>/
sentry issue list <project>
sentry issue list
sentry issue list my-org/frontend
sentry issue list my-org/
sentry issue list frontend
sentry issue list my-org/frontend --query "TypeError"
sentry issue list my-org/frontend --sort freq --limit 20
sentry issue list my-org/frontend --query "is:unresolved"
sentry issue list my-org/frontend --query "is:resolved"
sentry issue list my-org/frontend --query "is:unresolved TypeError"
sentry issue explain <issue>
Analyze an issue's root cause using Seer AI
Flags:
--json - Output as JSON
--force - Force new analysis even if one exists
Examples:
sentry issue explain <issue-id>
sentry issue explain 123456789
sentry issue explain my-org/MYPROJECT-ABC
sentry issue explain myproject-G
sentry issue explain 123456789 --force
sentry issue plan <issue>
Generate a solution plan using Seer AI
Flags:
--cause <value> - Root cause ID to plan (required if multiple causes exist)
--json - Output as JSON
--force - Force new plan even if one exists
Examples:
sentry issue plan <issue-id>
sentry issue plan 123456789
sentry issue plan 123456789 --cause 0
sentry issue plan my-org/MYPROJECT-ABC --cause 1
sentry issue plan myproject-G --cause 0
sentry issue view <issue>
View details of a specific issue
Flags:
--json - Output as JSON
-w, --web - Open in browser
--spans <value> - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")
Examples:
sentry issue view <issue-id>
sentry issue view <short-id>
sentry issue view FRONT-ABC
sentry issue view FRONT-ABC -w
Event
View Sentry events
sentry event view <args...>
View details of a specific event
Flags:
--json - Output as JSON
-w, --web - Open in browser
--spans <value> - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")
Examples:
sentry event view <event-id>
sentry event view abc123def456
sentry event view abc123def456 -w
Api
Make an authenticated API request
sentry api <endpoint>
Make an authenticated API request
Flags:
-X, --method <value> - The HTTP method for the request - (default: "GET")
-F, --field <value>... - Add a typed parameter (key=value, key[sub]=value, key[]=value)
-f, --raw-field <value>... - Add a string parameter without JSON parsing
-H, --header <value>... - Add a HTTP request header in key:value format
--input <value> - The file to use as body for the HTTP request (use "-" to read from standard input)
-i, --include - Include HTTP response status line and headers in the output
--silent - Do not print the response body
--verbose - Include full HTTP request and response in the output
Examples:
sentry api <endpoint> [options]
sentry api /organizations/
sentry api /organizations/my-org/
sentry api /projects/my-org/my-project/
sentry api /teams/my-org/my-team/projects/ \
--method POST \
--field name="New Project" \
--field platform=javascript
sentry api /issues/123456789/ \
--method PUT \
--field status=resolved
sentry api /issues/123456789/ \
--method PUT \
--field assignedTo="user@example.com"
sentry api /projects/my-org/my-project/ \
--method DELETE
sentry api /organizations/ \
--header "X-Custom-Header:value"
sentry api /organizations/ --include
sentry api /projects/my-org/my-project/issues/ --paginate
Cli
CLI-related commands
sentry cli feedback <message...>
Send feedback about the CLI
sentry cli fix
Diagnose and repair CLI database issues
Flags:
--dry-run - Show what would be fixed without making changes
sentry cli setup
Configure shell integration
Flags:
--install - Install the binary from a temp location to the system path
--method <value> - Installation method (curl, npm, pnpm, bun, yarn)
--channel <value> - Release channel to persist (stable or nightly)
--no-modify-path - Skip PATH modification
--no-completions - Skip shell completion installation
--no-agent-skills - Skip agent skill installation for AI coding assistants
--quiet - Suppress output (for scripted usage)
sentry cli upgrade <version>
Update the Sentry CLI to the latest version
Flags:
--check - Check for updates without installing
--force - Force upgrade even if already on the latest version
--method <value> - Installation method to use (curl, brew, npm, pnpm, bun, yarn)
Repo
Work with Sentry repositories
sentry repo list <org/project>
List repositories
Flags:
-n, --limit <value> - Maximum number of repositories to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
Team
Work with Sentry teams
sentry team list <org/project>
List teams
Flags:
-n, --limit <value> - Maximum number of teams to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
Examples:
sentry team list
sentry team list <org-slug>
sentry team list --limit 10
sentry team list --json
Log
View Sentry logs
sentry log list <org/project>
List logs from a project
Flags:
-n, --limit <value> - Number of log entries (1-1000) - (default: "100")
-q, --query <value> - Filter query (Sentry search syntax)
-f, --follow <value> - Stream logs (optionally specify poll interval in seconds)
--json - Output as JSON
Examples:
sentry log list
sentry log list <org>/<project>
sentry log list <project>
sentry log list
sentry log list -f
sentry log list -f 5
sentry log list -q 'level:error'
sentry log list -q 'database'
sentry log list --limit 50
sentry log list -n 500
sentry log list my-org/backend -f -q 'level:error'
sentry log view <args...>
View details of a specific log entry
Flags:
--json - Output as JSON
-w, --web - Open in browser
Examples:
sentry log view <log-id>
sentry log view <org>/<project> <log-id>
sentry log view <project> <log-id>
sentry log view 968c763c740cfda8b6728f27fb9e9b01
sentry log view 968c763c740cfda8b6728f27fb9e9b01 -w
sentry log view my-org/backend 968c763c740cfda8b6728f27fb9e9b01
sentry log list --json | jq '.[] | select(.level == "error")'
Trace
View distributed traces
sentry trace list <org/project>
List recent traces in a project
Flags:
-n, --limit <value> - Number of traces (1-1000) - (default: "20")
-q, --query <value> - Search query (Sentry search syntax)
-s, --sort <value> - Sort by: date, duration - (default: "date")
--json - Output as JSON
sentry trace view <args...>
View details of a specific trace
Flags:
--json - Output as JSON
-w, --web - Open in browser
--spans <value> - Span tree depth limit (number, "all" for unlimited, "no" to disable) - (default: "3")
Issues
List issues in a project
sentry issues <org/project>
List issues in a project
Flags:
-q, --query <value> - Search query (Sentry search syntax)
-n, --limit <value> - Maximum number of issues to list - (default: "25")
-s, --sort <value> - Sort by: date, new, freq, user - (default: "date")
-t, --period <value> - Time period for issue activity (e.g. 24h, 14d, 90d) - (default: "90d")
--json - Output JSON
-c, --cursor <value> - Pagination cursor — only for <org>/ mode (use "last" to continue)
Orgs
List organizations
sentry orgs
List organizations
Flags:
-n, --limit <value> - Maximum number of organizations to list - (default: "30")
--json - Output JSON
Projects
List projects
sentry projects <org/project>
List projects
Flags:
-n, --limit <value> - Maximum number of projects to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
-p, --platform <value> - Filter by platform (e.g., javascript, python)
Repos
List repositories
sentry repos <org/project>
List repositories
Flags:
-n, --limit <value> - Maximum number of repositories to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
Teams
List teams
sentry teams <org/project>
List teams
Flags:
-n, --limit <value> - Maximum number of teams to list - (default: "30")
--json - Output JSON
-c, --cursor <value> - Pagination cursor (use "last" to continue from previous page)
Logs
List logs from a project
sentry logs <org/project>
List logs from a project
Flags:
-n, --limit <value> - Number of log entries (1-1000) - (default: "100")
-q, --query <value> - Filter query (Sentry search syntax)
-f, --follow <value> - Stream logs (optionally specify poll interval in seconds)
--json - Output as JSON
Traces
List recent traces in a project
sentry traces <org/project>
List recent traces in a project
Flags:
-n, --limit <value> - Number of traces (1-1000) - (default: "20")
-q, --query <value> - Search query (Sentry search syntax)
-s, --sort <value> - Sort by: date, duration - (default: "date")
--json - Output as JSON
Whoami
Show the currently authenticated user
sentry whoami
Show the currently authenticated user
Flags:
Output Formats
JSON Output
Most list and view commands support --json flag for JSON output, making it easy to integrate with other tools:
sentry org list --json | jq '.[] | .slug'
Opening in Browser
View commands support -w or --web flag to open the resource in your browser:
sentry issue view PROJ-123 -w