Sentry CLI
Manage Sentry error tracking from the terminal
Description
sentry-cli is the official command-line tool for Sentry, the error tracking and performance monitoring platform. It handles source map uploads, release management, debug symbol uploads, dSYM management, issue tracking, and deployment notifications from the terminal or CI/CD pipelines.
Install
brew install getsentry/tools/sentry-clinpm i -g @sentry/cliAI Summary
Official Sentry CLI for managing releases, uploading source maps and debug symbols, tracking deployments, and integrating Sentry error tracking into CI/CD pipelines.
Capabilities
- + Upload JavaScript source maps for readable stack traces
- + Create and manage releases with commit tracking
- + Upload debug symbols (dSYM, PDB, ELF) for native crash reports
- + Notify Sentry of deployments to specific environments
- + Upload ProGuard mappings for Android crash deobfuscation
- + Send custom events and test DSN connectivity
Use When
- → Uploading source maps to Sentry for JavaScript/TypeScript applications
- → Managing Sentry releases and associating commits in CI/CD
- → Uploading debug symbols for native mobile or desktop applications
- → Notifying Sentry of deployments to track release health
- → Testing Sentry configuration and DSN connectivity
Avoid When
- x Not using Sentry for error tracking
- x Only using the Sentry web UI for issue management
- x Using a different error tracking service
Usage Patterns
Create release and upload source maps
sentry-cli releases new v1.0.0 && sentry-cli releases files v1.0.0 upload-sourcemaps ./dist Creates a release and uploads all source maps from the dist directory
Finalize a release with commits
sentry-cli releases set-commits v1.0.0 --auto && sentry-cli releases finalize v1.0.0 Associates git commits and marks the release as finalized
Record a deployment
sentry-cli releases deploys v1.0.0 new -e production Records that the release was deployed to the production environment
Test Sentry configuration
sentry-cli send-event -m 'Test event from CLI' Sends a test event to verify Sentry is properly configured
Input / Output
Typical Pipelines
sentry-cli releases new $VERSION && sentry-cli releases files $VERSION upload-sourcemaps ./dist && sentry-cli releases finalize $VERSION for complete release workflow sentry-cli releases set-commits $VERSION --auto && sentry-cli releases deploys $VERSION new -e production to link commits and record deployment sentry-cli send-event -m 'deploy test' to verify Sentry connectivity