--- id: cliff version: "4.15.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # cliff — Command Line Interface Formulation Framework License: permissive · Maintenance: active · Downloads: 1.6M/mo ## 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 above — 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 pip install cliff uv add cliff poetry add cliff ## Installing 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_current - Install friction: low - Maintenance: active - Downloads: 1.6M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags command line interface framework, CLI framework with subcommands, entry point based CLI, command line program builder, extensible CLI framework, CLI output formatters, command line tool framework, cli-framework, entry-points, plugin-system [View on SkillFed](https://skillfed.io/packages/cliff) · [View on PyPI](https://pypi.org/project/cliff/)