Skip to content

refactor(cli): make openboot install the canonical entry point#52

Merged
fullstackjam merged 2 commits intomainfrom
claude/nice-taussig-2a9c53
Apr 22, 2026
Merged

refactor(cli): make openboot install the canonical entry point#52
fullstackjam merged 2 commits intomainfrom
claude/nice-taussig-2a9c53

Conversation

@fullstackjam
Copy link
Copy Markdown
Collaborator

What changed

openboot install is now the single, explicit entry point for setup. The root command (openboot with no subcommand) previously doubled as an alias for install — it now shows help instead.

Why

Having 12 install-specific flags on the root command made openboot -h noisy and the command structure ambiguous. Users couldn't tell when to use openboot vs openboot install. Making install the canonical entry point gives each command a clear job.

Changes

  • internal/cli/root.go — removed RunE and all install flags; root is now help-only. Simplified PersistentPreRunE map lookup to a single cmd.Name() == "install" check.
  • internal/cli/install.go — added missing --post-install flag (it existed only on root before, so openboot install --post-install was silently broken). Updated Long description and examples to reflect canonical status.
  • scripts/install.shcurl | bash now execs openboot install instead of bare openboot. curl | bash snapshot still execs openboot snapshot via passthrough.

Breaking change

Root-level install shortcuts no longer work:

# before
openboot -p developer
openboot -u githubusername
openboot --from config.json

# after
openboot install -p developer
openboot install -u githubusername
openboot install --from config.json

Reviewer notes

  • install.sh was the only non-obvious affected caller — all other callers in tests already used installCmd directly.
  • --post-install bug fix is a side effect of this refactor; it was masked because the flag existed on root but not on installCmd.

Root command no longer doubles as install — bare `openboot` now shows
help instead of running the install wizard. All install flags move to
`openboot install`, which is now the single, explicit entry point.

- Remove RunE and all install flags from root command
- Add missing --post-install flag to installCmd (was root-only before)
- Update install.sh to exec `openboot install` instead of bare `openboot`
  (snapshot mode still execs `openboot snapshot` via passthrough)
- Simplify PersistentPreRunE: map lookup → single cmd.Name() == "install" check

Breaking: `openboot -p developer` style shortcuts no longer work;
use `openboot install -p developer` instead.
@github-actions
Copy link
Copy Markdown

👋 Thanks for opening this pull request!

Before merging:

  • Code follows existing patterns in the codebase
  • go build ./... and go vet ./... pass
  • Commit message is clear and descriptive

@fullstackjam will review this soon. Thanks for contributing! 🚀

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
internal/cli/root.go 0.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

Fixes CI failures from the root-command refactor. The mock server's
inline install script and all e2e test exec.Command calls were still
using the old root-level flag syntax.

- scripts/mock-server.py: generated install script now calls
  `openboot install -s -u` instead of bare `openboot -s -u`
- test/e2e/smoke_test.go: dry-run exec call updated
- test/e2e/real_install_test.go: all exec calls updated (L6 tier)
- test/e2e/macos_defaults_e2e_test.go: doc comment updated
- test/e2e/dotfiles_e2e_test.go: doc comments updated
- README.md, .github/pull_request_template.md: examples updated
- internal/cli/install.go: remove stale comment about root alias
@github-actions github-actions Bot added tests Tests only docs labels Apr 22, 2026
@fullstackjam fullstackjam merged commit 4df5394 into main Apr 22, 2026
9 checks passed
@fullstackjam fullstackjam deleted the claude/nice-taussig-2a9c53 branch April 22, 2026 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs tests Tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant