cli
CLI-related commands
Commands
Section titled “Commands”sentry cli completion [<shell>]
Section titled “sentry cli completion [<shell>]”Print the shell completion script
Arguments:
| Argument | Description |
|---|---|
[<shell>] |
Shell to generate completions for (bash, zsh, or fish) |
Examples:
# Print completions for your current shell (auto-detected from $SHELL)sentry cli completion
# Install zsh completionssentry cli completion zsh > ~/.local/share/zsh/site-functions/_sentry
# Load bash completions into the current shelleval "$(sentry cli completion bash)"
# Install fish completionssentry cli completion fish > ~/.config/fish/completions/sentry.fishsentry cli defaults <key value...>
Section titled “sentry cli defaults <key value...>”View and manage default settings
Arguments:
| Argument | Description |
|---|---|
<key value...> |
Setting key and optional value |
Options:
| Option | Description |
|---|---|
--clear |
Clear the specified default, or all defaults if no key is given |
-y, --yes |
Skip confirmation prompt |
-f, --force |
Force the operation without confirmation |
Examples:
# Show all current defaultssentry cli defaults
# Same as above (aliases: ls, show)sentry cli defaults list
# Set the default organizationsentry cli defaults org my-org
# Set the default projectsentry cli defaults project my-project
# Set the default Sentry URL (self-hosted)sentry cli defaults url https://sentry.example.com
# Set custom HTTP headers (self-hosted, e.g. for IAP/proxies)sentry cli defaults headers "X-IAP: token"
# Set a custom CA certificate (self-hosted, behind a TLS proxy)sentry cli defaults ca-cert /path/to/ca.pem
# Disable telemetrysentry cli defaults telemetry off
# Stop installing agent skills on upgradesentry cli defaults agent-skills off
# Disable inline terminal imagessentry cli defaults graphics off
# Hide Tip: hints in command outputsentry cli defaults tips off
# Clear a single defaultsentry cli defaults org --clear
# Clear all defaults without promptingsentry cli defaults --clear --yessentry cli feedback <message...>
Section titled “sentry cli feedback <message...>”Send feedback about the CLI
Arguments:
| Argument | Description |
|---|---|
<message...> |
Your feedback message |
Examples:
# Send positive feedbacksentry cli feedback i love this tool
# Report an issuesentry cli feedback the issue view is confusingsentry cli fix
Section titled “sentry cli fix”Diagnose and repair CLI database issues
Options:
| Option | Description |
|---|---|
--dry-run |
Show what would be fixed without making changes |
Examples:
# Fix database issuessentry cli fix
# Fix root-owned filessudo sentry cli fix
# Show what would be fixed without making changessentry cli fix --dry-runsentry cli import
Section titled “sentry cli import”Import settings from legacy .sentryclirc files
Options:
| Option | Description |
|---|---|
-y, --yes |
Skip confirmation prompt |
-n, --dry-run |
Show what would happen without making changes |
--url <url> |
Explicitly trust this URL (bypasses same-file trust check) |
--skip-validation |
Skip token validation against the Sentry API |
Examples:
# Scan for .sentryclirc files and import interactivelysentry cli import
# Preview what would be importedsentry cli import --dry-run
# Skip the confirmation prompt (CI-safe)sentry cli import --yes
# Explicitly trust a self-hosted URLsentry cli import --url https://sentry.example.com
# Skip API validation of the imported tokensentry cli import --skip-validationsentry cli setup
Section titled “sentry cli setup”Configure shell integration
Options:
| Option | Description |
|---|---|
--install |
Install the binary from a temp location to the system path |
--method <method> |
Installation method (curl, brew, npm, pnpm, bun, yarn) |
--channel <channel> |
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) |
Examples:
# Run full setup (PATH, completions, agent skills)sentry cli setup
# Record the install methodsentry cli setup --method curl
# Place the binary and configure the shellsentry cli setup --install
# Skip PATH modificationsentry cli setup --no-modify-path
# Skip shell completionssentry cli setup --no-completions
# Skip agent skill installationsentry cli setup --no-agent-skillssentry cli uninstall
Section titled “sentry cli uninstall”Uninstall Sentry CLI
Options:
| Option | Description |
|---|---|
--keep-config |
Keep the config directory (default ~/.config/sentry) and auth tokens |
-y, --yes |
Skip confirmation prompt |
-f, --force |
Force the operation without confirmation |
-n, --dry-run |
Show what would happen without making changes |
Examples:
# Show what would be removedsentry cli uninstall --dry-run
# Uninstall, keeping the config directorysentry cli uninstall --yes --keep-config
# Full uninstall with confirmationsentry cli uninstallsentry cli upgrade [<version>]
Section titled “sentry cli upgrade [<version>]”Update the Sentry CLI to the latest version
Arguments:
| Argument | Description |
|---|---|
[<version>] |
Specific version (e.g. 0.5.0), "nightly"/"stable" to switch channel, or "undo" to return to the previous version; omit to update within current channel |
Options:
| Option | Description |
|---|---|
--check |
Check for updates without installing |
--force |
Force upgrade even if already on the latest version |
--offline |
Upgrade using only cached version info and patches (no network) |
--no-agent-skills |
Skip agent skill installation for AI coding assistants |
--method <method> |
Installation method to use (curl, brew, npm, pnpm, bun, yarn) |
Examples:
# Update to the latest version on the persisted channelsentry cli upgrade
# Check for updates without installingsentry cli upgrade --check
# Switch to the nightly channel and updatesentry cli upgrade nightly
# Switch back to the stable channel and updatesentry cli upgrade stable
# Install a specific stable versionsentry cli upgrade 0.5.0
# Return to the version before the last upgradesentry cli upgrade undo
# Force re-download even if up to datesentry cli upgrade --force
# Force using npm to upgradesentry cli upgrade --method npm
# Upgrade from cached patches (no network)sentry cli upgrade --offline
# Skip reinstalling agent skillssentry cli upgrade --no-agent-skillsAll commands support --json for machine-readable output and --fields to select specific JSON fields.
Release Channels
Section titled “Release Channels”sentry cli upgrade nightly and sentry cli upgrade stable switch channels.
After switching, bare sentry cli upgrade will continue tracking that channel.
| Channel | Description |
|---|---|
stable |
Latest stable release (default) |
nightly |
Built from main, updated on every commit |
Undo an upgrade
Section titled “Undo an upgrade”Before switching versions, sentry cli upgrade saves a copy of the local database for the version it replaces, in backups/ under the config directory. sentry cli upgrade undo reinstalls that version and restores its database. The logins you have now are kept when that version stores them the same way; otherwise the command says so, and you may need to run sentry auth login. Other changes since the upgrade, such as defaults, are undone.
One backup is kept per version, up to the five most recent. They contain your credentials, so only your user can read them. Undo only covers version changes made with sentry cli upgrade, not ones made through npm or Homebrew directly. Homebrew can't install an earlier version, so on a Homebrew install run sentry cli upgrade undo --method curl to return to it as a standalone binary.
Installation Detection
Section titled “Installation Detection”The CLI detects how it was installed and uses the appropriate upgrade method:
| Method | Detection |
|---|---|
| curl | Binary installed via cli.sentry.dev (XDG: ~/.local/bin; legacy: ~/.sentry/bin) |
| brew | Binary in a Homebrew Cellar (brew install getsentry/tools/sentry) |
| npm | Globally installed via npm install -g sentry |
| pnpm | Globally installed via pnpm add -g sentry |
| bun | Globally installed via bun add -g sentry |
| yarn | Globally installed via yarn global add sentry |
Nightly builds are only available as standalone binaries (via the curl install method). Switching to nightly from a Homebrew or package manager install will automatically migrate to a standalone binary.
Feedback
Section titled “Feedback”Feedback is sent via Sentry's telemetry system. If telemetry is disabled (SENTRY_CLI_NO_TELEMETRY=1, DO_NOT_TRACK=1, or sentry cli defaults telemetry off), feedback cannot be sent.
Shell integration
Section titled “Shell integration”For zsh, setup initializes completion when needed and registers Sentry even if
another tool has already initialized it. Running setup again repairs completion
configuration from older installs. Restart your shell or source your .zshrc
after setup to load the changes.