uv-scripts
UV Scripts
Overview
Use uv run to execute standalone scripts with automatic dependency management. Prefer inline metadata for self-contained scripts and --no-project when you are inside a project but do not need project code.
Quick Reference
| Need | Command |
|---|---|
| Run a script | uv run script.py |
| Run module | uv run -m http.server 8000 |
| Run from stdin | uv run - |
| Here-doc | uv run - <<EOF ... EOF |
| Skip project install | uv run --no-project script.py |
| One-off deps | uv run --with requests --with rich script.py |
| Pick Python | uv run --python 3.12 script.py |
| Init script metadata | uv init --script script.py --python 3.12 |
| Add script deps | uv add --script script.py requests rich |
| Lock script deps | uv lock --script script.py |
More from narumiruna/telegram-bot
aiogram-framework
Build, refactor, or troubleshoot Telegram bots using aiogram v3. Use when working with aiogram routers/handlers/filters, Dispatcher lifecycle, update delivery (long polling or webhook), FSM, middleware/DI, error handling, or aiogram utilities like keyboards, formatting, and i18n.
181python-modern-tooling
Use when choosing the right modern Python tooling workflow for a project or script (uv setup, quality tools, CLI, logging, packaging) or when unsure which Python tooling skill applies.
15python-packaging-uv
Use when building or publishing Python packages with uv, including dist artifacts and pre-publish checks.
15python-cli-typer
Use when building or structuring Python CLI commands with Typer, including commands, options, and multi-command apps.
14python-logging
Use when choosing or configuring Python logging, especially deciding between stdlib logging and loguru for apps or CLIs.
14python-uv-project-setup
Use when initializing a Python project or script, adding dependencies, or running commands with uv, especially to avoid pip install and direct python/pytest usage.
12