cliff
Command Line Interface Formulation Framework
What it is and what it does
cliff is a production-stable framework for building command-line applications. It abstracts away common CLI patterns by using Python entry points to dynamically register subcommands, output formatters, and other extensions, letting you focus on command logic rather than argument parsing and help text generation.
The framework integrates with cmd2 for interactive shell support, PrettyTable for formatted output, stevedore for plugin discovery, and PyYAML for configuration. It's designed for teams building complex CLI tools that need consistent structure, extensibility through plugins, and multiple output formats (table, CSV, JSON, etc.) without reimplementing those features for each command.
Use it for:
- Build a multi-command CLI tool (like git or docker) where subcommands are registered via entry points and can be extended by plugins.
- Create an OpenStack-style management CLI where output can be formatted as table, JSON, or YAML without duplicating formatter code.
- Develop an interactive shell application that supports both command-line and REPL modes with consistent command dispatch.
- Build a tool where third-party packages can register new commands or output formatters without modifying the main application.
- Create a CLI for a service or API where you need consistent help text, argument validation, and structured output across many commands.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
cliff is a framework for building command-line programs that use entry points to provide subcommands, output formatters, and other extensions.
Yes. cliff is actively maintained, production-stable, has low install friction, carries no known vulnerabilities, and is in the top 5000 PyPI packages by download volume. Install it if you're building a multi-command CLI tool or need extensibility through entry points; skip it if you're writing a simple single-command script where argparse alone suffices.
Install
cliff on PyPI
pip
pip install cliffuv
uv add cliffpoetry
poetry add cliffInstalling cliff
Before you install
Low install friction with a wheel distribution available. Active maintenance with a release within the last 35 days. Depends on five runtime packages (autopage, cmd2, PrettyTable, stevedore, PyYAML) that are all common utilities.
License in practice
Apache-2.0 is a permissive license. You can use, modify, and distribute cliff freely in commercial and private projects, provided you include a copy of the license and state significant changes.
Quickstart
pip install cliff
from cliff.app import App
from cliff.command import Command
class MyCommand(Command):
def take_action(self, parsed_args):
pass
app = App('myapp')
app.run(['mycommand'])
Requires Python 3.11 or later.
Verify before relying
- Whether entry point discovery and dynamic subcommand loading work as expected in your deployment environment.
- Performance characteristics when handling large numbers of subcommands or formatters.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — autopage, cmd2, PrettyTable, stevedore, PyYAML |
| Maintenance | actively maintained — 35 days since the last release |
| First released | |
| Downloads | 1,567,871/month — #3,753 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cliff-4.15.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI 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
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
stevedoreStevedore manages dynamic plugin loading for…
permissive · top 1,000 on PyPI
click-pluginsExtends Click CLI groups to load external…
permissive · top 1,000 on PyPI
knackKnack is a Python framework for building…
permissive · top 5,000 on PyPI
dpguiProvides a web-based GUI for collecting…
copyleft · top 15,000 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
entrypointProvides a decorator to mark functions as entry…
permissive · top 15,000 on PyPI
entrypointsDiscovers and loads entry points from installed…
permissive · top 1,000 on PyPI
pyodide-cliA command-line interface for the Pyodide…
copyleft · top 15,000 on PyPI
cementCement is a Python application framework…
permissive · top 15,000 on PyPI