$npx skillfedfor your agent

targ

Build a Python CLI for your app, just using type hints and docstrings.

Worth itPyPI Build ToolsReleased Jul 2026690.2K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — targ-0.7.0-py3-none-any.whl
v0.7.0 · released 2026-07-19 · Python >=3.10.0 · 2 runtime deps: colorama, docstring-parser

Yes. targ is a lightweight, actively maintained tool that solves a real problem—turning functions into CLIs with zero special syntax. Low install friction, permissive license, no known vulnerabilities, and recent activity make it a safe choice for projects that need simple CLI generation. Best suited for straightforward use cases; verify whether it handles your specific type complexity before adopting for complex argument scenarios.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or later.
  • Low friction: pure Python wheel with only two lightweight dependencies (colorama for terminal colors and docstring-parser for documentation extraction).
  • Actively maintained with a recent release 26 days ago.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

last release 2026-07-19 (26 days) · last repo commit 2026-07-25 · 22 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 690,227 downloads/mo, #5,330 on PyPI

Verify before relying

pip install targ

from targ import CLI

def add(a: int, b: int):
    """Add two numbers."""
    print(a + b)

if __name__ == "__main__":
    cli = CLI()
    cli.register(add)
    cli.run()
  • Whether the package handles complex type hints (unions, generics, optional types) beyond basic int/str/bool.
  • Support for subcommands, command groups, or nested CLI hierarchies.
  • Whether environment variables or configuration files can be integrated with the CLI.
  • Performance characteristics when registering many functions or handling large argument sets.
Same gist for agents: .md · .json

What it is and what it does

targ is a CLI framework that builds command-line interfaces directly from Python function signatures and docstrings. You register type-annotated functions with a CLI object, and targ automatically generates argument parsing, help text, and command dispatch—no special syntax or configuration files needed. The package extracts parameter documentation from docstrings and uses type hints to determine argument types and validation.

It's designed for developers who want to expose Python functions as CLI tools without learning argparse or click's decorator syntax. The framework depends on colorama for terminal output formatting and docstring-parser to extract parameter descriptions from docstrings. It supports Python 3.10 through 3.14 and has been actively maintained since its 2020 release.

Use it for

  • Quickly expose internal Python functions as command-line tools for scripting or automation without writing CLI boilerplate.
  • Build simple admin or utility CLIs where function signatures naturally map to command arguments.
  • Generate self-documenting CLI tools where help text is automatically derived from existing docstrings.
  • Prototype CLI applications during development when you want minimal overhead before committing to a larger framework.

Worth the install?

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

Worth it

Yes.

targ is a lightweight, actively maintained tool that solves a real problem—turning functions into CLIs with zero special syntax. Low install friction, permissive license, no known vulnerabilities, and recent activity make it a safe choice for projects that need simple CLI generation. Best suited for straightforward use cases; verify whether it handles your specific type complexity before adopting for complex argument scenarios.

Install

targ on PyPI

Before you install

Low friction: pure Python wheel with only two lightweight dependencies (colorama for terminal colors and docstring-parser for documentation extraction). Actively maintained with a recent release 26 days ago.

Requires Python 3.10 or later.

License in practice

MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install targ

from targ import CLI

def add(a: int, b: int):
    """Add two numbers."""
    print(a + b)

if __name__ == "__main__":
    cli = CLI()
    cli.register(add)
    cli.run()

Verify before relying

  • Whether the package handles complex type hints (unions, generics, optional types) beyond basic int/str/bool.
  • Support for subcommands, command groups, or nested CLI hierarchies.
  • Whether environment variables or configuration files can be integrated with the CLI.
  • Performance characteristics when registering many functions or handling large argument sets.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10.0
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
coloramadocstring-parser
MaintenanceActively maintained 26 days since the last release
Last repo commit
First released
Downloads690,227 / month, #5,330 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPython

Evidence: targ-0.7.0-py3-none-any.whl

Tags

Capabilities
cli from type hintsautomatic command line interfacedocstring to clipython function to clitype annotation cli buildercli generator pythonargparse alternative
Topics
cli-generationtype-hintsdocstring-driven

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 › “type annotation cli builder”

  • targGenerates a command-line interface from type-annotated Python…
  • autotypingAutomatically infers and adds type annotations to Python functions…
  • argdanticBuilds typed command-line interfaces by combining argparse with…

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

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also arguably · clize · tyro · argbind · mando · entrypoint2 · docopt · cyclopts · jsonargparse · annotated-doc