feat(cli): junior-dev UX pass across commands#45
Merged
Conversation
- 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
UserErrors with codes and hints for no-project and input errors across all commands; commander usage errors exit 2 and emit proper--jsonenvelopes, and Ctrl+C in prompts exits 130 cleanly.--helpoutput is grouped (Start/Dependencies/Develop/Maintain/Workspaces),installgains anaddalias, the global--projectflag now works inlist/why/audit/outdated/info/explain/graph/workspaces, anddev/search--versionis renamed--mc-version(the root-Vshadowed it).search,outdated,audit,install, andrun.cache cleanandworkspace remove --deleterequire confirmation or--yes(erroring instead of hanging in--json/non-TTY runs),upgradeconfirms and no-ops when already up to date, cached downloads are written atomically (writeFileAtomic), andsdk install --forcestages and verifies the new JDK before removing the old one.clean --docsremoves only generateddocs/<name>-<version>/directories and reports anything left in place;list --outdatedsharespluggy 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 testsvp lint— viavp check: format, lint, and type checks all clean--help,addalias, unknown-command/option exit codes and--jsonerror envelopes; confirmeddev --versionwas already shadowed by the root-Vat HEAD (the--mc-versionrename fixes it); verified empirically that an @InQuirer prompt with EOF stdin hangs under Bun, motivating the dual-TTY prompt gates