name: uv-dependency-keeper description: Manage Python dependencies with Astral uv (install, update, lockfiles) while keeping repos consistent.
uv Dependency Keeper
When to Use
- Updating or adding Python packages in MVP repos.
- Regenerating lockfiles or syncing dependencies for collaborators.
Workflow
- Ensure uv is installed (
uv --version). If not, install viapip install uvor follow Astral instructions. - To add a dependency:
uv add package==version(from project root containingpyproject.toml). - To remove:
uv remove package. - To sync environment:
uv sync. - Regenerate lockfile as needed (
uv lock). - Record changes in
pyproject.toml/lockfiles and update documentation or commit notes. - Run tests/lints to confirm compatibility.
Tips
- Pin exact versions for reproducibility.
- Update
.env.exampleor docs if new env vars are required. - For per-project venvs, rely on
uv's isolation (no manualpython -m venvneeded unless specified).