# autopep723 `autopep723` is a tiny wrapper on top of `uv run` that automatically detects third-party dependencies of Python scripts. Forget about manually managing dependencies for simple experiments! ## Quick Start The easiest way to use `autopep723` is via `uvx`: ```bash # Run directly without installing uvx autopep723 script.py ``` To install the tool permanently: ```bash uv tool install autopep723 autopep723 script.py ``` ## Features - ⚡ **Zero dependencies** - uses only Python standard library - ðŸŠķ **Minimal footprint** - perfect as `uv run` wrapper - 🔍 **Automatic dependency detection** via AST analysis - ✅ **PEP 723 compliant** metadata generation - 🌐 **Remote script support** - run scripts directly from URLs ## Shebang Integration You can use `autopep723` directly as a shebang: ```python #!/usr/bin/env -S uvx autopep723 import requests import numpy as np # Your script here... ``` Then running the script will automatically install the required dependencies in an ephemeral environment! ```bash ./script.py ``` ```{toctree} :maxdepth: 2 :caption: Documentation usage examples how-it-works api contributing ``` ## Related Projects - [PEP 723](https://peps.python.org/pep-0723/) - Inline script metadata specification - [uv tools guide](https://docs.astral.sh/uv/guides/tools/) - Tool management with uv - [uv issue #6283](https://github.com/astral-sh/uv/issues/6283) - Autodetect dependencies proposal