Skip to content

setup: replace shell installers with a cross-platform TypeScript CLI - #25

Merged
Nort1346 merged 8 commits into
mainfrom
cli/setup-rewrite
Sep 19, 2026
Merged

Nort1346 merged 8 commits into
mainfrom
cli/setup-rewrite

Conversation

@Nort1346

Copy link
Copy Markdown
Owner

Summary

Replaces the ~3,600-line setup.sh / setup.ps1 shell installers with a single cross-platform TypeScript CLI (cli/, published as the lode-setup binary). The same interactive 15-step setup now runs on Linux, macOS, and Windows, built to standalone native binaries with Bun. The root setup scripts become thin bootstraps that download the prebuilt binary from the latest GitHub release. This PR also polishes the CLI's terminal UX: live progress spinners, warning-style callouts, clickable links with correctly-aligned borders, and the Lode title banner.

Changes

  • New standalone cli/ TypeScript + @clack/prompts app - 15-step flow (prerequisites, .env, secrets, database, components, compose files, services, provider API keys, Lode) - replaces setup.sh / setup.ps1
  • Root setup.sh / setup.ps1 reduced to thin bootstraps that fetch the prebuilt lode-setup-<os>-<arch>[.exe] binary from the latest release
  • Progress UX: live spinners (docker pull output parsed into a clean "image: stage" summary instead of a raw layer dump, admin-credential retrieval, single readiness spinner across Redis/qBittorrent/Prowlarr/Jellyfin/PostgreSQL)
  • Warning-style bordered callouts (warningBox) for "Change this password" and "Required before first use"; clickable OSC 8 links in the Services summary
  • Lode ASCII title banner at start and completion, with top/bottom spacing
  • hyperlink() now emits BEL-terminated OSC 8 so clack's width math measures it at its visible width (keeps box borders aligned)
  • Vitest suite under cli/test/ (core + steps), strict TypeScript, type-checked ESLint
  • CI: .github/workflows/cli.yml - install/typecheck/lint/test on push+PR, builds and publishes 6 platform binaries on v* tags

Testing

  • bun run lint passes (run from cli/)
  • bun run typecheck passes (run from cli/)
  • bun run test passes - 9 test files / 36 tests: cli/test/constants.test.ts, cli/test/core/{banner,compose,env,secrets,state}.test.ts, cli/test/steps/{components,services,start-lode}.test.ts
  • Manual: ran bun src/index.ts from cli/ and stepped through the flow - verified spinners, warning boxes, banner, and that the Services links are clickable with an aligned border

Notes for reviewers

  • cli/ is a standalone Bun project (own bun.lock, tsconfig, ESLint, Vitest); root pnpm and root ESLint ignore cli/**. Verify with bun commands from cli/, not pnpm.
  • Binary name lode-setup-<os>-<arch>[.exe] is load-bearing - setup.sh / setup.ps1 resolve the release asset by that exact name, so renaming breaks both bootstraps.
  • cli/.gitignore ignores generated docker-compose* and .env* (written/downloaded at runtime).
  • No merge to main is required to test: this PR runs the check job (typecheck/lint/test) on the branch.

@Nort1346
Nort1346 marked this pull request as ready for review September 19, 2026 15:20
@Nort1346
Nort1346 merged commit 0441144 into main Sep 19, 2026
4 checks passed
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