Skip to content

feat(cli): junior-dev UX pass across commands#45

Merged
ch99q merged 2 commits into
mainfrom
ch99q/junior-dev-ux-review
Jul 7, 2026
Merged

feat(cli): junior-dev UX pass across commands#45
ch99q merged 2 commits into
mainfrom
ch99q/junior-dev-ux-review

Conversation

@ch99q

@ch99q ch99q commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Consistent failure UX: typed UserErrors with codes and hints for no-project and input errors across all commands; commander usage errors exit 2 and emit proper --json envelopes, and Ctrl+C in prompts exits 130 cleanly.
  • Discoverability: --help output is grouped (Start/Dependencies/Develop/Maintain/Workspaces), install gains an add alias, the global --project flag now works in list/why/audit/outdated/info/explain/graph/workspaces, and dev/search --version is renamed --mc-version (the root -V shadowed it).
  • Feedback during long operations: download sizes, a BuildTools heartbeat, a dev-server ready/connect banner, watch-mode and hotswap status lines, and next-step hints in search, outdated, audit, install, and run.
  • Safer destructive and flaky paths: cache clean and workspace remove --delete require confirmation or --yes (erroring instead of hanging in --json/non-TTY runs), upgrade confirms and no-ops when already up to date, cached downloads are written atomically (writeFileAtomic), and sdk install --force stages and verifies the new JDK before removing the old one.
  • Scoped cleaning and honest reporting: clean --docs removes only generated docs/<name>-<version>/ directories and reports anything left in place; list --outdated shares pluggy outdated's upstream lookup (Modrinth + Maven) and surfaces lookup failures instead of a false all-clear.

Test plan

  • vp test — full suite, 78 files / 735 tests passed (4 skipped), including live-network platform tests
  • vp lint — via vp check: format, lint, and type checks all clean
  • Manual: exercised the CLI from source — grouped --help, add alias, unknown-command/option exit codes and --json error envelopes; confirmed dev --version was already shadowed by the root -V at HEAD (the --mc-version rename fixes it); verified empirically that an @InQuirer prompt with EOF stdin hangs under Bun, motivating the dual-TTY prompt gates

ch99q added 2 commits July 7, 2026 17:00
- Typed UserErrors with codes and hints for no-project and input
  failures; usage errors exit 2 and emit proper --json envelopes
- Honor the global --project flag in list, why, audit, outdated, info,
  explain, graph, and workspaces
- Group commands in --help, add the `add` install alias, and rename
  dev/search --version to --mc-version (the root -V shadowed it)
- Progress and affordances: download sizes, BuildTools heartbeat,
  dev-server ready banner, next-step hints in search/outdated/audit/run
- Safer destructive ops: cache clean and workspace remove --delete
  require confirmation or --yes (errors instead of hangs in --json and
  non-TTY runs); upgrade confirms and no-ops when already up to date
- Atomic artifact writes (writeFileAtomic) everywhere downloads are
  cached by path, and staged JDK reinstall so a failed sdk install
  --force never strands the user without a JDK
- clean --docs removes only generated docs/<name>-<version>/ dirs and
  reports anything it leaves in place
src/version.ts now declares `const CLI_VERSION: string = ...`, which the
release sed no longer matched, so binaries would have shipped reporting
0.0.0. Match both forms and fail the build when the stamp doesn't take.
@ch99q ch99q merged commit d2ebfb0 into main Jul 7, 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