clize
Turn functions into command-line interfaces
What it is and what it does
Clize is an argument parser that eliminates boilerplate by deriving CLI interfaces directly from Python function definitions. Instead of writing separate argparse code, you define a function with typed parameters and a docstring, pass it to clize.run(), and get a fully functional command-line tool with automatic help text, option parsing, and subcommand support.
The package works by introspecting function signatures to infer positional arguments, optional flags, and keyword arguments, then generates help messages from docstrings. It supports decorators for composing multiple commands and extending parameter behavior. Runtime dependencies are minimal (sigtools, attrs, od, docutils), and it runs on Python 3.6+ across CPython and PyPy.
Use it for:
- Build a simple CLI tool for a utility function without writing argparse boilerplate.
- Create multi-command CLI applications using decorators to compose related functions.
- Generate self-documenting command-line tools where help text comes directly from docstrings.
- Prototype command-line interfaces quickly during development before committing to a larger framework.
- Add CLI entry points to existing Python libraries by wrapping functions with clize.run().
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Clize turns Python functions into command-line interfaces automatically, generating argument parsing and help text from function signatures and docstrings instead of requiring manual argparse configuration.
Yes, for stable CLI projects. Clize is production-ready and permissively licensed, with low install friction and no known vulnerabilities. Dormant maintenance is acceptable if you need a simple, proven argument parser and do not require active feature development. Not recommended if you need ongoing support or anticipate heavy customization beyond what decorators provide.
Install
clize on PyPI
pip
pip install clizeuv
uv add clizepoetry
poetry add clizeInstalling clize
Before you install
Low install friction with four lightweight runtime dependencies. Dormant maintenance (last commit 2023-11-24, 1132 days ago) but marked Production/Stable; suitable for stable CLI use cases where active development is not expected.
License in practice
MIT license (permissive); you can use, modify, and distribute clize freely in commercial and private projects with minimal restrictions.
Quickstart
pip install clize
from clize import run
def greet(name=None):
"""Greet someone.
:param name: Person to greet
"""
return f'Hello {name or "world"}!'
if __name__ == '__main__':
run(greet)
Verify before relying
- Whether dormant status (no commits since 2023-11-24) poses a risk for future Python version compatibility or security patches.
- Performance characteristics compared to argparse for large CLI applications with many subcommands.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — sigtools, attrs, od, docutils |
| Maintenance | dormant — 1,132 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 207,721/month — #9,543 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: clize-5.0.2-py2.py3-none-any.whl
Keywords: CLI, options, arguments, getopts, getopt, argparse, introspection, flags, decorator, subcommands
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
entrypoint2Converts Python function signatures and…
permissive · top 15,000 on PyPI
mandomando wraps argparse to let you build…
permissive · top 5,000 on PyPI
targGenerates a command-line interface from…
permissive · top 15,000 on PyPI
fireAutomatically generates command-line interfaces…
permissive · top 5,000 on PyPI
argbindArgBind binds function and class arguments to…
permissive · top 15,000 on PyPI
arguablyConverts Python functions and their docstrings…
unclear · top 15,000 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
autocommandAutocommand converts a Python function into a…
copyleft · top 5,000 on PyPI
cleoCleo builds command-line interfaces with…
permissive · top 1,000 on PyPI
decliDecli wraps argparse to let you define…
permissive · top 5,000 on PyPI