--- id: argdantic version: "1.3.3" license: unclear license_treatment: permissive maintenance: dormant --- # argdantic — Typed command line interfaces with argparse and pydantic License: permissive · Maintenance: dormant · Downloads: 120.3K/mo ## What it is and what it does argdantic is a thin wrapper around argparse that uses pydantic models to define and validate command-line arguments. Instead of manually wiring up argument parsing and validation, you decorate functions with type hints and pydantic models, and argdantic automatically generates a CLI with help text, type checking, and field validation. It supports nested pydantic models for complex argument structures and nested commands for building hierarchical CLIs. The package integrates with pydantic's settings system to pull arguments from multiple sources—environment variables, .env files, JSON, YAML, and TOML—without additional boilerplate. It targets developers who want modern, type-safe CLIs without the verbosity of manual argparse setup, and works across Python 3.8 through 3.12. Use it for: - Build a typed CLI tool where arguments are validated as pydantic models before your function runs - Create nested command hierarchies (subcommands) with shared argument validation logic - Load CLI arguments from environment variables or config files alongside command-line flags - Enforce argument types and constraints at parse time, catching errors before your code runs ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Builds typed command-line interfaces by combining argparse with pydantic models, enabling automatic validation and nested command hierarchies from Python type hints. Yes, if you are building a CLI and want pydantic's validation without manual argparse wiring. The low install friction and permissive license make it a safe choice. However, the 581-day dormancy means you should verify compatibility with your target pydantic version and Python release before committing to a production tool; consider pinning the version if you adopt it. ## Install pip install argdantic uv add argdantic poetry add argdantic ## Installing argdantic Before you install: Low friction install with only pydantic and pydantic-settings as runtime dependencies. Package is dormant (581 days since last release) but was actively maintained through early 2025. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions. Quickstart: pip install argdantic from argdantic import ArgParser parser = ArgParser() @parser.command() def greet(name: str, count: int = 1): for _ in range(count): print(f"Hello {name}") if __name__ == "__main__": parser() Verify before relying: - Whether the 581-day dormancy affects compatibility with recent pydantic versions or Python releases - Availability and completeness of documentation at the project homepage ## Package facts - License: not declared (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 120.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags typed CLI with pydantic, argparse type validation, command line interface builder, nested CLI commands, pydantic CLI parser, cli-builder, type-safe [View on SkillFed](https://skillfed.io/packages/argdantic) · [View on PyPI](https://pypi.org/project/argdantic/)