click-aliases
Add (mutiple) aliases to a click group or command
What it is and what it does
click-aliases extends Click's command group system to support multiple names (aliases) for a single command. Instead of registering separate command handlers, you decorate a command with an `aliases` parameter, and ClickAliasedGroup ensures all those names invoke the same underlying function. This is useful in CLI tools where you want to accept both long, descriptive command names and short variants without duplicating code.
The package is minimal and focused: it depends only on click (the CLI framework it extends) and importlib-metadata. It works with modern Python versions (3.10 and later) and carries no known security vulnerabilities. The implementation is straightforward enough that it integrates cleanly into existing Click applications by simply changing the group class.
Use it for:
- Provide short aliases for frequently-used CLI commands (e.g., 'ls' as an alias for 'list').
- Support legacy command names while migrating to new naming conventions.
- Allow both verbose and terse forms of the same command for different user preferences.
- Create domain-specific shortcuts in a multi-command CLI tool.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds command aliases to Click CLI groups and commands, allowing multiple names to invoke the same command.
Yes, if you are building a Click CLI and want to support command aliases without boilerplate. The package is lightweight, actively maintained, permissively licensed, and solves a specific problem cleanly. Install it only if you actually need aliases; it adds no value to applications that don't use Click or don't require multiple command names.
Install
click-aliases on PyPI
pip
pip install click-aliasesuv
uv add click-aliasespoetry
poetry add click-aliasesInstalling click-aliases
Before you install
Low install friction with only two runtime dependencies (click and importlib-metadata). Marked active with a recent release, suggesting ongoing maintenance.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions.
Quickstart
import click
from click_aliases import ClickAliasedGroup
@click.group(cls=ClickAliasedGroup)
def cli():
pass
@cli.command(aliases=['bar', 'baz'])
def foo():
click.echo('foo')
Requires Python 3.10 or later; requires click to be installed.
Verify before relying
- Whether aliases work with nested subcommand groups or only top-level commands
- Performance impact when a command has many aliases
- Compatibility with Click plugins or custom command classes beyond ClickAliasedGroup
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — click, importlib-metadata |
| Maintenance | actively maintained — 36 days since the last release |
| First released | |
| Downloads | 3,596,076/month — #2,567 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: click_aliases-1.0.7-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
click-default-groupExtends Click's Group class to invoke a default…
permissive · top 5,000 on PyPI
click-didyoumeanAdds git-like "did-you-mean" suggestions to…
permissive · top 1,000 on PyPI
click-help-colorsAdds color customization to Click command-line…
permissive · top 5,000 on PyPI
git-pythonProvides command-line shortcuts for common git…
unclear · top 15,000 on PyPI
click-replAdds an interactive REPL mode to Click…
permissive · top 1,000 on PyPI
click-configfileExtends click with configuration file support,…
permissive · top 15,000 on PyPI
click-pluginsExtends Click CLI groups to load external…
permissive · top 1,000 on PyPI
clickclickProvides utility functions for Click, a…
permissive · top 5,000 on PyPI
click-shellConverts a click command-line app into an…
permissive · top 15,000 on PyPI
click-option-groupAdds option groups to Click CLI applications,…
permissive · top 1,000 on PyPI