Post

How to create a Python CLI that's globally available in your system in 5 easy steps. 1. Install uv 2. Init project with `uv init --app --package mycli` 3. Write code 4. Install with `uv tool install . -e` 5. Use `mycli` anywhere in your computer

The reason I added -e is so that changes in the code you make to mycli are immediately visible by your system. If you want to version your CLI properly, I'd omit the `-e` from the installation command. Disclaimer: I'm not a packaging expert. Nor a uv expert.

Super nice trick. I've never used it, I just have scripts with inline deps and a uv shebang in a dir added to my PATH. But the advantage of your method is that nobody has to know about the PATH and it works cross platform.

You still need the cli to install things with uv since it's a command. This is too remote for a non technical user. Either you automate the distribution, you go web, or you make an installer. Mind you, many non technical users don't know how to use an installer.