A broad Sentry API CLI with local search, SQL, export, and MCP surfaces for incident work.
Use Sentry from scripts and agents without memorizing endpoint shapes. The CLI wraps the catalog OpenAPI, supports structured output, and adds local sync/search/SQL paths for incident triage and release audits.
Learn more at Sentry.
Authentication
Set SENTRY_AUTH_TOKEN to a Sentry user or organization token with read scopes such as org:read, project:read, and event:read. Set SENTRY_REGION=de for EU-region SaaS organizations, or configure the base URL for self-hosted Sentry if supported by the generated config.
Quick Start
# Confirm token and API reachability before running endpoint commands.
sentry-pp-cli doctor --json
# Find the organization slug used by most Sentry API calls.
sentry-pp-cli organizations list --json --select slug,name
# List projects once you know the organization slug.
sentry-pp-cli organizations projects list-an-organization-s my-org --json --select slug,name
# Start incident triage with organization issues.
sentry-pp-cli organizations issues list-an-organization-s my-org --json --select shortId,title,count,userCount
# Search synced local data when you need offline or repeated context.
sentry-pp-cli search timeout --json --select title,url,resource
Unique Features
These capabilities aren't available in any other tool for this API.
Read-only Sentry inventory
-
organizations list — List Sentry organizations available to the authenticated token with structured output.
Use this first when an agent needs to discover the organization slug for Sentry API work.
sentry-pp-cli organizations list --json --select slug,name
-
seer — List the active LLM model names available through Sentry Seer.
Use this when an agent needs to know which Seer-backed model identifiers Sentry exposes.
sentry-pp-cli seer --json
Usage
Run sentry-pp-cli --help for the full command reference and flag list.
Commands
organizations
Endpoints for organizations
sentry-pp-cli organizations list-your - Return a list of organizations available to the authenticated session in a region.
This is particularly useful for requests with a user bound context. For API key-based requests this will only return the organization that belongs to the key.
sentry-pp-cli organizations retrieve-an - Return details on an individual organization, including various details
such as membership access and teams.
sentry-pp-cli organizations update-an - Update various attributes and configurable settings for the given organization.
projects
Endpoints for projects
sentry-pp-cli projects delete-a - Schedules a project for deletion.
Deletion happens asynchronously and therefore is not immediate. However once deletion has
begun the state of a project changes and will be hidden from most public views.
sentry-pp-cli projects retrieve-a - Return details on an individual project.
sentry-pp-cli projects update-a - Update various attributes and configurable settings for the given project.
Note that solely having the project:read scope restricts updatable settings to
isBookmarked, autofixAutomationTuning, seerScannerAutomation,
preprodSizeStatusChecksEnabled, preprodSizeStatusChecksRules,
preprodSizeEnabledQuery, preprodDistributionEnabledQuery,
preprodSizeEnabledByCustomer, preprodDistributionEnabledByCustomer,
and preprodDistributionPrCommentsEnabledByCustomer.
seer
Endpoints for Seer features
sentry-pp-cli seer list-ai-models - Get list of actively used LLM model names from Seer.
Returns the list of AI models that are currently used in production in Seer.
This endpoint does not require authentication and can be used to discover which models Seer uses.
Requests to this endpoint should use the region-specific domain
eg. us.sentry.io or de.sentry.io
sentry-app-installations
Manage sentry app installations
sentry-apps
Manage sentry apps
sentry-pp-cli sentry-apps delete-a-custom-integration - Delete a custom integration.
sentry-pp-cli sentry-apps retrieve-a-custom-integration-by-id-or-slug - Retrieve a custom integration.
sentry-pp-cli sentry-apps update-an-existing-custom-integration - Update an existing custom integration.
teams
Endpoints for teams
sentry-pp-cli teams delete-a - Schedules a team for deletion.
Note: Deletion happens asynchronously and therefore is not
immediate. Teams will have their slug released while waiting for deletion.
sentry-pp-cli teams retrieve-a - Return details on an individual team.
sentry-pp-cli teams update-a - Update various attributes and configurable settings for the given
team.
Output Formats
# Human-readable table (default in terminal, JSON when piped)
sentry-pp-cli organizations list-your
# JSON for scripting and agents
sentry-pp-cli organizations list-your --json
# Filter to specific fields
sentry-pp-cli organizations list-your --json --select id,name,status
# Dry run — show the request without sending
sentry-pp-cli organizations list-your --dry-run
# Agent mode — JSON + compact + no prompts in one flag
sentry-pp-cli organizations list-your --agent
Agent Usage
This CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--json output to stdout, errors to stderr
- Filterable -
--select id,name returns only fields you need
- Previewable -
--dry-run shows the request without sending
- Retryable - creates return "already exists" on retry, deletes return "already deleted"
- Confirmable -
--yes for explicit confirmation of destructive actions
- Piped input - write commands can accept structured input when their help lists
--stdin
- Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendly is set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
Health Check
sentry-pp-cli doctor
Verifies configuration, credentials, and connectivity to the API.
Configuration
Config file: ~/.config/sentry-pp-cli/config.toml
Environment variables:
Troubleshooting
Authentication errors (exit code 4)
- Run
sentry-pp-cli doctor to check credentials
- Verify the environment variable is set:
echo $SENTRY_AUTH_TOKEN
Not found errors (exit code 3)
- Check the resource ID is correct
- Run the
list command to see available items
API-specific
- 401 Unauthorized — Export SENTRY_AUTH_TOKEN with a valid Sentry token and rerun
sentry-pp-cli doctor --json.
- EU organization returns not found — Set SENTRY_REGION=de or the generated base-url flag/env var before retrying.
- Issue or project commands need a slug — Run
sentry-pp-cli organizations list --json --select slug,name and then project list commands to discover fixture slugs.
HTTP Transport
This CLI uses Chrome-compatible HTTP transport for browser-facing endpoints. It does not require a resident browser process for normal API calls.
Sources & Inspiration
This CLI was built by studying these projects and resources:
Generated by CLI Printing Press