Skip to content

Add self contained setup-rebar.sh for download and setup#1

Open
ttschampel wants to merge 3 commits into
willackerly:mainfrom
ttschampel:f/setup
Open

Add self contained setup-rebar.sh for download and setup#1
ttschampel wants to merge 3 commits into
willackerly:mainfrom
ttschampel:f/setup

Conversation

@ttschampel

Copy link
Copy Markdown
Collaborator

Summary

Adds downloadable setup-rebar.sh script and corresponding README instruction update

Contracts

  • Implements: CONTRACT:___ (new implementation)
  • Modifies behavior of: CONTRACT:___ (check contract still holds)
  • New contract: architecture/CONTRACT-___ (requires plan mode review)
  • No contract impact (refactor, docs, tests only)

Checklist

  • Every new/modified source file has a CONTRACT: header comment
  • Contract references point to existing files (./scripts/check-contract-refs.sh)
  • No untracked TODO: comments (./scripts/check-todos.sh)
  • Tests pass at T2+ (package-level or higher)
  • Docs updated if behavior changed (QUICKCONTEXT, TODO, relevant READMEs)

Test Plan

  • T1 — targeted test(s): ___
  • T2 — package suite: ___
  • T3+ — cross-package / full suite

This script automates the installation of the rebar tool for contract-driven development, checking dependencies, cloning the repository, setting up the project, and verifying the installation.
Added instructions for installer setup script using curl.
@ttschampel ttschampel changed the title F/setup Add self contained setup-rebar.sh for download and setup Apr 2, 2026

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

LGTM

@willackerly

Copy link
Copy Markdown
Owner

Thanks Tim — really appreciate the signal here. The curl | bash one-liner is a real UX gap and your PR is what pushed me to close it.

I'm going to land a thinner version on v3.0.0-alpha rather than merge this directly: #2. The reason is that rebar's Go CLI already has rebar new, rebar adopt, bin/install, and ask init as the canonical onboarding path, and I want the installer to be a shim over those rather than a parallel codepath — the latter would drift the moment any of them change. The version in #2:

  • clones rebar to ~/.rebar, runs bin/install, and exits pointing at rebar new <name> (no template-splatting into $PWD)
  • skips auto-installing Homebrew/bash5 — bin/install already does the right "report missing deps" thing without the sudo prompt mid-curl
  • ~120 lines instead of 462, no parallel bootstrap logic to keep in sync

If you'd like a worked example: backporting #2 from v3.0.0-alpha to main once alpha lands is yours for the taking — that's a clean small PR against the canonical workflow.

Either way, would love your eyes on #2 — does the shim cover your original need? Anything that felt obvious in your version that I dropped and shouldn't have?

Thanks again for filing this; the install ergonomics are clearly worth fixing and your PR is what surfaced it.

willackerly added a commit that referenced this pull request May 8, 2026
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

Quick follow-up: #2 is merged into v3.0.0-alpha, and I've cut a v3.0.1-alpha branch with the version bump applied — that's the canonical place to look at the shim now:

If you run it end-to-end, would love to know:

  1. Does it cover what your version was solving for you?
  2. Anything that felt obvious in your version that I dropped and probably shouldn't have?
  3. The dep-handling difference is the biggest delta — your script auto-brew install'd missing deps; mine just reports them via bin/install. Was the auto-install important to your workflow, or fine to leave as user responsibility?

@ttschampel

Copy link
Copy Markdown
Collaborator Author

Tried out https://github.com/willackerly/rebar/blob/v3.0.1-alpha/setup-rebar.sh

It worked well for me. I'm on the fence about how important auto installing dependences is vs just reporting them. The new report missing is a big improvement.

@ttschampel

Copy link
Copy Markdown
Collaborator Author

I think there are a few bit missing from the install.

  • contract registry script did not install
  • multi agent files did not install
  • looks like some rebar audit checks checks for file existence for scripts which aren't present; the are present in the rebar installation directory though

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.

3 participants