skillfed

cliff

Command Line Interface Formulation Framework

cliff v4.15.0 1.6M downloads/30d#3,753 on PyPI
Permissive license Apache-2.0 Active released

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 cliff

uv

uv add cliff

poetry

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 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

Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Typing :: Typed

Tags

command line interface frameworkCLI framework with subcommandsentry point based CLIcommand line program builderextensible CLI frameworkCLI output formatterscommand line tool framework
cli-frameworkentry-pointsplugin-system

More Application Frameworks packages