skillfed

entrypoint2

easy to use command-line interface for python modules

entrypoint2 v1.1 568.7K downloads/30d#5,965 on PyPI9
Permissive license BSD DORMANT released

What it is and what it does

entrypoint2 is a decorator-based CLI generator that reads a Python function's type hints, default values, and docstring to automatically build an argparse command-line interface. You add a single @entrypoint decorator to an existing function, and the package generates a full CLI with positional and optional arguments, type conversion, help text, automatic --debug and --version flags, and short flag aliases—all while preserving the original function's behavior so it can still be called programmatically or used with Sphinx autodoc.

It's designed for rapid prototyping and simple CLIs where you want to avoid writing boilerplate argparse code. The package has no runtime dependencies, installs easily, and supports Python 3.6 through 3.12. Maintenance is dormant (last release June 2022) but the codebase is stable with no known security issues.

Use it for:

  • Quickly turn a utility function into a command-line tool without writing argparse boilerplate.
  • Generate CLI help and argument handling automatically from function signatures and docstrings.
  • Build simple scripts where the same function needs to be callable both from CLI and as an imported module.
  • Prototype command-line tools during development before committing to a full CLI framework.
  • Create repeating arguments (e.g., multiple file inputs) with minimal code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Python function signatures and docstrings into command-line interfaces using a single decorator, with automatic argparse configuration.

Yes, if you need a lightweight decorator-based CLI for simple scripts or prototypes and don't require active maintenance. The package is stable, has no dependencies, and works across modern Python versions. No, if you need ongoing support, active bug fixes, or a more feature-rich CLI framework for production tools.

Install

entrypoint2 on PyPI

pip

pip install entrypoint2

uv

uv add entrypoint2

poetry

poetry add entrypoint2

Installing entrypoint2

Before you install

Low friction: pure Python wheel with no runtime dependencies. Dormant maintenance (last release 2022-06-11, last commit 2023-11-04) but no known vulnerabilities and stable across supported Python versions.

License in practice

BSD license is permissive; you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.

Quickstart

from entrypoint2 import entrypoint

@entrypoint
def hello(message):
    print(message)

# Call from CLI: python3 -m module_name hello "hi"

Verify before relying

  • Whether the package works correctly with Python 3.12 despite being marked as supporting it in classifiers but with no recent release to confirm.
  • Current state of the GitHub repository and whether it accepts contributions or is effectively abandoned.

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,525 days since the last release
Last repo commit
First released
Downloads 568,656/month — #5,965 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: entrypoint2-1.1-py2.py3-none-any.whl

Keywords: argparse, decorator, optparse, signature, command-line

License :: OSI Approved :: BSD LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

python decorator cliargparse from function signaturecommand line interface generatorcli from docstringautomatic argument parser
cli-generatorargparse-wrapperdecorator

More Utilities packages