Skip to content
DocsGitHub

cli

CLI-related commands

Print the shell completion script

Arguments:

Argument Description
[<shell>] Shell to generate completions for (bash, zsh, or fish)

Examples:

Terminal window
# Print completions for your current shell (auto-detected from $SHELL)
sentry cli completion
# Install zsh completions
sentry cli completion zsh > ~/.local/share/zsh/site-functions/_sentry
# Load bash completions into the current shell
eval "$(sentry cli completion bash)"
# Install fish completions
sentry cli completion fish > ~/.config/fish/completions/sentry.fish

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:

Terminal window
# Show all current defaults
sentry cli defaults
# Same as above (aliases: ls, show)
sentry cli defaults list
# Set the default organization
sentry cli defaults org my-org
# Set the default project
sentry 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 telemetry
sentry cli defaults telemetry off
# Stop installing agent skills on upgrade
sentry cli defaults agent-skills off
# Disable inline terminal images
sentry cli defaults graphics off
# Hide Tip: hints in command output
sentry cli defaults tips off
# Clear a single default
sentry cli defaults org --clear
# Clear all defaults without prompting
sentry cli defaults --clear --yes

Send feedback about the CLI

Arguments:

Argument Description
<message...> Your feedback message

Examples:

Terminal window
# Send positive feedback
sentry cli feedback i love this tool
# Report an issue
sentry cli feedback the issue view is confusing

Diagnose and repair CLI database issues

Options:

Option Description
--dry-run Show what would be fixed without making changes

Examples:

Terminal window
# Fix database issues
sentry cli fix
# Fix root-owned files
sudo sentry cli fix
# Show what would be fixed without making changes
sentry cli fix --dry-run

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:

Terminal window
# Scan for .sentryclirc files and import interactively
sentry cli import
# Preview what would be imported
sentry cli import --dry-run
# Skip the confirmation prompt (CI-safe)
sentry cli import --yes
# Explicitly trust a self-hosted URL
sentry cli import --url https://sentry.example.com
# Skip API validation of the imported token
sentry cli import --skip-validation

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:

Terminal window
# Run full setup (PATH, completions, agent skills)
sentry cli setup
# Record the install method
sentry cli setup --method curl
# Place the binary and configure the shell
sentry cli setup --install
# Skip PATH modification
sentry cli setup --no-modify-path
# Skip shell completions
sentry cli setup --no-completions
# Skip agent skill installation
sentry cli setup --no-agent-skills

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:

Terminal window
# Show what would be removed
sentry cli uninstall --dry-run
# Uninstall, keeping the config directory
sentry cli uninstall --yes --keep-config
# Full uninstall with confirmation
sentry cli uninstall

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:

Terminal window
# Update to the latest version on the persisted channel
sentry cli upgrade
# Check for updates without installing
sentry cli upgrade --check
# Switch to the nightly channel and update
sentry cli upgrade nightly
# Switch back to the stable channel and update
sentry cli upgrade stable
# Install a specific stable version
sentry cli upgrade 0.5.0
# Return to the version before the last upgrade
sentry cli upgrade undo
# Force re-download even if up to date
sentry cli upgrade --force
# Force using npm to upgrade
sentry cli upgrade --method npm
# Upgrade from cached patches (no network)
sentry cli upgrade --offline
# Skip reinstalling agent skills
sentry cli upgrade --no-agent-skills

All commands support --json for machine-readable output and --fields to select specific JSON fields.

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

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.

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 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.

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.