TanklesXL / glint

Gleam command-line argument parsing with flags and automated help text generation.
https://hex.pm/packages/glint
Apache License 2.0
48 stars 7 forks source link

✨ Add a `with_description` builder for the overall program. #22

Closed hayleigh-dot-dev closed 2 months ago

hayleigh-dot-dev commented 6 months ago

For some hand-formatted cli help text, I've found it useful to include a brief description of the program at the top (see below). I think glint could benefit from similar functionality.

Build and bundle Lustre applications and components for deployment and use
outside of Gleam.

Usage:
  gleam run -m lustre/build <command>

Options:
  -- --help   Show this help message.
  --minify    Minify the output.

Commands:
  app         Build a complete Lustre app for deployment.
  component   Bundle a Lustre component for use in other Web apps.
TanklesXL commented 4 months ago

Interesting idea! Would this conflict with the help text generated when a command is assigned to the root? (i.e. glint.add([],...)) since the root command allows you to specify a description as well