`cli-aliases` implements command line aliases using the Click package.
Project description
cli-aliases
cli-aliases is a simple implemention to set aliases for your Click CLI.
Installation
Dependencies
- Click (>=8.1.8)
Install the package by entering pip install cli-aliases in your terminal.
Usage: a simple example
import click
from cmd_aliases import AliasedGroup, AliasConfig
AliasConfig.add_alias("helloworld", "welcome") # set a single alias entry in the form '(command, alias)'
@click.command(cls=AliasedGroup) # make sure to use the class, not an instance of it
def cli():
pass
@cli.command()
def HelloWorld():
click.echo("Hello World!")
if __name__ == "__main__":
cli()
TODO
- Add multiple alias comprehension
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cli_aliases-0.0.1.tar.gz
(3.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cli_aliases-0.0.1.tar.gz.
File metadata
- Download URL: cli_aliases-0.0.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
51a96c371a76eae7d5460d15237b87482e34799507ebf94b89ef629f5255771a
|
|
| MD5 |
52180b1a2988e0dadfb99ccf4c033ac5
|
|
| BLAKE2b-256 |
d12068ad7d06801415ef38ed237ceeee2c4a6bbe38793761348fed60cdf1d537
|
File details
Details for the file cli_aliases-0.0.1-py3-none-any.whl.
File metadata
- Download URL: cli_aliases-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53a768abbbe59af2393ac6e81b4d1de48caf99c19eaf689c2f009cc2f2c98a59
|
|
| MD5 |
87bf5aa2716201213ebfe5fdab11657d
|
|
| BLAKE2b-256 |
79ef941611e4da2602dc4dfb0884c58fed2a638d39e15e15836dca59c8906a32
|