$npx skillfedfor your agent

argparse-dataclass

Declarative CLIs with argparse and dataclasses

With conditionsPyPI Software DevelopmentReleased Jun 20231.5M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — argparse_dataclass-2.0.0-py3-none-any.whl
v2.0.0 · released 2023-06-11 · Python >=3.8

Yes, if you are starting a new CLI project or refactoring an existing one and want to reduce argparse boilerplate. The library is stable, has no dependencies, and works with modern Python versions. However, be aware that maintenance is minimal—the last release was in mid-2023 and the repository shows no recent activity. If you need active support, subcommands, or mutually exclusive groups, consider whether a more actively maintained alternative suits your needs.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later.
  • Low friction: pure Python, no runtime dependencies, and distributed as a wheel.
  • However, the package is aging—last release was 2023-06-11 and no commits since 2025-06-02—so expect limited active maintenance.

License · maintenance · safety

permissive license (permissive) — MIT license (permissive) means you can use, modify, and distribute the package freely in commercial and open-source projects with minimal restrictions.

last release 2023-06-11 (1160 days) · last repo commit 2025-06-02 · 97 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,482,283 downloads/mo, #3,848 on PyPI

Verify before relying

from dataclasses import dataclass
from argparse_dataclass import ArgumentParser

@dataclass
class Options:
    name: str
    verbose: bool = False

parser = ArgumentParser(Options)
args = parser.parse_args(['--name', 'example', '--verbose'])
print(args)  # Options(name='example', verbose=True)
  • Whether subcommands and mutually exclusive groups (marked unimplemented) are planned or abandoned.
  • Current maintenance status and likelihood of bug fixes or feature additions post-2023.
Same gist for agents: .md · .json

What it is and what it does

argparse_dataclass bridges dataclasses and argparse to let you define CLI arguments as typed dataclass fields instead of writing repetitive argparse setup code. When you decorate a dataclass with its ArgumentParser, the library automatically generates argument definitions from field types, defaults, and metadata—booleans become flags, integers and strings become typed options, and Literal types create choice constraints. You call parse_args() as you would with standard argparse, but get back a populated dataclass instance instead of a Namespace object.

The package handles positional arguments, boolean flags, simple scalar types, default values, and choice-based options. It supports custom type converters via field metadata, optional fields, required flags, and parse_known_args() for partial parsing. Subcommands and mutually exclusive groups are not yet implemented. With no runtime dependencies and low install friction, it's a lightweight alternative to heavier CLI frameworks when you want argparse's simplicity with less boilerplate.

Use it for

  • Define a tool's CLI arguments as a single dataclass, reducing argument parser setup code and improving type safety.
  • Build scripts that need both positional and optional arguments with clear type hints and default values.
  • Create command-line tools where the argument structure is stable and you want a single source of truth for CLI schema.
  • Parse CLI arguments into a typed object for easier downstream validation and use in your application logic.
  • Migrate existing argparse code to a more declarative style without rewriting the entire parser.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are starting a new CLI project or refactoring an existing one and want to reduce argparse boilerplate.

The library is stable, has no dependencies, and works with modern Python versions. However, be aware that maintenance is minimal—the last release was in mid-2023 and the repository shows no recent activity. If you need active support, subcommands, or mutually exclusive groups, consider whether a more actively maintained alternative suits your needs.

Install

argparse-dataclass on PyPI

Before you install

Low friction: pure Python, no runtime dependencies, and distributed as a wheel. However, the package is aging—last release was 2023-06-11 and no commits since 2025-06-02—so expect limited active maintenance.

Requires Python 3.8 or later.

License in practice

MIT license (permissive) means you can use, modify, and distribute the package freely in commercial and open-source projects with minimal restrictions.

Quickstart

from dataclasses import dataclass
from argparse_dataclass import ArgumentParser

@dataclass
class Options:
    name: str
    verbose: bool = False

parser = ArgumentParser(Options)
args = parser.parse_args(['--name', 'example', '--verbose'])
print(args)  # Options(name='example', verbose=True)

Verify before relying

  • Whether subcommands and mutually exclusive groups (marked unimplemented) are planned or abandoned.
  • Current maintenance status and likelihood of bug fixes or feature additions post-2023.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 1,160 days since the last release
Last repo commit
First released
Downloads1,482,283 / month, #3,848 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: argparse_dataclass-2.0.0-py3-none-any.whl

Tags

Capabilities
dataclass command line parserargparse declarative CLICLI argument parsing with dataclassestype-safe argument parsingpython cli builderdataclass to argparsedeclarative command line interface
Topics
cli-builderargparse-wrapperdataclass-integration

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “dataclass command line parser”

  • argparse-dataclassBuilds command-line interfaces declaratively by combining Python…
  • draccusDraccus parses command-line arguments and configuration files into…
  • tyrotyro generates command-line interfaces and configuration objects…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also argh · decli · simple-parsing · typed-argument-parser · flexparser · draccus · arguably · tyro · jsonargparse · dataclasses