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

From Discord: Customizing Help Format in Effect Typescript Library CLI #4223

Open
effect-bot opened this issue Jan 8, 2025 · 1 comment
Open
Labels

Comments

@effect-bot
Copy link

Summary

The user is requesting the ability to customize the help format output in the Effect Typescript Library CLI. They desire a more compact and readable format by altering the default double line spacing, changing case styles, headers, and rearranging option descriptions for clarity and conciseness. Specifically, they want:

  1. A condensed header description that includes both the CLI name and version on a single line.
  2. Usage instructions presented in a more concise format.
  3. Options listed with their short and long forms on the same line (e.g., "-h, --help") with immediate short descriptions.
  4. Removal of redundant information like the listing of possible values when it's already clear.
  5. Indication of whether an option is required or optional, preferably using "(Optional)" or "(Required)" markers.
  6. Overall cleaner and more intuitive formatting with fewer extra lines.

Key Takeaways:

  • They prefer concise and less repetitive help documentation.
  • Clarity in presenting the necessity of options is important.
  • There should be flexibility in customizing the help output format.

Discord thread

https://discord.com/channels/795981131316985866/1326392876682182676

@gcanti gcanti added the cli label Jan 8, 2025
@nspaeth
Copy link
Contributor

nspaeth commented Jan 8, 2025

Additionally

const SomeArg = Args.boolean({ name: 'Some Arg' })
const SomeArg2 = Args.boolean({ name: 'Some Arg2' })

Turns into the following, with a lot of empty space:

USAGE

$ my-command <Some Arg> true | false <Some Arg2> true | false

ARGUMENTS

<Some Arg>

  A true or false value.

<Some Arg2>

  A true or false value.
 

But worse, when using a terminal with a black background, it looks like:

USAGE

$ my-command <Some Arg> true | false <Some Arg2> true | false

ARGUMENTS



  A true or false value.



  A true or false value.
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants