Skip to content

Allow root command help to be configurable #1284

@NikhilVerma

Description

@NikhilVerma

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions