dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Switch CLI to use `tyro`

Open scottstanie opened this issue 7 months ago • 2 comments

The dolphin config tool is both long (in the number of options you can specify) but also incomplete/out of date.

This swtiches the cli to use tyro, allowing us to have a single source of truth for the large configuration options/ CLI functions with many arguments. While it adds a dependency, possibilities for making CLI tools to use dolphin are

  1. use argparse
  • Pros: Standard library.
  • Cons: no types. Duplicated long argument lists. Duplicated Help texts and descriptions
  1. Use an external CLI tool (there are many)
  • Pros: (in the best case) Write the function/config object once in python
  • Cons: new dependency

https://brentyi.github.io/tyro/#why-tyro gives a succinct summary of the benefits. I have found tyro to be the best implementation of all the attempts to "automate CLI tools from existing functions/objects".

This will make addressing #361 #510 much simpler.

scottstanie avatar Apr 25 '25 13:04 scottstanie