Skip to content

Commit 8b97caa

Browse files
betegonclaude
andcommitted
feat(install): add SENTRY_INIT env var to run wizard after install
Lets users install the CLI and launch the setup wizard in one command: SENTRY_INIT=1 curl -fsSL https://cli.sentry.dev/install | bash Uses </dev/tty to reopen stdin from the terminal since curl | bash consumes it for the pipe. Also adds `install` to the docs-preview workflow path filter so changes to the install script trigger a preview build. Closes #682 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 79e72c1 commit 8b97caa

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/docs-preview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
paths:
66
- 'docs/**'
7+
- 'install'
78
- '.github/workflows/docs-preview.yml'
89

910
permissions:

install

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ Options:
8989
Environment Variables:
9090
SENTRY_INSTALL_DIR Override the installation directory
9191
SENTRY_VERSION Install a specific version (e.g., 0.19.0, nightly)
92+
SENTRY_INIT Set to 1 to run \`sentry init\` after installing
9293
9394
Examples:
9495
curl -fsSL https://cli.sentry.dev/install | bash
9596
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version nightly
9697
curl -fsSL https://cli.sentry.dev/install | bash -s -- --version 0.19.0
98+
SENTRY_INIT=1 curl -fsSL https://cli.sentry.dev/install | bash
9799
SENTRY_VERSION=nightly curl -fsSL https://cli.sentry.dev/install | bash
98100
SENTRY_INSTALL_DIR=~/.local/bin curl -fsSL https://cli.sentry.dev/install | bash
99101
EOF
@@ -276,3 +278,9 @@ trap - EXIT
276278

277279
# shellcheck disable=SC2086
278280
"$tmp_binary" cli setup $setup_args
281+
282+
# Optionally launch the setup wizard after install.
283+
# </dev/tty reopens stdin from the terminal since `curl | bash` consumes it.
284+
if [[ "${SENTRY_INIT:-}" == "1" ]]; then
285+
sentry init </dev/tty
286+
fi

0 commit comments

Comments
 (0)