How do we print better usage messages?
I'm not fond of all the extra information that prints when I want help on how to use a command. I find it distracts the user and almost looks like errors. Not sure how to override this behavior from my project myself. Only way I see right now is too fork and modify. Any ideas on how to get better usage messages?
Type: function
String form: <function new at 0x0000000>
File: playground
Line: 62
Docstring: Creates a new playground stack
Usage: playground new NAME
playground new --name NAME
There is not currently a supported way to modify this. As a hack, you could monkey-patch fire.helputils.HelpString and/or fire.helputils.UsageString. Caution though, since this could break down the line.
Also, Fire has a new contributor working on improving precisely this. So, improvements are coming.
any updates about this request?
Thanks for your interest.
Conceptually the improvements will come in two main parts:
- part 1 is improving the default displayed information (removing the clutter, pushing all that excess information into --verbose output, improving the usage output, etc)
- part 2 is about improving configurability
I'm meeting with @joejoevictor on July 25 to discuss the design for part 1. The current plan is that he'll be owning the "part 1" set of improvements. Part 2 discussions are still early (#98).
Part 1 is still a work in progress, and we are actively (but slowly) working toward it.
FWIW, usage is one of the things I noticed when comparing Fire with Click and Plumbum. I did make a few other observations about Fire along the way:
- error messages for invalid types are not user-friendly
- custom types for flexible file processing are available in Click (and argparse)
@dbieber Any update on this? And also can we customize the help message i.e I want to display help message which has the information ,like what the command does.
Same as Dec 14, unfortunately: still a work in progress, and we are actively (but slowly) working toward it. The reason for the slowness is we typically only work on Fire for a short period once a week. But the improvements are coming!, just not quickly. You can see progress so far on master.
This is waaay better now, and the release is going out on Friday (in two days.)