Skip to content

Add CLI-only install script (scripts/install-cli.sh)#281

Merged
jarugupj merged 5 commits into
mainfrom
hypeship/cli-only-installer
Jun 10, 2026
Merged

Add CLI-only install script (scripts/install-cli.sh)#281
jarugupj merged 5 commits into
mainfrom
hypeship/cli-only-installer

Conversation

@jarugupj

@jarugupj jarugupj commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds scripts/install-cli.sh, a CLI-only installer that installs only the hypeman CLI from kernel/hypeman-cli releases — without attempting the server install.

This is the script side of fixing the get.hypeman.sh/cli path: today /cli redirects to the full install.sh, which installs the server first and aborts on macOS (no darwin_arm64 server release artifact exists), so the CLI never installs. A standalone CLI installer lets /cli install the CLI on any supported machine regardless of server availability.

The redirect flip (pointing get.hypeman.sh/cli at this script) is a separate change in the kernel/hypeman-www repo and should land only after this is merged to main.

What it does

  • Detects OS/arch and maps to the CLI release naming (darwinmacos, .zip; otherwise <os>, .tar.gz).
  • Resolves the latest kernel/hypeman-cli release that has a matching artifact (reusing the same find_release_with_artifact helper used by install.sh).
  • Downloads, extracts, and installs the hypeman binary to /usr/local/bin — using sudo only when neither the target dir nor its parent is writable, otherwise falling back to ~/.local/bin (and warning before it does). Warns if the install dir isn't on PATH.
  • Requires none of Docker, codesign, systemd, or KVM — those are server-only.
  • A new step in the macOS e2e-install CI job runs the script end-to-end (into a temp INSTALL_DIR) and asserts hypeman --version.

It deliberately does not generate ~/.config/hypeman/cli.yaml (that needs the server's token tooling) and does not carry the server installer's "Intel Macs not supported" guard (the CLI runs fine on Intel and a macos_amd64 build is published).

Test plan

  • Runs end-to-end on a real Apple Silicon runner via the new e2e-install CI step — downloads the macOS .zip, installs, and hypeman --version passes.
  • Ran on Linux x86_64 against the live kernel/hypeman-cli release: installs hypeman, --version / --help work, and the not-on-PATH warning fires when installing outside PATH.
  • Confirmed the resolved macOS arm64 artifact (hypeman_<ver>_macos_arm64.zip) exists on the current release.

Note

Low Risk
New installer script and CI/docs only; no server or auth code changes.

Overview
Adds scripts/install-cli.sh, a curl | bash path that installs only the hypeman binary from kernel/hypeman-cli GitHub releases—no server, Docker, or service setup. It maps darwin to macos / .zip artifacts, picks the latest release with a matching build via find_release_with_artifact (mirrored from install.sh), and installs to INSTALL_DIR (default /usr/local/bin, with sudo or ~/.local/bin fallback).

The macOS e2e-install workflow gains a step that runs the script into a temp dir and checks hypeman --version. README remote-CLI docs now label the install script as Linux & macOS (not Linux-only).

Reviewed by Cursor Bugbot for commit 43d43ab. Bugbot is set up for automated code reviews on this repo. Configure here.

jarugupj and others added 3 commits June 8, 2026 20:03
Add scripts/install-cli.sh, which installs only the hypeman CLI from
kernel/hypeman-cli releases without attempting the server install. It
detects OS/arch, resolves the latest CLI release, downloads the matching
archive, and installs the hypeman binary to a PATH directory
(/usr/local/bin, falling back to ~/.local/bin). This lets
get.hypeman.sh/cli install the CLI on machines where the server install
is unavailable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Run the CLI-only installer into a temp directory on the macOS runner and
assert the installed binary reports its version, exercising the macOS
download/extract path end to end.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jarugupj jarugupj marked this pull request as ready for review June 9, 2026 14:57
@firetiger-agent

Copy link
Copy Markdown

Created a monitoring plan for this PR.

What this PR does: Adds a standalone CLI install script (scripts/install-cli.sh) so users on Linux or macOS can install only the hypeman binary — without the server — via a one-liner. README updated to reflect both platforms. A new CI step exercises the script end-to-end.

Intended effect:

  • CI e2e-install job: baseline is existing test passing; confirmed if the new "Run E2E CLI-only install test" step also passes green (script downloads, extracts, and hypeman --version exits 0).

Risks:

  • GitHub API rate limiting in CIfind_release_with_artifact issues up to ~10 API + HEAD requests per run; if the self-hosted runner's IP hits the unauthenticated rate limit (60 req/hr), the step fails with a curl error. Alert if the new CI step fails with an HTTP 403/429 from api.github.com.
  • Archive naming mismatch — script builds the filename as hypeman_<ver>_macos_arm64.zip; if the hypeman-cli goreleaser config changed the OS token or extension, all 10 probed releases miss and the step errors. Alert if the new CI step fails with "Could not find a CLI release with an artifact".
  • No production service impact — no server-side code changed; downstream API error rate and hypeman node health are expected to remain at Tuesday baseline (5xx ~0.4–1.6%, "failed to create instance" ~2,400–2,500/hr).

Status updates will be posted automatically on this PR as monitoring progresses.

View monitor

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4ec6656. Configure here.

Comment thread scripts/install-cli.sh
Comment thread scripts/install-cli.sh
Use sudo only when neither the target dir nor its parent is writable, so a
creatable path under a writable parent is made and owned by the user
instead of root. Warn before falling back to ~/.local/bin rather than
relocating an unwritable INSTALL_DIR silently.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@jarugupj jarugupj requested a review from hiroTamada June 9, 2026 20:06
@jarugupj jarugupj merged commit cd93405 into main Jun 10, 2026
11 checks passed
@jarugupj jarugupj deleted the hypeship/cli-only-installer branch June 10, 2026 13:18
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.

2 participants