cliff, the Command Line Interface Formulation Framework, is a toolkit for creating applications with multiple commands and subcommands. It provides an application object responsible for processing top-level arguments, identifying commands and dispatching execution to the appropriate implementation. Individual commands are represented by classes, allowing their behaviour to be developed and maintained separately from the main application.
The framework uses an extensible command-management architecture in which commands and other components can be discovered through registered entry points. This allows separate components to contribute commands to a shared interface without requiring the main application to contain every implementation. cliff also distinguishes command execution from the presentation of results, providing reusable interfaces for commands that return lists or individual records. This separation is useful for administrative utilities and service-management applications whose users may need to view the same information in different formats or automate command execution through scripts.
This is free and open source software.
Key Features
- Provides an application framework for programs with multiple commands and subcommands.
- Uses entry points to discover and load command implementations dynamically.
- Supports commands implemented separately from the main application.
- Provides a Command base class for defining executable operations.
- Offers a Lister base class for commands that return collections of records.
- Provides a ShowOne base class for displaying properties of individual objects.
- Separates command results from output formatting.
- Supports configurable output formatters for tabular and structured data.
- Allows users to select output columns and control presentation options.
- Provides command-specific argument parsers and help information.
- Supports an interactive command shell for executing multiple operations within one session.
- Offers command completion capabilities in interactive mode.
- Provides application-level handling for standard input, output and error streams.
- Supports configurable command managers and custom command classes.
- Allows output formatters and other extensions to be registered independently.
- Provides lifecycle handling for application initialisation and command execution.
Website: opendev.org/openstack/cliff
Support:
Developer:
License: Apache License 2.0
cliff is written in Python. Learn Python with our recommended free books and free tutorials.
Related Software
| Command-Line Python Application Development Tools | |
|---|---|
| Python Fire | Library for automatically generating command line interfaces |
| argparse | Parser for command-line options, arguments and sub-commands |
| Click | Create beautiful command line interfaces in a composable way |
| Typer | Library for building CLI applications |
| Rich | Python library for rich text and beautiful formatting |
| alive-progress | Progress bar, with real-time throughput |
| Gooey | Convert console programs into end-user-friendly GUI software |
| Python Prompt Toolkit | Build powerful interactive command line and terminal applications |
| tqdm | Fast, extensible progress bar for Python and CLI |
| Asciimatics | Create full-screen text UIs from interactive forms to ASCII animations |
| Cement | CLI application framework for Python |
| docopt | Command-line interface description language |
| cliff | Framework for building command line programs |
| Cyclopts | Framework for building command-line interfaces |
Read our verdict in the software roundup.
LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more. Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion. Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README. |


Please read our Comment Policy before commenting.