fix(install): drop remote/local detection, always try browser#52
Merged
Conversation
The installer was sniffing SSH env vars, ~/.openclaw, and $DISPLAY to
decide whether to pass --no-browser to the CLI. But @agentkey/cli v1.0
already prints the auth URL on stdout in every mode — --no-browser only
adds a terminal QR and skips the open()/xdg-open()/start() attempt.
So the heuristic was both unnecessary (URL is always printed) and
harmful when it misfired (local users on a headless tmux pane or a
mis-detected SSH session got no browser open at all). Drop it.
The CLI's auto-open is best-effort; if it can't reach a display the
call no-ops and the user copies the URL from terminal output. That
covers SSH, Docker, OpenClaw, and any future headless environment
without any installer-side detection.
Removes:
- detect_remote() in install.sh, Test-RemoteInstall in install.ps1
- --remote / --local / -Remote / -Local flags + mutually-exclusive
guard + FORCE_REMOTE / FORCE_LOCAL state
- --no-browser passthrough to the CLI
- "Installing over SSH..." details section in README.md +
docs/README_zh.md (replaced with a one-line callout under
advanced install options)
- Synopsis / help / behavior copy mentioning the old detection
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
@claude review |
Contributor
|
🤖 Claude security review requested by @lxcong. Running against HEAD |
|
🤖 Claude security review — HEAD: 4bd780b Scope: Documentation + installer scripts (4 files) — removes ✅ No security or convention issues found. Checklist summary:
Review triggered by @lxcong |
lxcong
added a commit
that referenced
this pull request
May 15, 2026
🤖 I have created a release *beep* *boop* --- ## [1.7.2](v1.7.1...v1.7.2) (2026-05-15) ### Bug Fixes * **install:** drop remote/local detection, always try browser ([#52](#52)) ([26d220c](26d220c)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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.
Summary
Installer was sniffing SSH env vars,
~/.openclaw, and\$DISPLAYto decide whether to pass--no-browserto@agentkey/cli --auth-login. Inspecting the v1.0 CLI source confirms this was unnecessary:The CLI always prints the auth URL on stdout.
--no-browseronly adds a terminal QR and skips theopen()/xdg-open()/start()attempt. The CLI's open-browser call is already best-effort — on a headless host it silently no-ops.So the installer-side heuristic was:
This was the root cause of the reported "no browser pops up on `curl … | bash`" symptom.
Fix
Drop the heuristic. Always call `npx -y @agentkey/cli --auth-login` (no `--no-browser`). The CLI tries `open` / `xdg-open` / `start`; if that fails the user has the URL right there in the terminal.
Removed
Net: +24 / -174 lines.
Test plan
🤖 Generated with Claude Code