Skip to main content

click-aliasing

Add (multiple) aliasing to a click_ group or command.

In your click app:

import click
from click_aliasing import ClickAliasedGroup


@click.group(cls=ClickAliasedGroup)
def cli():
    pass


@cli.command(aliases=["bar", "baz", "qux"])
def foo():
    """Run a command."""
    click.echo("foo")

Will result in:

Usage: cli [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  foo (bar,baz,qux)  Run a command.

Command can also be called with a unique short match:

cli f

>>foo

Release files for click-aliasing 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for click-aliasing 1.0.0
File Size Uploaded
click_aliasing-1.0.0.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for click-aliasing 1.0.0
File Interpreter ABI Platform
click_aliasing-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / click_aliasing-1.0.0.tar.gz

Download URL click_aliasing-1.0.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
294ef7437a5a3ae7bac6c9381c7558fd057462c1b1555cb921d2d6d6818d15b8
BLAKE2b-256 checksum
How to use checksums
fcca61f8791fb61587dcaca0e9343cb84d96e48473c203e96408d56723623ed3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Darwin/22.4.0

Release files / click_aliasing-1.0.0-py3-none-any.whl

Download URL click_aliasing-1.0.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b11a0fbdf74f62570f97cb2f22cbfaf0af020ef58fe7c540708cd3cfa766f0fe
BLAKE2b-256 checksum
How to use checksums
b512d730a3c4cf6a96402a4de65bb356aff58bd6e9e99297be799f14a613b035
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Darwin/22.4.0

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page