Skip to content

[agent] Installer no-sudo fallback + quieter envx auth#87

Open
alexng353 wants to merge 1 commit into
mainfrom
agent/envx-ux
Open

[agent] Installer no-sudo fallback + quieter envx auth#87
alexng353 wants to merge 1 commit into
mainfrom
agent/envx-ux

Conversation

@alexng353

Copy link
Copy Markdown
Member

[agent] Installer no-sudo fallback + quieter envx auth

Two UX fixes surfaced while onboarding envx on a fresh macOS box.

install.sh — fall back to ~/.local/bin instead of aborting

curl -fsSL https://get.envx.sh | sh on a machine where /usr/local/bin needs sudo but there's no TTY (or sudo isn't installed) aborted with Superuser not granted, aborting installation, even though a no-sudo install to ~/.local/bin is possible.

Now: elevate_priv is split into a non-fatal try_elevate_priv. When the target dir isn't writable:

  • Explicit --bin-dir / ENVX_BIN_DIR → unchanged (fatal sudo path — you asked for that dir).
  • Default /usr/local/bin + sudo unavailable/denied → falls back to $HOME/.local/bin (mkdir -p, PATH warning) and installs there instead of dying.

envx auth — concise output

auth unconditionally printed the raw PGP auth token signature and then success + the raw server response. Now it prints a single ✓ authenticated fingerprint: <fp> line; the token and raw response are shown only under --debug. Exit-code contract is unchanged (0 on success, error on failure).

Verified: cargo fmt --check clean, cargo build compiles, cargo clippy runs; installer fallback path exercised manually.

Co-Authored-By: GPT-5.5 noreply@openai.com
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Keep explicit bin-dir installs on the existing fatal sudo path, but let default installs fall
back to a per-user bin directory when sudo is unavailable or denied.

Also make envx auth quiet by default: hide the raw auth token and server response unless
--debug is set, and print a concise authenticated line with the key fingerprint.

Co-Authored-By: GPT-5.5 <noreply@openai.com>
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.

1 participant