Honor hidden: true for subcommands in generated help#93
Merged
AgentEnder merged 3 commits intomainfrom Apr 22, 2026
Merged
Conversation
Contributor
|
View your CI Pipeline Execution ↗ for commit d373526
☁️ Nx Cloud last updated this comment at |
Agent-Logs-Url: https://github.com/AgentEnder/cli-forge/sessions/248f77da-85b6-481a-bf9c-a46c4f24e1bb Co-authored-by: AgentEnder <6933928+AgentEnder@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix hidden subcommands rendering in help text
Honor Apr 22, 2026
hidden: true for subcommands in generated help
Owner
|
@copilot validate that generated docs and autocomplete also obey this. We should probably add a .hidden() method to the CLI class for composition |
Owner
Contributor
|
Docs Preview: https://craigory.dev/cli-forge/pr/93/ |
Adds a fluent setter on the CLI interface that marks a command as hidden from help output, generated docs, and shell completion. Writes through to `configuration.hidden`, the same field the existing `hidden: true` command option sets — so all three readers (format-help, documentation, resolve-completions) honor it without further changes. The method is most useful when composing a sub-CLI standalone and then registering it via `.command(subCli)`. For the in-builder case, prefer `hidden: true` in the command options object: child builders run lazily and don't execute when the parent renders --help, so a `.hidden()` call inside the child's builder cannot affect the parent's listing.
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.
Help output currently respects
hiddenfor options but still lists hidden subcommands. This change aligns command help behavior with existing hidden semantics so internal/experimental commands are not surfaced in user-facing help.Help rendering now filters hidden subcommands
formatHelp()to only include subcommands whereconfiguration.hidden !== true.Commandssection and command-help footer are visibility-awareCommands:is rendered only when at least one visible subcommand exists.Run \... [command] --help`` footer is omitted when no visible subcommands are available.Focused regression coverage
Commands:block and no command-help footer).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://storage.googleapis.com/prod-north-america/66c6330b3cc96d3e7872ab8d/a4d68412-7db5-4a40-91b5-65235829c83a-logs/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run cli-forge:build(http block)https://storage.googleapis.com/prod-north-america/66c6330b3cc96d3e7872ab8d/bfefc345-f65f-4063-9f53-8553efcfeab0/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run cli-forge:test -- src/lib/internal-cli.spec.ts(http block)https://storage.googleapis.com/prod-north-america/66c6330b3cc96d3e7872ab8d/bfefc345-f65f-4063-9f53-8553efcfeab0-logs/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run cli-forge:test -- src/lib/internal-cli.spec.ts(http block)https://storage.googleapis.com/prod-north-america/66c6330b3cc96d3e7872ab8d/c9467a59-20f8-4baf-9374-029d0ef54697/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run cli-forge:test(http block)https://storage.googleapis.com/prod-north-america/66c6330b3cc96d3e7872ab8d/f037dfa1-ba07-4e2d-882a-1529ed88e0fc/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run-many -t lint:eslint,build,test -p cli-forge(http block)/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js run cli-forge:build(http block)www.google-analytics.com/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js show project parser(dns block)/usr/local/bin/node node ./node_modules/.bin/../nx/bin/nx.js show project cli-forge(dns block)/usr/local/bin/node /usr/local/bin/node /home/REDACTED/work/cli-forge/cli-forge/node_modules/.pnpm/nx@22.6.3_@swc-node+register@1.11.1_@swc+core@1.15.8_@swc+helpers@0.5.18__@swc+types@0._08fcaebe47e144ae1496eaa205fa2254/node_modules/nx/src/project-graph/plugins/isolation/plugin-worker /tmp/plugin4396-2-324.592435.sock /home/REDACTED/work/cli-forge/cli-forge/node_modules/.pnpm/nx@22.6.3_@swc-node+register@1.11.1_@swc+core@1.15.8_@swc+helpers@0.5.18__@swc+types@0._08fcaebe47e144ae1496eaa205fa2254/node_modules/nx/src/plugins/project-json/build-nodes/project-json(dns block)If you need me to access, download, or install something from one of these locations, you can either: