First make sure that you have uv on your system. If you don’t have it, see this for installation instructions for your system.

For very simple tasks,

mkdir my_project
cd my_project
uv init --no-package
uv python pin 3.13
uv add --dev pyright ruff

This will create a file named main.py at the root of your project. Edit the file to add your code.

Check that your code is properly typed with:

uv run pyright

Check that your code is properly formatted with:

uv run ruff check

and run it with:

uv run main.py

Updated: