{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/5"},{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/4"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/7"}],"enrichment":{"capability":"Autocommand converts a Python function into a command-line program by automatically generating an argparse parser from the function's signature, handling arguments, options, type conversion, and help text generation.","skillfed_tags":["cli-generation","argparse-wrapper","script-automation"],"use_cases":["Convert a utility function into a standalone script without writing argparse boilerplate.","Build simple command-line tools that accept typed arguments with automatic validation and help.","Create file processing scripts (cat, copy, filter) that read from stdin or file paths.","Prototype CLI applications where function signatures naturally map to command arguments.","Add command-line interfaces to existing Python functions with minimal code changes."],"what_it_does":"Autocommand is a decorator-based library that turns a Python function into a fully functional command-line program. It inspects the function's signature\u2014parameters, type annotations, and defaults\u2014and automatically builds an argparse parser that handles positional arguments, optional flags, type conversion, and help text. When the module is run as __main__, autocommand collects command-line arguments, validates them against the function signature, and executes the function with the parsed values.\n\nThe library handles common CLI patterns: trailing arguments via *args, boolean switches with automatic short flags, type coercion with validation, file arguments, and docstring-based help text. It eliminates boilerplate argparse setup for simple scripts, making it useful for quick command-line tools, utility scripts, and small applications where a full framework would be overkill.","worth_installing":"Yes, for simple scripts and utilities. Autocommand is mature, dependency-free, and solves a real problem\u2014eliminating argparse boilerplate for straightforward CLI functions. Dormant maintenance is not a blocker for stable, feature-complete code, but consider it only for scripts where the function-to-CLI mapping is natural. For complex CLIs, subcommands, or plugins, use a more actively maintained framework."},"id":"autocommand","links":{"html":"https://skillfed.io/packages/autocommand","md":"https://skillfed.io/packages/autocommand.md","pypi":"https://pypi.org/project/autocommand/"},"maintenance":{"status":"dormant"},"meta":{"latest_release":"2022-11-18","license_spdx":null,"license_treatment":"copyleft","name":"autocommand","python_support":"supports_current","summary":"A library to create a command-line program from a function"},"popularity":{"monthly_downloads":1475808,"position":3862,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.2.2"}
