Skip to content

feat(installer): thin curl|bash shim over canonical CLI#2

Merged
willackerly merged 1 commit into
v3.0.0-alphafrom
f/installer-shim
May 8, 2026
Merged

feat(installer): thin curl|bash shim over canonical CLI#2
willackerly merged 1 commit into
v3.0.0-alphafrom
f/installer-shim

Conversation

@willackerly

Copy link
Copy Markdown
Owner

Summary

Adds setup-rebar.sh — a ~120-line one-line installer that clones rebar to ~/.rebar, runs the canonical bin/install for PATH/completion wiring, and exits pointing at rebar new / rebar adopt.

Deliberately a shim, not a parallel bootstrap codepath. Project creation stays in the Go CLI so this can't drift from rebar new, rebar adopt, bin/install, or ask init.

Background

Inspired by #1 (@ttschampel). That PR is the right signalcurl | bash is a real UX gap — but the implementation re-implemented rebar new in 462 lines of bash with several footguns (auto-Homebrew/bash5 + sudo, splatting bootstrap into \$PWD, blind git pull, never calling ask init or rebar init). Rather than merge-then-rewrite, landing the cleaner shim here on v3.0.0-alpha for review.

What it does

  1. Clones (or updates) rebar to \$REBAR_DIR (default ~/.rebar)
  2. Hands off to bin/install for PATH/completions/ASK_SERVER
  3. Prints next steps: rebar new <name> or rebar adopt

That's it. No template copying, no auto-installing system deps, no project bootstrap — those live in the Go CLI where they belong.

Test Plan

  • bash -n setup-rebar.sh — syntax clean
  • ./setup-rebar.sh --help — usage prints correctly
  • End-to-end: fresh dir → curl | bash from this branch → rebar new works
  • --server HOST:PORT passthrough writes ASK_SERVER to RC
  • Re-running over existing ~/.rebar checkout: dirty-check gates the fetch

Notes

  • README points the curl URL at v3.0.0-alpha for now. When alpha lands on main, that pointer flips to main (or to a release tag) — that's the worked-example backport.
  • Contracts: no contract impact (additive shell script + 4 README lines).

Adds setup-rebar.sh as a one-line installer that clones rebar to
~/.rebar (configurable via REBAR_DIR / --dir), runs bin/install
for canonical PATH and completion wiring, and exits pointing at
`rebar new` / `rebar adopt` for actual project bootstrap.

Deliberately a shim, not a parallel codepath: project creation
stays in the Go CLI so this can't drift from `rebar new`,
`rebar adopt`, `bin/install`, or `ask init`.

Inspired by #1 (ttschampel) — keeps the curl|bash UX, drops the
462-line reimplementation of project bootstrap.
@willackerly

Copy link
Copy Markdown
Owner Author

@ttschampel — flagged this for you in #1. Would love your review since this is the cleaner version of what you originally proposed. Specifically curious whether anything felt obvious in your version that I shouldn't have dropped.

@willackerly willackerly merged commit 2ec69da into v3.0.0-alpha May 8, 2026
@willackerly willackerly deleted the f/installer-shim branch May 8, 2026 00:51
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