Skip to content

Render a global usage for help outside a project - #131

Merged
JPDuchesne merged 5 commits into
mainfrom
jpd/global-help-without-dev-yml
Aug 21, 2026
Merged

Render a global usage for help outside a project#131
JPDuchesne merged 5 commits into
mainfrom
jpd/global-help-without-dev-yml

Conversation

@JPDuchesne

Copy link
Copy Markdown
Contributor

Summary

  • Bare dev, --help, -h, and dev help outside any project now print a global usage screen (the five global builtins plus a hint) and exit 0, instead of dying with the no-dev.yml refusal. Inside a project, help still routes to the Runner and renders the project catalog unchanged.
  • GlobalDispatch claims the help spellings only when no ancestor holds a dev.yml (a plain git checkout still gets global help); GLOBAL_COMMANDS became a name→description hash serving both dispatch membership and the listing.
  • Descriptions are hoisted to DESC constants on the five global builtin wrappers so the project and global help views share one source; a new Dev::Cli::GlobalUsagePrinter renders the flat global listing (the project-shaped UsagePrinter stays untouched).

Test plan

  • New GlobalUsagePrinter unit tests (rows, alphabetical order, hint)
  • GlobalDispatch tests: help spellings global from a dev.yml-less cwd (incl. a .git-only checkout), not global under a dev.yml, bare dev prints the canonical descriptions
  • bin/dev end-to-end: bare dev and --help in a dev.yml-less dir exit 0 with the global usage; hostile-env boot test now routes through a project command since bare dev no longer refuses
  • Full suite (932 tests), dev tc (Sorbet), dev style (RuboCop) all green

Made with Cursor

JPDuchesne and others added 5 commits August 21, 2026 00:02
Co-authored-by: Cursor <cursoragent@cursor.com>
The global usage listing needs the descriptions without instantiating the
builtins (whose default constructors build real accessors); one constant
serves both views so they cannot drift.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bare dev / --help / -h / help hit the Runner's manifest load and died with
the no-dev.yml refusal even though five global builtins work anywhere.
GlobalDispatch now claims the help spellings when no dev.yml encloses the
cwd and renders the global command listing; inside a project, help still
routes to the Runner and lists the project catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
Bare dev and --help in a dev.yml-less directory now exit 0 with the global
usage; the hostile-env boot test routes through a project command since
bare dev no longer reaches the no-dev.yml refusal.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sorbet rejects T.nilable(String) into Hash#key?; bare argv reaches the
help fallback through the explicit nil check instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JPDuchesne
JPDuchesne merged commit 742c417 into main Aug 21, 2026
5 checks passed
@JPDuchesne
JPDuchesne deleted the jpd/global-help-without-dev-yml branch August 21, 2026 04:18
JPDuchesne added a commit that referenced this pull request Aug 21, 2026
742c417 Merge pull request #131 from d3mlabs/jpd/global-help-without-dev-yml
e207e17 Guard the nilable argv head before the global-command lookup
8e697a2 Cover the help-outside-a-project routing at the bin/dev boundary
64b5826 Render a global usage for help outside a project
1d78b6c Hoist global builtin descriptions to DESC constants
4ab1152 Add GlobalUsagePrinter: the usage view for help outside a project
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