# brentyi/tyro

CLI interfaces & config objects, from types

Repository: https://github.com/brentyi/tyro
Canonical: https://ross.abutalabs.com/products/tyro
Homepage: https://brentyi.github.io/tyro
Language: Python
License: MIT
License Family: permissive
Topics: argparse, argument-parsing, dataclasses
Last push: 2026-08-23T01:19:52+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 1793, "days_push": 11, "days_rel": 11, "gap_med": 7.0, "n_releases_24m": 63}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1100, forks 47 (observed 2026-08-28T04:03:35.457778+00:00)

## What it is
tyro is a Python library that generates command-line interfaces and configuration objects from type-annotated Python functions, dataclasses, pydantic models, and attrs classes. It provides helptext generation, nested structures, subcommands, and shell completion while keeping arguments statically typed.

## Use cases
- generate a CLI from a python function's type annotations
- parse command-line arguments into dataclasses or pydantic models
- build nested hierarchical config CLIs for ML training scripts
- add subcommands and shell completion to python scripts
- replace argparse boilerplate with typed config objects
- make script arguments IDE- and mypy-friendly

## When to choose
- you want CLIs defined once from standard Python types, docstrings, and defaults
- you use dataclasses, pydantic, or attrs for configuration
- you need hierarchical configs or subcommands in research/engineering scripts
- static type checking of parsed arguments matters to you

## When to avoid
- you need a full-featured CLI framework with rich interactive prompts
- your project is not Python
- you prefer YAML/dictionary-based configuration over typed arguments

## Facets
- artifact type: library
- maturity: active
- function: cli, developer-tools, configuration-management
- domain: developer-tools
- platform: python, cli, cross-platform
- tags: argparse, dataclasses, pydantic, type-annotations, config-parsing, shell-completion, command-line, automation

## Member repositories
- brentyi/tyro (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:35.457778+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:45:46.917829+00:00, confidence not recorded.
  - readme: https://github.com/brentyi/tyro (fetched 2026-08-28T04:03:35.457778+00:00, sha 998a795b107f)
  - homepage: https://brentyi.github.io/tyro (fetched 2026-08-29T12:49:11.750844+00:00, sha 85fa0dd11d5e)
  - registry_pypi: https://pypi.org/pypi/tyro/json (fetched 2026-08-29T12:49:11.753302+00:00, sha 468f2286173d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
