Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow root command help to be configurable #1284

Open
NikhilVerma opened this issue Jan 2, 2025 · 0 comments
Open

Allow root command help to be configurable #1284

NikhilVerma opened this issue Jan 2, 2025 · 0 comments
Labels
--help output Related to --help output help wanted Accepting PRs

Comments

@NikhilVerma
Copy link

Is your feature request related to a problem? Please describe.

Right now, if I want to add additional examples to my root command the only option I have is to convert it to a single command. Otherwise apart from adding newlines into description there isn't much I can do.

I noticed that Oclif core has some functionality which could potentially be modified to allow this.

Files to reference:

  1. src/help/root.ts
  2. src/help/index.ts

They have protected methods like formatRoot and protected description in Root which could potentially take additional config like reading description from markdown.

Describe the solution you'd like

The solution can be (with lowest hanging fruit to highest)

  1. Remove protected from formatRoot and allow users to extend it
  2. Allow using index.ts files in src/commands without needing the SINGLE_COMMAND_CLI_SYMBOL unless the user has specified in their config.

Describe alternatives you've considered

I am trying to work around this by writing some hook and modifying the pjson object to add multiline colored documentation.

@NikhilVerma NikhilVerma changed the title Allow root command to be configurable Allow root command help to be configurable Jan 2, 2025
@mdonnalley mdonnalley added --help output Related to --help output help wanted Accepting PRs labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
--help output Related to --help output help wanted Accepting PRs
Projects
None yet
Development

No branches or pull requests

2 participants