Effect CommunityEC
Effect Community13mo ago
12 replies
spaethnl

Customizing Help Format in Effect Typescript Library CLI

I'd like to follow up on this question Feedback on New CLI: Positive API Changes, but Unhappy with Requiring Options Before Positional A... . Specifically, this part.

Also would it be possible to pass in some formatting options? In particular I'd like to show a more compact help format without the double line spacing. Ideally also configuring other aspects, like all caps, and headers would be amazing. For instance instead of:
Hello World CLI

Hello World CLI v1.0.0

USAGE

$ hello-world

OPTIONS

--completions sh | bash | fish | zsh

  One of the following: sh, bash, fish, zsh

  Generate a completion script for a specific shell

  This setting is optional.

(-h, --help)

  A true or false value.

  Show the help documentation for a command

  This setting is optional.


A more compact format with exactly the same fields would result in:
Hello World CLI (Hello World CLI v1.0.0)

Usage: hello-world <options>

Options:
--completions sh | bash | fish | zsh
  One of the following: sh, bash, fish, zsh
  Generate a completion script for a specific shell
  This setting is optional.

(-h, --help)
  A true or false value.
  Show the help documentation for a command
  This setting is optional.


Is this currently possible?
Was this page helpful?