{"repo":"explosion/radicli","free":true,"listed":false,"github":"https://github.com/explosion/radicli","clone":"git clone https://github.com/explosion/radicli.git","description":"🕊️ Radically lightweight command-line interfaces","language":"Python","stars":110,"topics":["argparse","cli","command-line","command-line-interface","python"],"license":"MIT","category":"cli-tools","readme_excerpt":"radicli: Radically lightweight command-line interfaces radicli is a small, zero-dependency Python package for creating command line interfaces, built on top of Python's argparse module. It introduces minimal overhead, preserves your original Python functions and uses type hints to parse values provided on the CLI. It supports all common types out-of-the-box, including complex ones like List[str] , Literal and Enum , and allows registering custom types with custom converters, as well as custom CLI-only error handling , exporting a static representation for faster --help and errors and auto-generated Markdown documentation . Important note: This package aims to be a simple option based on the requirements of our libraries. If you're looking for a more full-featured CLI toolkit, check out typer , click or plac . ⏳ Installation Note that radicli currently requires Python 3.8+ . 👩‍💻 Usage The Radicli class sets up the CLI and provides decorators for commands and subcommands. The Arg dataclass can be used to describe how the arguments should be presented on the CLI. Types and defaults are read from the Python functions. You typically don't have to change anything about how you implement your Python functions to make them available as a CLI command. If a file only specifies a single command (with or without subcommands), you can optionally leave out the command name. So the above example script can also be called like this: Alternatively, you can also use Radicli.call : Subcommand","default_branch":null,"files":null,"tree":[],"storefront":"/r/explosion","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/explosion/radicli/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}