sentry cli upgrade
Self-update the Sentry CLI to the latest or a specific version. After upgrading, automatically runscli setup to update completions, agent skills, and installation metadata.
Usage
Arguments
- version (optional) - Specific version (e.g.,
0.5.0), or"nightly"/"stable"to switch channel. Omit to update within current channel.
Release Channels
Two release channels are supported:- stable (default) - Latest stable release from GitHub Releases
- nightly - Built from main, updated on every commit (standalone binary only)
sentry cli upgrade calls use the same channel.
Switching Channels
Flags
--check- Check for updates without installing--force- Force upgrade even if already on the latest version--method <method>- Override installation method (curl,brew,npm,pnpm,bun,yarn)
Installation Methods
The upgrade command automatically detects how the CLI was installed and uses the same method:| Method | Description |
|---|---|
curl | Standalone binary (downloaded directly) |
brew | Homebrew package |
npm | npm global package |
pnpm | pnpm global package |
bun | Bun global package |
yarn | Yarn global package |
--method flag is recorded by sentry cli setup during installation.
Examples
Update to Latest (Current Channel)
Switch to Nightly Channel
Switch Back to Stable
Install Specific Stable Version
Install Specific Nightly Version
Check for Updates
Force Reinstall
Override Installation Method
Nightly Channel Notes
Standalone Binary Only
Nightly builds are distributed as standalone binaries only (GitHub release assets). When a user onbrew/npm/pnpm/bun/yarn switches to nightly:
- The nightly binary is downloaded to a temp path
- Installed to
~/.local/bin(or$SENTRY_INSTALL_DIR) - Setup runs to update completions, PATH, and metadata
- A warning is displayed about the old package-manager installation that may still be in PATH
Migration Example
Homebrew Limitations
Homebrew manages versioning through the formula. Pinning a specific stable version is not supported:sentry cli setup, so completions and metadata are updated automatically.
Version Resolution
Channel Selection Priority
- Positional argument (
nightlyorstable) overrides persisted channel - Persisted channel (set by previous
sentry cli upgrade nightly/stable) - Default:
stable
Version Selection
- No version argument - Latest in current channel
nightlyorstable- Latest in that channel (switches channel)- Specific version (e.g.,
0.5.0) - That exact version in current channel
Post-Upgrade Setup
After upgrading, the command automatically spawns the new binary withcli setup to:
- Update shell completions with new commands/flags
- Update agent skills with new version reference
- Record installation metadata (version, method, channel)
Downgrading
To downgrade to an older version:Exit Codes
0- Success1- Upgrade failed (network error, invalid version, etc.)
Environment Variables
Read by Upgrade
HOME- User home directory (determines install location)SENTRY_INSTALL_DIR- Override install directory for standalone binaries
Set During Upgrade (Internal)
SENTRY_INSTALL_DIR- Pinned install directory passed to childsetupprocess
Error Messages
Unknown Installation Method
sentry cli setup --method <method> to record how you installed the CLI.
Version Not Found
Network Error
Related Commands
sentry cli setup- Configure shell integrationsentry --version- Show current version