Skip to content

feat(install): add install script served from docs site#95

Merged
betegon merged 3 commits intomainfrom
feat/install-script
Jan 28, 2026
Merged

feat(install): add install script served from docs site#95
betegon merged 3 commits intomainfrom
feat/install-script

Conversation

@betegon
Copy link
Copy Markdown
Member

@betegon betegon commented Jan 28, 2026

Summary

Adds an install script so users can install the CLI with a single command:

curl -fsSL https://cli.sentry.dev/install | bash

The script detects the user's OS/arch, downloads the appropriate binary from GitHub releases, and installs it to ~/.local/bin.

Changes

  • Add install script with OS/arch detection (macOS, Linux; x86_64, arm64)
  • Move script to docs/public/install so Astro serves it at the root URL

Test plan

After merging and deploying:

curl -fsSL https://cli.sentry.dev/install | bash

For PR previews:

curl -fsSL https://getsentry.github.io/pr-preview/pr-XX/install | bash

🤖 Generated with Claude Code

betegon and others added 3 commits January 28, 2026 20:19
Adds a bash script that downloads and installs the Sentry CLI binary.
Supports macOS, Linux, and Windows (via MINGW/MSYS/Cygwin) on x64 and arm64.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
GitHub releases for this repo use version tags without the 'v' prefix
(e.g., `0.2.0` not `v0.2.0`). The script was generating URLs like
`.../download/v0.2.0/...` which 404'd.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move install script to docs/public/ so Astro serves it as a static
asset at cli.sentry.dev/install, enabling:
  curl -fsSL https://cli.sentry.dev/install | bash

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

Issue

  • Add workspace-scoped alias cache by BYK in #52
  • Add short ID aliases for multi-project support by BYK in #31

Other

  • (api) Align with gh api and curl conventions by BYK in #60
  • (auth) Add press 'c' to copy URL during login flow by betegon in #58
  • (commands) Rename get commands to view and add -w browser flag by BYK in #53
  • (install) Add install script served from docs site by betegon in #95
  • Added footer formatting function by MathurAditya724 in #71
  • Add explain and plan commands (Seer AI) by MathurAditya724 in #39
  • Add Sentry SDK for error tracking and usage telemetry by BYK in #63

Bug Fixes 🐛

Issue

  • Support short ID aliases in explain and plan commands by BYK in #74
  • Use correct fallback for unrecognized alias-suffix inputs by BYK in #72
  • Handle cross-org project slug collisions in alias generation by BYK in #62
  • Use org-scoped endpoint for latest event + enhanced display by betegon in #40

Other

  • (api) Use query params for --field with GET requests by BYK in #59
  • (install) Use correct download URL without 'v' prefix by betegon in #94
  • (telemetry) Patch Sentry SDK to prevent 3-second exit delay by BYK in #85

Documentation 📚

  • (agents) Update AGENTS.md to reflect current codebase by betegon in #93
  • (issue) Update list command tips to reference view instead of get by BYK in #73
  • (readme) Add installation section by betegon in #65
  • Add documentation website by betegon in #77
  • Update command references from 'get' to 'view' and document -w flag by BYK in #54

Internal Changes 🔧

  • (issue) Extract shared parameters for issue commands by BYK in #79
  • (release) Fix changelog-preview permissions by BYK in #41
  • Rename config folder from .sentry-cli-next to .sentry by BYK in #50

Other

  • test(e2e): use mock HTTP server instead of live API by BYK in #78

🤖 This preview updates automatically when you update the PR.

@betegon betegon marked this pull request as ready for review January 28, 2026 19:50
@github-actions
Copy link
Copy Markdown
Contributor

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://getsentry.github.io/cli/pr-preview/pr-95/

Built to branch gh-pages at 2026-01-28 19:50 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@betegon betegon merged commit 7efbb81 into main Jan 28, 2026
10 checks passed
@betegon betegon deleted the feat/install-script branch January 28, 2026 19:53
exit 1
fi
;;
*) shift ;;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The argument parsing loop silently ignores unknown flags instead of reporting an error, which can mask user typos and lead to installing the wrong version.
Severity: MEDIUM

Suggested Fix

Modify the case statement's default branch (*) to print an error message and exit with a non-zero status code. For example, change *) shift ;; to *) echo "Error: Unknown option: $1"; usage; exit 1 ;;. This will ensure the script fails loudly when given invalid input, providing immediate feedback to the user.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: docs/public/install#L37

Potential issue: The `while` loop for argument parsing uses a `*) shift ;;` case. This
causes any unrecognized command-line arguments to be silently discarded. For example, if
a user makes a typo like `bash install.sh --verison 1.2.3` instead of `--version 1.2.3`,
the script will ignore the flag and proceed to install the latest version instead of the
specified one. This behavior is inconsistent with the script's explicit error handling
for other argument-related issues and can lead to users unknowingly installing an
incorrect version of the software.

Did we get this right? 👍 / 👎 to inform future reviews.

exit 1
fi
;;
*) shift ;;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The install script silently ignores unknown command-line arguments, which can cause it to install the wrong version if a user makes a typo.
Severity: MEDIUM

Suggested Fix

Modify the argument parsing loop to treat unknown arguments as an error. Replace the *) shift ;; case with a pattern that prints an error message to stderr, displays the usage information, and exits with a non-zero status code, for example: *) echo "Error: Unknown option: $1"; usage; exit 1 ;;.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: docs/public/install#L37

Potential issue: The install script's argument parsing logic includes a catch-all case
`*) shift ;;` which silently consumes and ignores any unrecognized command-line
arguments. This behavior contradicts the script's `set -euo pipefail` declaration, which
implies a fail-fast approach. If a user makes a typo in an argument, such as `--verison`
instead of `--version`, the script will not report an error. Instead, it will ignore the
intended version pin and proceed to install the latest version of the CLI, leading to an
unexpected and incorrect installation for the user.

Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

exit 1
fi
;;
*) shift ;;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unknown arguments silently ignored causing wrong version

Medium Severity

The *) shift ;; case silently discards unrecognized arguments. If a user typos the version flag (e.g., --versoin instead of --version), both the misspelled flag and the version number are discarded without warning. The script then proceeds to install the latest version instead of the requested one, giving no indication that the user's arguments were ignored. This could cause users to unknowingly install an incompatible version.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant