Strongly typed, zero-effort CLI interfaces
Documentation
•
pip install tyro
tyro
is a tool for generating command-line
interfaces and configuration objects in Python.
Our core API, tyro.cli()
,
dataclasses
, pydantic
, and attrs
structures.For advanced users, it also supports:
bash
, zsh
, and tcsh
.tyro.conf.*
).For examples and the API reference, see our documentation.
tyro
is designed to be lightweight enough for throwaway scripts, while
facilitating type safety and modularity for larger projects. Examples:
nerfstudio-project/nerfstudio
|
Open-source tools for neural radiance fields. |
Sea-Snell/JAXSeq
|
Library for distributed training of large language models in JAX. |
kevinzakka/obj2mjcf
|
Interface for processing composite Wavefront OBJ files for Mujoco. |
blurgyy/jaxngp
|
CUDA-accelerated implementation of instant-ngp, in JAX. |
NVIDIAGameWorks/kaolin-wisp
|
PyTorch library for neural fields. |
autonomousvision/sdfstudio
|
Unified framework for surface reconstruction. |
openrlbenchmark/openrlbenchmark
|
Collection of tracked experiments for reinforcement learning. |
tyro
bakes many opinions into its design decisions. If any of them don't make
sense, feel free to file an issue!
You might also consider one of many alternative libraries. Some that we particularly like:
We also have some notes on tyro
's design goals and other alternatives in the
docs here.