autocommand
A library to create a command-line program from a function
Decision gist · record as of 2026-08-14
Yes, for simple scripts and utilities. Autocommand is mature, dependency-free, and solves a real problem—eliminating 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.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or later.
- Low friction: pure Python wheel with no runtime dependencies.
- Maintenance is dormant—last release was 2022-11-18 and last commit 2024-04-04—but the package is marked Mature and has been stable since its 2015 release.
License · maintenance · safety
LGPLv3 (copyleft) — Licensed under LGPLv3 (copyleft). Any derivative work or modification must be released under compatible terms; static linking or bundling may trigger copyleft obligations depending on how the package is integrated.
last release 2022-11-18 (1365 days) · last repo commit 2024-04-04 · 57 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,475,808 downloads/mo, #3,862 on PyPI
Alternatives
Verify before relying
from autocommand import autocommand
@autocommand(__name__)
def echo(thing):
print(thing)
# Run: python script.py hello- Whether the package works correctly with Python versions beyond 3.7 despite no recent releases.
- Whether dormant maintenance status affects real-world reliability for new projects.
What it is and 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—parameters, type annotations, and defaults—and 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.
The 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.
Use it for
- 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.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, for simple scripts and utilities.
Autocommand is mature, dependency-free, and solves a real problem—eliminating 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.
Install
autocommand on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Maintenance is dormant—last release was 2022-11-18 and last commit 2024-04-04—but the package is marked Mature and has been stable since its 2015 release.
Requires Python 3.7 or later.
License in practice
Licensed under LGPLv3 (copyleft). Any derivative work or modification must be released under compatible terms; static linking or bundling may trigger copyleft obligations depending on how the package is integrated.
Quickstart
from autocommand import autocommand
@autocommand(__name__)
def echo(thing):
print(thing)
# Run: python script.py hello
Verify before relying
- Whether the package works correctly with Python versions beyond 3.7 despite no recent releases.
- Whether dormant maintenance status affects real-world reliability for new projects.
Package facts
| License | LGPLv3 copyleft |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Dormant 1,365 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,475,808 / month, #3,862 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 6 - MatureIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: autocommand-2.2.2-py3-none-any.whl
Tags
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 › “argparse from function signature”
- autocommandAutocommand converts a Python function into a command-line program by…
- entrypoint2Converts Python function signatures and docstrings into command-line…
- clizeClize turns Python functions into command-line interfaces…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
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.
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.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
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.
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.
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.
See also plac · arguably · argh · pyct · entrypoint2 · mando · clize · pydantic-argparse · python-tools-scripts · decli