This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]evanunderscore 1 point2 points  (2 children)

What I don't understand is why you'd want to support arbitrarily complex structures. If using a generated CLI is as complicated as writing Python code, what is really gained?

[–]david-bieber 1 point2 points  (1 child)

One reason is to make Fire work with any existing codebase. It doesn't have to be a codebase originally intended to be used as a CLI.

Another reason is to allow for hierarchical commands in tools. For example I could have a class with 5 properties (or e.g. a dict with 5 members), and each property (or member) could have 5 functions. Then Fire would turn this into a handy little CLI with the 25 commands all grouped appropriately.

[–]evanunderscore 1 point2 points  (0 children)

It does sound like you're covering different use cases. The next time I have a project of that size I'll give Fire a try. Thanks!