Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/cli-docs/src/fragments/commands/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ After switching, bare `sentry cli upgrade` will continue tracking that channel.
| `stable` | Latest stable release (default) |
| `nightly` | Built from `main`, updated on every commit |

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

The CLI detects how it was installed and uses the appropriate upgrade method:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Update the Sentry CLI to the latest version

| Argument | Description |
|----------|-------------|
| `[<version>]` | Specific version (e.g. 0.5.0), or "nightly"/"stable" to switch channel; omit to update within current channel |
| `[<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 |

**Flags:**
- `--check - Check for updates without installing`
Expand All @@ -259,6 +259,9 @@ 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

Expand Down
Loading
Loading