Repository navigation
feat(cli-docs): Serve /install/<handoff code> with SENTRY_HANDOFF set - #2354
Merged
Merged
Conversation
`curl -fsSL https://cli.sentry.dev/install/<code> | bash` now runs the install script with SENTRY_HANDOFF exported, so Sentry can show one command that installs the CLI and claims the agent handoff during setup. The site is static, so the route goes to a small Vercel Edge Function that embeds the release's install script and adds the export after the shebang. It only accepts well-formed `sntryh_` codes and sends `Cache-Control: no-store`. Packaging moves out of inline workflow shell into build-output.mjs; the existing /install routes are unchanged. Co-Authored-By: Evan Purkhiser <1421724+evanpurkhiser@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
MathurAditya724
approved these changes
Nov 18, 2026
MathurAditya724
left a comment
Member
There was a problem hiding this comment.
Reviewed script embedding, code validation, cache headers, and build-output packaging. All 22 CLI docs tests pass, including executing the emitted handoff script through bash, malformed-code rejection, and the packaged function. No blocking issues found. Hosted checks pass; production Vercel routing was not exercised locally.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lets Sentry's setup page show one command that installs the CLI and claims the agent handoff:
curl -fsSL https://cli.sentry.dev/install/sntryh_… | bash./install/<code>returns the normal install script withexport SENTRY_HANDOFF='<code>'added after the shebang.sentry cli setup --installthen claims the handoff (#2320). Plain/installdoesn't change.The site is deployed as static Vercel build output, so the new route goes to a small Edge Function. At packaging time, the function gets the same install script the release ships. It only accepts codes that match Sentry's format:
sntryh_followed by 43 base64url chars, the same regex assentry/agent_handoff/views.py. That keeps anything shell-unsafe out of the script. Any other code returns 404, and responses are sent withCache-Control: no-store.To add a function, packaging had to move out of the inline
printf/zipincli-build.ymland intoapps/cli-docs/vercel/build-output.mjs. The existing/installroutes are byte-for-byte unchanged.Open questions
?code=or the original/install/<code>path, so it works whichever URL Vercel passes it. Worth trying on a preview deploy before merging.install.ps1/<code>would be a small follow-up if we want a Windows one-liner.via @evanpurkhiser.
--
View Session [Sentry]