{"id":13532967,"url":"https://github.com/brentyi/tyro","last_synced_at":"2026-04-02T23:23:59.694Z","repository":{"id":39484963,"uuid":"413741832","full_name":"brentyi/tyro","owner":"brentyi","description":"CLI interfaces \u0026 config objects, from types","archived":false,"fork":false,"pushed_at":"2025-05-09T13:07:26.000Z","size":74938,"stargazers_count":627,"open_issues_count":16,"forks_count":33,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-09T13:59:51.745Z","etag":null,"topics":["argparse","argument-parsing","dataclasses"],"latest_commit_sha":null,"homepage":"https://brentyi.github.io/tyro","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brentyi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-05T08:54:08.000Z","updated_at":"2025-05-09T13:06:30.000Z","dependencies_parsed_at":"2023-09-26T22:11:22.111Z","dependency_job_id":"572f1b40-2af4-4e56-b8a4-f0baa75fcea6","html_url":"https://github.com/brentyi/tyro","commit_stats":{"total_commits":509,"total_committers":15,"mean_commits":33.93333333333333,"dds":"0.035363457760314354","last_synced_commit":"17042845a18a6b12f22993e013f99d8715cde8ad"},"previous_names":["brentyi/dcargs"],"tags_count":147,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentyi%2Ftyro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentyi%2Ftyro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentyi%2Ftyro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brentyi%2Ftyro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brentyi","download_url":"https://codeload.github.com/brentyi/tyro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254069910,"owners_count":22009558,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argparse","argument-parsing","dataclasses"],"created_at":"2024-08-01T07:01:15.454Z","updated_at":"2026-04-02T23:23:59.685Z","avatar_url":"https://github.com/brentyi.png","language":"Python","readme":"# tyro\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://codecov.io/gh/brentyi/tyro\"\u003e\n        \u003cimg alt=\"codecov\" src=\"https://codecov.io/gh/brentyi/tyro/branch/main/graph/badge.svg\" /\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/tyro/\"\u003e\n        \u003cimg src=\"https://static.pepy.tech/personalized-badge/tyro?period=total\u0026units=INTERNATIONAL_SYSTEM\u0026left_color=GRAY\u0026right_color=GREEN\u0026left_text=downloads\" alt=\"PyPI Downloads\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/tyro/\"\u003e\n        \u003cimg alt=\"codecov\" src=\"https://img.shields.io/pypi/pyversions/tyro\" /\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n    \u003cem\u003e\u003ca href=\"https://brentyi.github.io/tyro\"\u003eDocumentation\u003c/a\u003e\u003c/em\u003e\n    \u0026nbsp;\u0026nbsp;\u0026bull;\u0026nbsp;\u0026nbsp;\n    \u003cem\u003e\u003ccode\u003epip install tyro\u003c/code\u003e\u003c/em\u003e\n\u003c/p\u003e\n\n\u003cstrong\u003e\u003ccode\u003etyro.cli()\u003c/code\u003e\u003c/strong\u003e is a tool for generating CLI\ninterfaces from type-annotated Python.\n\nWe can define configurable scripts using functions:\n\u003cbr /\u003e\n\u003cimg width=\"836\" height=\"322\" alt=\"image\" src=\"https://github.com/user-attachments/assets/5347693e-b126-4b05-8ef6-4ffe6cbb22f2\" /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\nOr instantiate configs defined using tools like `dataclasses`, `pydantic`, and `attrs`:\n\u003cbr /\u003e\n\u003cimg width=\"836\" height=\"334\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2c27065d-073e-4c59-9df9-20d153b4a33b\" /\u003e\n\u003cbr /\u003e\n\nOther features include helptext generation, nested structures, subcommands, and\nshell completion. For examples and the API reference, see our\n[documentation](https://brentyi.github.io/tyro).\n\n### Why `tyro`?\n\n1. **Define things once.** Standard Python type annotations, docstrings, and default values are parsed to automatically generate command-line interfaces with nice helptext.\n\n2. **Static types.** Unlike tools dependent on dictionaries, YAML, or dynamic\n   namespaces, arguments populated by `tyro` are better undestood by IDEs and\n   language servers, as well as static checking tools like `pyright` and `mypy`.\n\n3. **Modularity.** `tyro` supports hierarchical configurations, which make it\n   easy to decentralize definitions, defaults, and documentation.\n\n### In the wild\n\n`tyro` is designed to be lightweight for throwaway scripts, while\nimproving maintainability for larger projects. Examples:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/nerfstudio-project/nerfstudio/\"\u003e\n        nerfstudio-project/nerfstudio\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/nerfstudio-project/nerfstudio?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      Open-source tools for neural radiance fields.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/Sea-Snell/JAXSeq/\"\u003e\n        Sea-Snell/JAXSeq\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/Sea-Snell/JAXSeq?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eTrain very large language models in Jax.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/kevinzakka/obj2mjcf\"\u003e\n        kevinzakka/obj2mjcf\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/kevinzakka/obj2mjcf?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eInterface for processing OBJ files for Mujoco.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/blurgyy/jaxngp\"\u003e\n        blurgyy/jaxngp\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/blurgyy/jaxngp?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003e\n      CUDA-accelerated implementation of\n      \u003ca href=\"https://nvlabs.github.io/instant-ngp/\"\u003einstant-ngp\u003c/a\u003e, in JAX.\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/NVIDIAGameWorks/kaolin-wisp\"\u003e\n        NVIDIAGameWorks/kaolin-wisp\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/NVIDIAGameWorks/kaolin-wisp?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003ePyTorch library for neural fields.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/autonomousvision/sdfstudio\"\u003e\n        autonomousvision/sdfstudio\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/autonomousvision/sdfstudio?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eUnified framework for surface reconstruction.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/openrlbenchmark/openrlbenchmark\"\u003e\n        openrlbenchmark/openrlbenchmark\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/openrlbenchmark/openrlbenchmark?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eCollection of tracked experiments for reinforcement learning.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/vwxyzjn/cleanrl\"\u003e\n        vwxyzjn/cleanrl\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/vwxyzjn/cleanrl?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eSingle-file implementation of deep RL algorithms.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/pytorch-labs/LeanRL/\"\u003e\n        pytorch-labs/LeanRL\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/pytorch-labs/LeanRL?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eFork of CleanRL, optimized using PyTorch 2 features.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/pytorch/torchtitan\"\u003e\n        pytorch/torchtitan\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/pytorch/torchtitan?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003ePyTorch-native platform for training generative AI models.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/KwaiVGI/LivePortrait\"\u003e\n        KwaiVGI/LivePortrait\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/KwaiVGI/LivePortrait?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eStitching and retargeting for portraits.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/Physical-Intelligence/openpi/\"\u003e\n        Physical-Intelligence/openpi\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/Physical-Intelligence/openpi?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eOpen-source models for robotics.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/NVIDIA/Isaac-GR00T\"\u003e\n        NVIDIA/Isaac-GR00T\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/NVIDIA/Isaac-GR00T?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eFoundation model for generalist robots.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/haosulab/ManiSkill\"\u003e\n        haosulab/ManiSkill\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/haosulab/ManiSkill?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eGPU-parallelized simulation + learning for robot manipulation.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/mujocolab/mjlab\"\u003e\n        mujocolab/mjlab\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/mujocolab/mjlab?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eLightweight, modular abstractions for RL and sim-to-real robotics.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/amazon-far/holosoma\"\u003e\n        amazon-far/holosoma\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/amazon-far/holosoma?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eHumanoid robotics framework for RL training and deployment.\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://github.com/MalcolmMielle/bark_monitor\"\u003e\n        MalcolmMielle/bark_monitor\n        \u003cbr /\u003e\u003cimg\n          alt=\"GitHub stars\"\n          src=\"https://img.shields.io/github/stars/MalcolmMielle/bark_monitor?style=social\"\n        /\u003e\n      \u003c/a\u003e\n    \u003c/td\u003e\n    \u003ctd\u003eShow your neighbor that your dog doesn't bark!\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### Alternatives\n\n`tyro` is opinionated. If any design decisions don't make sense, feel free to\nfile an issue!\n\nYou might also consider one of many alternative libraries. Some that we\nlike:\n\n- [cappa](https://github.com/dancardin/cappa) offers a similar core feature\n  set but with very different ergonomics. It looks polished and well-maintained!\n- [cyclopts](https://github.com/BrianPugh/cyclopts) and\n  [defopt](https://defopt.readthedocs.io/) has very comprehensive type\n  annotation support and a heavier emphasis on subcommand generation.\n- [simple-parsing](https://github.com/lebrice/SimpleParsing) and\n  [jsonargparse](https://github.com/omni-us/jsonargparse) provide deeper\n  integration with configuration file formats like YAML and JSON.\n- [clipstick](https://github.com/sander76/clipstick), which focuses on\n  simplicity + generating CLIs from Pydantic models.\n- [datargs](https://github.com/roee30/datargs) provides a minimal API for\n  dataclasses.\n- [fire](https://github.com/google/python-fire) and\n  [clize](https://github.com/epsy/clize) support arguments without type\n  annotations.\n\nThere are also some options that directly extend `tyro`:\n\n- [mininterface](https://github.com/CZ-NIC/mininterface) simultaneously generates\n  GUI, TUI, web, CLI, and file-based program configuration.\n- [manuscript](https://github.com/stllfe/manuscript) generates CLI interfaces from\n  a simple block of configuration variables.\n\nWe also have some notes on `tyro`'s design goals and other alternatives in the\ndocs [here](https://brentyi.github.io/tyro/goals_and_alternatives/).\n","funding_links":[],"categories":["Python","[Python](https://www.python.org/)","Command-Line Interface"],"sub_categories":["Useful awesome list for Go cli"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentyi%2Ftyro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrentyi%2Ftyro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrentyi%2Ftyro/lists"}