#Is it possible to improve the output of the `--help` screen?

1 messages · Page 1 of 1 (latest)

shrewd briar
#

After weeks of hard work, I'm starting to get something really nice. My new question is about the customization of the dagger call --help output.

I have a very large number of functions and the current output is probably a little indigestible in my case. I would say that the existing output is brilliant when we've a small set of functions and so easy to implement (=in fact, we just need to do nothing since it's fully managed by Dagger).

Do you think it's possible to do some customizations? For example, I've tried to put ANSI notation (033[1;32m%s\033[0m) in my docstring but it's not interpreted.

I'm thinking to:

  • is it possible to customize the display e.g. in three columns (function name, target language, description).
  • it would be nice to be able to put URLs in light grey, language in blue, etc.).
  • ..

Also some functions are returning string (the stdout) and some are returning an object (a Directory one). Is it possible to clearly make the distinction on the screen?

Thank you in advance for any ideas you may have to help my users to faster understand this screen.

muted mulch
#

Looks like you've built a lot! 🤩 I definitely see what you're saying. In Dagger's own dev modules, we have a bit more structure to help with this, but I see the value in a totally flat structure too. For example in dagger's dev module, instead of lint-*, quality-*, etc, we'd have a submodule for each "target" which then translates to subcommands in the CLI. So instead of dagger lint-php it's dagger php lint. And also dagger php --help for the functions specific to that target.

Some of the output formatting I think is limited to what the CLI library can represent, e.g. "command" - "description". I'd definitely like to see the types too, though