π Python CLI Template
Greet a name:
pipx run python-cli-template --name world
Install the CLI:
pipx install python-cli-template
Optional: Name to greet. Defaults to World.
python-cli-template --name Alex
Show the program's version number and exit:
python-cli-template --version # python-cli-template -vShow the help message and exit:
python-cli-template --help # python-cli-template -hCreate a virtual environment:
python3 -m venv .venv
Activate the virtual environment:
source .venv/bin/activateInstall the package:
pip install python-cli-template
Greet a name:
# script.py from python_cli_template import hello print(hello("Bob"))
Run the script:
python script.py