Closed b4rlw closed 5 months ago
Hi, sorry for missing this!
I'm not sure about run
and list
specifically, but this example might be relevant to you: https://brentyi.github.io/tyro/examples/02_nesting/05_subcommands_func/
You could pass tyro.extras.subcommand_cli_from_dict()
a dictionary that maps each report name to its respective main function.
Thanks for the guidance, I'll try that!
I'm interested in building a centralised CLI for a report scripts repo. The repo is structured such that each report is its own module with a main function, and a report can have args that are unique only to it.
Does Tyro support any way of amalgamating all those main functions into a centralised CLI, perhaps with "run" and "list" subcommands, or would I need to build this more manually with argparse?