skillfed

click-aliases

Add (mutiple) aliases to a click group or command

click-aliases v1.0.7 3.6M downloads/30d#2,567 on PyPI
Permissive license MIT Active released

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

uv

uv add click-aliases

poetry

poetry add click-aliases

Installing 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

License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Tags

click command aliasesCLI command shortcutsclick group aliasesmultiple command namesclick command variantsCLI command synonymsclick alternative names
cli-utilitiesclick-extension

More Application Frameworks packages