π Python CLI Template
Greet a name:
pipx run python_cli_template --name worldInstall the CLI:
pipx install python_cli_templateOptional: Name to greet. Defaults to World.
python_cli_template --name AlexShow 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 .venvActivate the virtual environment:
source .venv/bin/activateInstall the package:
pip install python_cli_templateGreet a name:
# script.py
from python_cli_template import hello
print(hello("Bob"))Run the script:
python script.py