i wrote a quick reference post on converting small Python scripts into CLI tools. i already have a CLI tool starter repository, but not all scripts are planned to be a CLI tool from the beginning.
https://jolvera.com/make-your-python-script-a-cli-tool-with-click/