cloup
Adds features to Click: option groups, constraints, subcommand sections and help themes.
Decision gist · record as of 2026-08-14
Yes. Cloup is a lightweight, actively maintained extension that solves real CLI organization and validation problems. If you're building a Click-based CLI with multiple options or subcommands, Cloup's option groups and constraints eliminate boilerplate validation code and improve help readability. The permissive license, low dependency footprint, and current Python version support make it a safe, practical choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction with only two runtime dependencies (click and typing_extensions).
- Actively maintained with a release 80 days ago and recent commits; supports Python 3.9 through 3.13.
License · maintenance · safety
BSD 3-Clause (permissive) — BSD 3-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
last release 2026-05-26 (80 days) · last repo commit 2026-07-21 · 132 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,069,199 downloads/mo, #4,408 on PyPI
Alternatives
Verify before relying
pip install cloup
from cloup import command, option_group, option
from cloup.constraints import mutually_exclusive
@command()
@option_group(
"Options",
option('--foo'),
option('--bar'),
constraint=mutually_exclusive,
)
def cmd(**kwargs):
pass
if __name__ == '__main__':
cmd()- Whether the 100% test coverage claim and MyPy strict-mode checking are maintained in the current release
- Performance impact of constraint validation on large option sets or deeply nested command hierarchies
What it is and what it does
Cloup is a Click extension that adds structured organization and validation to command-line interfaces. It lets you group related options, apply constraints like mutual exclusivity or minimum-required counts, organize subcommands into sections, and customize help output with themes and colors. The package is built on top of Click and adds decorators with detailed type hints, making it easier to write complex CLIs with better IDE support and validation.
The library is actively maintained, supports Python 3.9 through 3.13, and has no known security vulnerabilities. It depends only on Click and typing_extensions, keeping installation lightweight. The codebase is statically type-checked with MyPy and extensively tested, making it suitable for production CLI applications where you need more control over option organization and user-facing validation messages.
Use it for
- Organize related CLI options into labeled groups with shared constraints like mutual exclusivity or minimum-required selections
- Build multi-level command hierarchies with subcommands organized into logical sections in the help output
- Apply conditional parameter validation (e.g., require at least N of a group, or enforce mutual exclusivity) without manual checking
- Customize help text appearance with themed colors and styles, including responsive layouts for narrow terminals
- Provide "did you mean?" suggestions when users mistype subcommand names
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Cloup is a lightweight, actively maintained extension that solves real CLI organization and validation problems. If you're building a Click-based CLI with multiple options or subcommands, Cloup's option groups and constraints eliminate boilerplate validation code and improve help readability. The permissive license, low dependency footprint, and current Python version support make it a safe, practical choice.
Install
cloup on PyPI
Before you install
Low install friction with only two runtime dependencies (click and typing_extensions). Actively maintained with a release 80 days ago and recent commits; supports Python 3.9 through 3.13.
License in practice
BSD 3-Clause is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
pip install cloup
from cloup import command, option_group, option
from cloup.constraints import mutually_exclusive
@command()
@option_group(
"Options",
option('--foo'),
option('--bar'),
constraint=mutually_exclusive,
)
def cmd(**kwargs):
pass
if __name__ == '__main__':
cmd()
Verify before relying
- Whether the 100% test coverage claim and MyPy strict-mode checking are maintained in the current release
- Performance impact of constraint validation on large option sets or deeply nested command hierarchies
Package facts
| License | BSD 3-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesclicktyping_extensions |
| Maintenance | Actively maintained 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,069,199 / month, #4,408 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9 |
Evidence: cloup-3.1.0-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “cli parameter constraints”
- cloupCloup extends Click with option groups, parameter constraints,…
- ConfigSpaceConfigSpace defines and manipulates configuration spaces for…
- ax-platformAx is a platform for adaptive experimentation that uses…
Give your agent the search over MCP, or paste the wish link into any chat.
More Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
See also click-option-group · mkdocs-click · blurb · click-default-group · clikit · click-extra · sty · rich-toolkit · pastel · click-aliases