Skip to content

Switch install script default from /usr/local/bin to ~/.local/bin #29

@BRO3886

Description

@BRO3886

Problem

The install script (scripts/install.sh, served at rem.sidv.dev/install) defaults INSTALL_DIR to /usr/local/bin:

INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"

On modern macOS this requires sudo for almost everyone because:

  1. On Apple Silicon, Homebrew owns /opt/homebrew/bin, and /usr/local/bin is owned by root:wheel with no group write — so anyone without Intel-Homebrew doesn't have write access
  2. First-time installs prompt for a sudo password, which is a trust hit for a one-liner curl | bash install. Users correctly hesitate when a pipe-to-bash demands sudo
  3. There's no good reason to need root for a single-user CLI tool

Proposed change

Switch the default install location to $HOME/.local/bin (or $HOME/.bin if preferred), following the XDG-ish convention that rustup, uv, mise, bun, deno, and most other modern single-binary installers now use.

INSTALL_DIR="${INSTALL_DIR:-$HOME/.local/bin}"

The install script should:

  1. Create $HOME/.local/bin if it doesn't exist (mkdir -p)
  2. Check if it's on PATH and, if not, print a clear one-liner for the user's shell to add it (detect $SHELL → append to .zshrc / .bashrc / .config/fish/config.fish)
  3. Still honor INSTALL_DIR=... env var for users who want to override (existing behavior)
  4. Keep the /usr/local/bin path working as a fallback if the user explicitly sets it — don't break existing installs

Why .local/bin over .bin

  • ~/.local/bin is the XDG Base Directory convention and ships on PATH by default on most modern Linux distros (and Homebrew on macOS Sonoma+ adds it to PATH automatically if it exists)
  • ~/.bin is older, non-standard, and more likely to collide with dotfile managers or be overwritten
  • rustup, uv, mise, bun, cargo-binstall all use .local/bin or .cargo/bin / .bun/bin-style tool-specific dirs
  • Users installing multiple tools via curl | bash scripts end up with everything in .local/bin anyway

Migration for existing users

  • Existing installs in /usr/local/bin/rem keep working as long as /usr/local/bin is on PATH (it is by default)
  • When an existing user re-runs the install script, it will install into .local/bin instead and then $PATH lookups will prefer whichever comes first
  • Print a notice if /usr/local/bin/rem exists and is different from the new install, suggesting sudo rm /usr/local/bin/rem to avoid confusion

Documentation updates needed

  • website/static/install (served script) — update the default and the path-check messaging
  • website/content/docs/getting-started.md — update any references to the install location
  • skills/rem-cli/SKILL.md — if it mentions the install location
  • README.md — if it mentions it

Risk

Low. The change is backwards compatible (env var override still works), and the worst case is a user has to export PATH="$HOME/.local/bin:$PATH" once. Better than the current default which needs sudo.

Opening this as a follow-up to the v0.10.0 release. Not urgent enough to block anything but worth doing before the install footprint grows further.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions