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

If you write the code in the right function in the right file, you don't even need to edit the pyproject.toml. (You need to have a function `main` importable from `mycli`, if I'm not mistaken. To specify a different entry point you'd have to modify the file `pyproject.toml`.)

0 reposts1 like

No replies yet.