--- id: msgspec-click version: "0.2.1" license: unclear license_treatment: unclear maintenance: dormant --- # msgspec-click — Generate Click options from msgspec types License: unclear · Maintenance: dormant · Downloads: 75.0K/mo ## What it is and what it does msgspec-click bridges two Python libraries: msgspec (a fast serialization library with type validation) and click (a command-line interface framework). It lets you define CLI options as msgspec types—typically dataclasses or structs—and automatically generates click decorators from those definitions, eliminating repetitive option declarations. The package is designed for developers who want type-safe CLI applications without manually wiring up each argument and option. Instead of writing click decorators by hand, you define your CLI interface as a msgspec type and let the library generate the boilerplate. It supports Python 3.8 through 3.12 on both CPython and PyPy. Use it for: - Build a CLI tool where all arguments and options are defined once as a msgspec type, then auto-converted to click decorators. - Create type-validated command-line interfaces that catch invalid input at parse time using msgspec's validation. - Reduce boilerplate in multi-command CLI applications by deriving click option groups from structured type definitions. - Prototype CLI tools quickly by defining the interface as Python types rather than writing click decorator chains. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates Click command-line options automatically from msgspec type definitions, reducing boilerplate when building CLI applications with structured type validation. Yes, if you are already using both click and msgspec and want to reduce CLI boilerplate—the install is frictionless and there are no known vulnerabilities. However, proceed cautiously: the project is dormant (last release 689 days ago), has minimal adoption (74957 monthly downloads, rank 14763), and the license metadata is unclear. Use it for new projects only if you are comfortable maintaining a fork or accepting no upstream updates. ## Install pip install msgspec-click uv add msgspec-click poetry add msgspec-click ## Installing msgspec-click Before you install: Low friction install with only two runtime dependencies (click and msgspec). Dormant maintenance status—last release was 689 days ago, so expect no active bug fixes or feature development. License in practice: License treatment is unclear in the metadata. Verify the actual license terms before relying on this package in production. Quickstart: pip install msgspec-click from msgspec import Struct import click from msgspec_click import create_command class Options(Struct): name: str count: int = 1 cmd = create_command(Options) if __name__ == '__main__': cmd() Requires Python 3.8 or later; both click and msgspec must be installed as runtime dependencies. Verify before relying: - Actual license file or SPDX identifier not present in metadata despite MIT reference in description - Whether dormancy signals end-of-life or stable maintenance mode - Real-world stability and usage patterns given low adoption metrics ## Package facts - License: not declared (unclear) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 75.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags click cli option generator, msgspec type to click decorator, automated cli argument parsing, type-driven command line interface, click dataclass integration, structured cli validation, cli-generation, type-driven [View on SkillFed](https://skillfed.io/packages/msgspec-click) · [View on PyPI](https://pypi.org/project/msgspec-click/)