Skip to content

Feat: one-line installer that downloads and starts the local demo - #718

Merged
huang195 merged 1 commit into
rossoctl:mainfrom
huang195:feat/demo-installer
Jul 29, 2026
Merged

Feat: one-line installer that downloads and starts the local demo#718
huang195 merged 1 commit into
rossoctl:mainfrom
huang195:feat/demo-installer

Conversation

@huang195

@huang195 huang195 commented Jul 29, 2026

Copy link
Copy Markdown
Member

Summary

Makes the local quickstart a single command. Today a user has to click into the Releases page, pick the right tarball for their OS/arch, unzip it, clear the macOS quarantine, put the binaries on PATH, and only then run authbridge-proxy --demo. This replaces all of that with one line that also starts the demo:

curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/authbridge/install-demo.sh | sh

Change

New authbridge/install-demo.sh (POSIX sh, shellcheck-clean):

  • Detects OS/arch ({darwin,linux} × {amd64,arm64}; hard-fails otherwise — no Windows).
  • Resolves the newest release by listing /releases (the releases/latest API excludes prereleases, and the project ships prereleases). AUTHBRIDGE_VERSION=vX.Y.Z overrides.
  • Downloads the abctl + authbridge-proxy tarballs and checksums.txt, then verifies SHA-256shasum preferred (reliable on macOS; some non-GNU sha256sum builds reject -c), sha256sum fallback on Linux.
  • Installs both binaries to ~/.local/bin, clears the macOS com.apple.quarantine flag.
  • Prints the terminal-2 (abctl) and terminal-3 (agent) commands — with full ~/.local/bin/ paths and a PATH hint when that dir isn't on PATH.
  • exec authbridge-proxy --demo (foreground, Ctrl-C to stop). AUTHBRIDGE_INSTALL_ONLY=1 installs without starting.

README: collapse the download/unzip/xattr/PATH steps into the one-liner (build-from-source stays as the fallback) and trim the quickstart. Also reframe the intro — Cortex is a platform of easy-to-use services for agentic workloads (a sidecar in Kubernetes or a standalone binary elsewhere): identity & access, guardrails, observability, egress control, optimizations, stated as plain capabilities rather than plugin names. AuthBridge is the identity & access layer, not a former name for the project.

Design notes

  • main-pinned headline, release binaries. The script URL points at main (script fixes reach users immediately); the binaries it installs come from the newest release.
  • No dotfile mutation. When ~/.local/bin isn't on PATH, the script warns and uses full paths rather than editing shell rc files.
  • Scope: demo-only (both binaries + start the proxy). No Homebrew (possible follow-up), no Windows.

Testing

  • shellcheck clean (via koalaman/shellcheck container).
  • End-to-end on darwin/arm64 against v0.7.0-alpha.1 (sandboxed HOME): resolves the release → downloads → both checksums OK → installs to ~/.local/bin → binaries run (--versionv0.7.0-alpha.1) → --demo starts on loopback (forward proxy 127.0.0.1:8081 + session API 127.0.0.1:9094; no transparent listener, per the --demo gate). Verified both the AUTHBRIDGE_INSTALL_ONLY=1 path and the real start path.

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@huang195, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 27 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c2844c89-a353-47fa-ae16-62958638085c

📥 Commits

Reviewing files that changed from the base of the PR and between 1d4c082 and d7923d0.

📒 Files selected for processing (2)
  • README.md
  • authbridge/install-demo.sh
📝 Walkthrough

Walkthrough

The local quick start now uses authbridge/install-demo.sh to install checksum-verified platform binaries, optionally start the demo proxy, and document the self-signed demo CA used for local setup.

Changes

Local demo installation

Layer / File(s) Summary
Verified binary installation and demo launch
authbridge/install-demo.sh
Detects the platform, downloads release artifacts and checksums, installs abctl and authbridge-proxy into ~/.local/bin, and launches the demo unless install-only mode is selected.
Quick-start documentation
README.md
Replaces manual local setup instructions with the installer flow and describes the self-signed demo CA used locally.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: esnible, evaline-ju, alan-cha

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant install_demo.sh
  participant GitHub_Releases
  participant Local_bin
  participant authbridge_proxy
  Developer->>install_demo.sh: Start local demo setup
  install_demo.sh->>GitHub_Releases: Download binaries and checksums
  install_demo.sh->>Local_bin: Verify and install binaries
  install_demo.sh->>authbridge_proxy: Launch demo proxy
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: a one-line installer that downloads and starts the local demo.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@authbridge/install-demo.sh`:
- Around line 76-84: Update the checksum verification flow in install-demo.sh to
authenticate checksums.txt using a pinned trusted signing key or identity
obtained independently of the mutable release assets before running sha_check.
Ensure installation aborts when manifest signature or provenance verification
fails, then retain the existing platform filtering and archive checksum
validation.
- Around line 1-14: Keep install-demo.sh compatible with its advertised POSIX sh
and curl | sh contract: avoid relying on pipefail by rewriting the
release-resolution pipeline so grep failures propagate without it, and replace
both EXIT trap conditions with the POSIX-compatible zero-status condition.
Preserve the existing release selection, cleanup, and installation behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7ac5e997-0131-4eb1-a78a-fa7a287704f8

📥 Commits

Reviewing files that changed from the base of the PR and between 86c52d1 and 11bfaeb.

📒 Files selected for processing (2)
  • README.md
  • authbridge/install-demo.sh

Comment on lines +1 to +14
#!/bin/sh
# install-demo.sh — one-line installer + launcher for the Cortex local demo.
#
# curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/authbridge/install-demo.sh | sh
#
# Detects your OS/arch, downloads the prebuilt `abctl` and `authbridge-proxy`
# binaries for the newest release, verifies their SHA-256 checksums, installs
# them to ~/.local/bin, and starts `authbridge-proxy --demo` (Ctrl-C to stop).
# macOS + Linux, amd64 + arm64. No cluster, Keycloak, or SPIRE needed.
#
# Environment:
# AUTHBRIDGE_VERSION=vX.Y.Z install a specific release tag (default: newest)
# AUTHBRIDGE_INSTALL_ONLY=1 install the binaries but do not start the demo
set -eu

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/sh
for shell in /bin/sh dash bash; do
  command -v "$shell" >/dev/null 2>&1 || continue
  printf '%s: ' "$shell"
  "$shell" -c 'set -euo pipefail; trap ":" EXIT'
  printf 'status=%s\n' "$?"
done

Repository: rossoctl/cortex

Length of output: 186


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== files =="
git ls-files | rg '(^|/)authbridge/install-demo\.sh$|(^|/)authbridge/' | head -200

echo "== target outline =="
wc -l authbridge/install-demo.sh
ast-grep outline authbridge/install-demo.sh || true

echo "== relevant sections =="
sed -n '1,120p' authbridge/install-demo.sh
sed -n '120,190p' authbridge/install-demo.sh

echo "== pipeline/options references =="
rg -n "set -|pipefail|trap|curl \\| sh|curl.*\\|.*sh|\\| " authbridge/install-demo.sh

Repository: rossoctl/cortex

Length of output: 10032


🏁 Script executed:

#!/bin/bash
set -u

echo "== target exists =="
if [ -f authbridge/install-demo.sh ]; then
  wc -l authbridge/install-demo.sh
else
  echo "missing authbridge/install-demo.sh"
fi

echo "== target relevant lines =="
if [ -f authbridge/install-demo.sh ]; then
  sed -n '1,120p' authbridge/install-demo.sh
  echo "-- later relevant lines --"
  sed -n '120,190p' authbridge/install-demo.sh
fi

echo "== options/pipeline references =="
if [ -f authbridge/install-demo.sh ]; then
  rg -n "set -|pipefail|trap|curl \\| sh|curl.*\\|.*sh|\\| " authbridge/install-demo.sh || true
fi

echo "== shell pipefail/trap support =="
for shell in /bin/sh dash bash; do
  command -v "$shell" >/dev/null 2>&1 || continue
  printf '%s: ' "$shell"
  "$shell" -c 'set -euo pipefail; trap ":" EXIT' >/dev/null 2>&1
  ret=$?
  printf "status=%s\n" "$ret"
done

Repository: rossoctl/cortex

Length of output: 6749


Align the installer shell policy with its advertised sh contract.

Line 14 does not use the required pipefail setting, so the release-resolution pipeline can suppress failures from grep -m1. Enabling it keeps the current #!/bin/sh contract but conflicts with POSIX sh; the documented curl | sh payload should be updated to require Bash, or the script should avoid pipelines and keep pipefail disabled. Also replace trap ... EXIT at Lines 69 and 103 with trap ... 0 for POSIX compatibility.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@authbridge/install-demo.sh` around lines 1 - 14, Keep install-demo.sh
compatible with its advertised POSIX sh and curl | sh contract: avoid relying on
pipefail by rewriting the release-resolution pipeline so grep failures propagate
without it, and replace both EXIT trap conditions with the POSIX-compatible
zero-status condition. Preserve the existing release selection, cleanup, and
installation behavior.

Source: Coding guidelines

Comment on lines +76 to +84
curl -fsSL "${base}/${abctl_tgz}" -o "${tmp}/${abctl_tgz}" || die "download failed: ${abctl_tgz}"
curl -fsSL "${base}/${proxy_tgz}" -o "${tmp}/${proxy_tgz}" || die "download failed: ${proxy_tgz}"
curl -fsSL "${base}/checksums.txt" -o "${tmp}/checksums.txt" || die "download failed: checksums.txt"

info "Verifying checksums..."
# Select only this platform's two entries from checksums.txt, then verify.
grep "_${os}_${arch}.tar.gz" "${tmp}/checksums.txt" > "${tmp}/checksums.filtered" \
|| die "no checksum entries for ${os}/${arch} in checksums.txt"
( cd "$tmp" && sha_check checksums.filtered ) || die "checksum verification failed"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

Authenticate the release artifacts.

The checksum manifest is downloaded from the same mutable release location as both archives. An attacker able to replace release assets can replace all three files with matching hashes, so verification succeeds. Verify a signed manifest/provenance against a pinned trusted key or identity independent of release assets.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@authbridge/install-demo.sh` around lines 76 - 84, Update the checksum
verification flow in install-demo.sh to authenticate checksums.txt using a
pinned trusted signing key or identity obtained independently of the mutable
release assets before running sha_check. Ensure installation aborts when
manifest signature or provenance verification fails, then retain the existing
platform filtering and archive checksum validation.

@huang195
huang195 force-pushed the feat/demo-installer branch 2 times, most recently from 4586c1f to 1d4c082 Compare July 29, 2026 22:48

@cwiklik cwiklik left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nicely done, security-conscious curl | sh installer. The important properties all check out:

  • set -eu; all downloads over HTTPS with -fsSL; installs user-scoped to ~/.local/bin (no sudo/privilege escalation).
  • SHA-256 verification runs before extract/install (download → verify → extract ordering is correct), with || die and a shasum/sha256sum fallback.
  • mktemp -d + trap ... EXIT cleanup; only the two expected binaries are moved out (existence-checked first); macOS quarantine clear is guarded; final exec uses the full binary path rather than relying on PATH.
  • shellcheck-clean (with a justified SC2016 disable for the intentional literal $PWD), and the README is updated accurately with an inspect-first / build-from-source escape hatch.

One non-blocking robustness suggestion inline about the checksum filter. The inherent curl|sh caveat (the bootstrap script itself is fetched unpinned from main) is standard and already mitigated by the README note, so not flagging it.

All CI green (Shell Script Lint, CodeQL, Trivy, Bandit, pr-title, Pre-commit); signed commit; no .claude/.vscode. LGTM.

Assisted-By: Claude Code

Comment thread authbridge/install-demo.sh Outdated

info "Verifying checksums..."
# Select only this platform's two entries from checksums.txt, then verify.
grep "_${os}_${arch}.tar.gz" "${tmp}/checksums.txt" > "${tmp}/checksums.filtered" \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

suggestion (non-blocking): grep "_${os}_${arch}.tar.gz" selects every checksums.txt entry for this platform, but only the two binaries are downloaded. If a future release ships a third per-platform artifact (e.g. an authbridge-envoy tarball), shasum -c would fail on a file that wasn't downloaded and break the installer even though abctl/authbridge-proxy verify fine. Consider filtering to exactly the two names being verified, e.g. grep -E "(${abctl_tgz}|${proxy_tgz})\$".

@huang195
huang195 force-pushed the feat/demo-installer branch from 1d4c082 to f7ae897 Compare July 29, 2026 23:09
Add authbridge/install-demo.sh and make it the quickstart headline, so the
local demo is a single command instead of a manual Releases-page download:

  curl -fsSL https://raw.githubusercontent.com/rossoctl/cortex/main/authbridge/install-demo.sh | sh

The script (POSIX sh) detects OS/arch, resolves the newest release (listing
/releases, since prereleases are excluded from releases/latest;
AUTHBRIDGE_VERSION overrides), downloads the abctl + authbridge-proxy tarballs
and checksums.txt, verifies the SHA-256 sums (shasum preferred — reliable on
macOS; sha256sum fallback on Linux), installs both to ~/.local/bin, clears the
macOS quarantine flag, prints the abctl / agent commands for the other
terminals (full ~/.local/bin paths plus a PATH hint when it isn't on PATH), and
execs `authbridge-proxy --demo`. AUTHBRIDGE_INSTALL_ONLY=1 installs without
starting.

README: collapse the download/unzip/xattr/PATH steps into the one-liner
(build-from-source stays as the fallback) and trim the quickstart. Also reframe
the intro: Cortex is a platform of easy-to-use services for agentic workloads
(a sidecar in Kubernetes or a standalone binary elsewhere) — identity & access,
guardrails, observability, egress control, and optimizations — with AuthBridge
as its identity & access layer, not a former name for the project. Capabilities
are stated in plain terms, not by plugin name.

Test: shellcheck clean; ran end-to-end on darwin/arm64 against v0.7.0-alpha.1 —
resolves the release, verifies checksums, installs, and starts the demo on
loopback (forward proxy :8081 + session API :9094; no transparent listener).

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Hai Huang <huang195@gmail.com>
@huang195
huang195 force-pushed the feat/demo-installer branch from f7ae897 to d7923d0 Compare July 29, 2026 23:20
@huang195
huang195 merged commit 4e01283 into rossoctl:main Jul 29, 2026
19 checks passed
@github-project-automation github-project-automation Bot moved this from New/ToDo to Done in Rossoctl Issue Prioritization Jul 29, 2026
@huang195
huang195 deleted the feat/demo-installer branch July 29, 2026 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants