Skip to content

chore(onboarding): smart install + simplify wizard (4 dialogs, skip/upgrade/install)#113

Merged
abdout merged 2 commits into
mainfrom
chore/simplify-install-dialogs
May 25, 2026
Merged

chore(onboarding): smart install + simplify wizard (4 dialogs, skip/upgrade/install)#113
abdout merged 2 commits into
mainfrom
chore/simplify-install-dialogs

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented May 25, 2026

Two-part install polish

Part 1 — Dialog simplification (b458ef6): wizard friction down from 11 dialogs to 4. Role, Pro/Max, name/email, Gist ID, hogwarts-dev, welcome — all removed. Anthropic dialog kept and reworded for company-account + HR/OTP flow (non-blocking).

Part 2 — Smart install (797462b): every install becomes skip-if-fresh / upgrade-if-outdated / install-if-missing. Most teammates already have Chrome, WebStorm, VS Code, git — the old if missing { install } left their tools stale on re-runs.

Why

Friction Before After
Pre-flight dialogs 11 4
Tools re-checked on re-run install or skip skip-if-fresh, upgrade-if-outdated, install-if-missing
Stale tools on re-run ignored upgraded
Reinstall churn for present tools wasted install attempt clean skip

After both: re-running the bootstrap on a 6-month-old machine upgrades stale tools without reinstalling everything and asks only the 4 dialogs the wizard can't auto-detect.

What gets asked (4 dialogs)

# Dialog Action
1 GitHub account? Yes / No, create one (opens github.com/join) / Skip
2 Accepted databayt org invite? Yes / Open invite page / Skip — I'll handle later
3 Anthropic — company account I have creds / Open Claude login / Skip — finish later. Non-blocking: install proceeds while HR sends OTP
4 Where to save repos? Home root / ~/databayt/ / Custom…

What's no longer asked

Removed Replaced by
Welcome / Start Install starts immediately on paste
Role Every machine gets the full config; backends default to engineer
Full name + email Auto-derived after Phase 3 from gh api user --jq '.name // .login' + email = <login>@users.noreply.github.com
Pro/Max Act 3 dialogs gate on Claude.app existing instead
Gist ID Install completes without; final dialog reminds teammate to secrets.sh
Hogwarts dev Defaults off; --hogwarts-dev flag still opts in

Smart install helpers

Backend Helper What it does
Mac (brew) brew_smart <pkg> [--cask] brew listbrew outdated → upgrade or skip; install if missing
Linux (apt) apt_smart <pkg> dpkg-queryapt list --upgradable → upgrade or skip
Linux (snap) snap_smart <pkg> [--classic] snap listsnap refresh or install
Windows (winget) Winget-Smart <pkgId> winget listwinget upgrade or winget install
Universal (npm -g) npm_global_smart <pkg> npm install -g <pkg>@latest (idempotent); prints before→after

All helpers report install vs upgrade vs already-latest distinctly, so re-runs are honest about churn.

Refactored install sites

  • Phase 1 (every backend): git, gh CLI, Node (mac=brew node@24, linux=nvm install --lts, win=winget OpenJS.NodeJS.LTS), pnpm, vercel
  • Phase 2: WebStorm, VS Code, Chrome — skip-if-fresh, upgrade-if-outdated
  • Phase 5: Claude Desktop (Mac=brew_smart claude --cask; Win=Winget-Smart Anthropic.Claude); Claude Code CLI keeps native installer (curl install.sh / irm install.ps1) per code.claude.com/docs/en/setup — auto-updates in background

Latest stable versions confirmed

Tool Version Source
Node 24.16.0 Krypton (Active LTS) nodejs.org (Maintenance for v22 confirmed)
nvm v0.40.4 (was v0.40.3) — bumped github.com/nvm-sh/nvm/releases (Jan 29)
Claude Code CLI native installer auto-updates code.claude.com/docs/en/setup
pnpm, vercel, gh @latest / package-manager latest always pulls newest stable
WebStorm, VS Code, Chrome, Claude Desktop package-manager latest smart helpers upgrade if outdated

Backend changes

  • ROLE positional now optional, defaults to engineer (mac/linux); PowerShell ValidateSet kept for backward compat with explicit callers
  • Phase 3 restructured: SSH key + gh auth first, then git identity is set. Priority: --name/--email arg → existing ~/.gitconfiggh api user$(whoami) fallback. Lets the wizard skip name/email entirely while still attributing commits to the real user.

Test plan

  • Fresh VM: 4 dialogs in ~30 sec, then ~15-20 min silent install. All 7 verify-table rows green.
  • Re-run on existing machine with stale tools: brew/apt/winget upgrade outputs show "upgraded" lines for outdated packages; "up to date" for fresh ones; no reinstall noise.
  • Re-run on existing machine with all-fresh tools: every install step prints "up to date"; nothing reinstalls; total runtime under 2 min.
  • In --quiet mode + no gh: git identity falls back to $(whoami)@$(hostname -s).local
  • After gh auth in non-quiet: git config user.name / user.email reflect the GitHub login
  • pnpm build of docs site green

Net diff

12 files changed, +492 / -683 lines (net -191 lines).

🤖 Generated with Claude Code

Removes 7 questions that either don't matter or can be auto-derived:

- Welcome / Start / Cancel       → install starts immediately on paste
- Pick role (engineer/business/  → universal config; backends default to
  content/ops)                     "engineer" (role is a label only)
- Claude Pro/Max?                → Act 3 Desktop dialogs now gate on
                                   /Applications/Claude.app existing
- Full name (text input)         → auto-derived from `gh api user --jq
- Email (text input)               '.name // .login'` after Phase 3 auth
                                   (email = <login>@users.noreply.github.com)
- Secrets Gist ID                → install completes without; final dialog
                                   reminds teammate to run secrets.sh later
- Set up hogwarts local dev?     → defaults to off; --hogwarts-dev /
                                   -HogwartsDev CLI flag still opts in

Anthropic dialog kept but reworded for company-account + HR/OTP context:
"Anthropic — company account (HR shares credentials + sends OTP).
Install proceeds in parallel while you wait." Non-blocking by design;
sign-in completes in Act 3 manual finishing or via `claude` post-install.

Backends (onboarding-{mac,linux}.sh + onboarding-windows.ps1):
- ROLE positional becomes optional; defaults to "engineer"
- Phase 3 git config restructured: SSH key gen + gh auth first, THEN
  set git identity (priority: --name/--email arg → existing config →
  gh api user → $(whoami) fallback). Lets the wizard skip name/email
  questions entirely while still attributing commits to the real user.

Installers (installer.sh + installer-linux.sh + installer.ps1):
- Drop state reads for role/gitName/gitEmail/gistId/proMax
- Drop ask_role / Ask-Role helper definitions (dead code)
- Backend invocation simplified: just role positional + --quiet + opt-in
  flags. No --name/--email, no GIST_ID positional.
- Act 3 Desktop sign-in dialog rephrased to mention company creds + OTP
- Act 3 dialog gates: replace `proMax == 1` with `Claude.app exists`;
  replace `role == engineer` with `WebStorm installed`
- Final dialog message: drop role mention; add "load secrets later"
  and "finish Anthropic sign-in when OTP arrives" reminders

wizard-steps.json:
- Act 1 steps: 7 removed entries replaced with the 4 that remain
  (hasGithub, hasDatabaytInvite, hasAnthropic, reposDir); each carries
  a note explaining the new behavior
- New `removedAsOf2026_05_25` block documents what was cut + why
- Phase 3 label mentions git-identity auto-set
- Act 3 gate descriptions updated for the proMax/role removals
- stateFile schema: drop role/gitName/gitEmail/gistId/proMax fields

content/docs/onboarding.mdx Act 1 table: rewritten to 4 dialogs + a
"What's no longer asked" table explaining the auto-derivation paths.
Act 2 Phase 3 description mentions git-identity auto-set.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kun Ready Ready Preview, Comment May 25, 2026 2:04am

…backends

Most teammates already have Chrome, WebStorm, VS Code, git, Node, etc.
The previous "if missing { install } else { skip }" pattern left tools
stale on long-lived machines and reinstalled nothing when present. New
pattern: detect → upgrade-if-outdated → install-if-missing → skip-if-fresh.

Helpers added:
- onboarding-mac.sh: `brew_smart <pkg> [--cask]` + `npm_global_smart <pkg>`
- onboarding-linux.sh: `apt_smart <pkg>` + `snap_smart <pkg> [--classic]` +
  `npm_global_smart`
- onboarding-windows.ps1: `Winget-Smart <pkgId>` + `Npm-Global-Smart <pkg>`

All helpers report install vs upgrade vs already-latest distinctly, so
re-runs are honest about what changed.

Refactored install sites:
- Phase 1 (every script): git, gh CLI, Node (mac=brew node@24, linux=nvm
  install --lts, win=winget OpenJS.NodeJS.LTS), pnpm, vercel
- Phase 2: WebStorm, VS Code, Chrome — all skip-if-present-and-fresh,
  upgrade-if-outdated
- Phase 5: Claude Desktop (Mac brew_smart claude --cask; Win Winget-Smart
  Anthropic.Claude)

Latest stable versions confirmed:
- Node 24.16.0 Krypton (Active LTS) — already pinned in PR #111
- nvm v0.40.4 (Jan 29 release; was v0.40.3) — bumped in linux script +
  onboarding.mdx
- Claude Code CLI — native installer (curl install.sh / irm install.ps1)
  per code.claude.com/docs/en/setup; auto-updates in background
- pnpm, vercel, gh, WebStorm, VS Code, Chrome — package managers always
  pull latest stable; @latest pin added to npm globals for explicitness

Net: each re-run of the bootstrap upgrades stale tools without reinstall
churn. Fresh machines get the same install paths as before.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abdout abdout changed the title chore(onboarding): simplify install wizard from 11 dialogs to 4 chore(onboarding): smart install + simplify wizard (4 dialogs, skip/upgrade/install) May 25, 2026
@abdout abdout merged commit 0eb213c into main May 25, 2026
2 checks passed
@abdout abdout deleted the chore/simplify-install-dialogs branch May 25, 2026 02:15
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