Skip to main content

uvfile

Tools management for uv. Think Brewfile, but for Python CLI tools.

Note: Most of this tool, was written by Pseudocoder and the most of the readme was written by Claude based on my design and requirements. It works, but the implementation has room for improvement. I focused on the interface and user experience while delegating the implementation details to the LLM.

uv tool install uvfile

Why?

You want to track and sync your globally installed Python CLI tools across different environments, but uv tool install doesn't provide a way to save and restore tool states. With uvfile you can:

  • Initialize a manifest of your system-wide Python tools
  • Sync tools across different machines
  • Track tool versions and their extras
  • Share common tooling within teams while allowing personal tools

Usage

Initialize UVFile from currently installed tools

uvfile init

Install tools from UVFile

uvfile sync                  # Install missing tools
uvfile sync --pin            # Install and match exact versions
uvfile sync --force          # Force reinstall all tools in UVFile
uvfile sync --clean          # Remove tools unlisted in UVFile
uvfile sync --pin --clean
uvfile sync --force --clean

Combine sync options

uvfile sync --pin --clean
uvfile sync --force --clean

Preview changes

Add --dry-run to sync commands

uvfile sync --force --clean --dry-run
Would run: uv tool uninstall cowsay
Would run: uv tool install aider-chat --python python3.12 --reinstall
Would run: uv tool install cookiecutter --reinstall
Would run: uv tool install lefthook --reinstall
Would run: uv tool install poetry --reinstall
Would run: uv tool install project-mapper@https://github.com/blakesims/project-mapper.git --reinstall
Would run: uv tool install pypyp --reinstall
Would run: uv tool install ruff --reinstall
Would run: uv tool install type-ignore@https://github.com/cleder/type-ignore.git --reinstall
Would run: uv tool install uvfile --reinstall

Shell Integration

Add this to your shell config:

if command -v uvfile >/dev/null 2>&1; then
  source <(uvfile env)
fi

This will:

  • Auto-update UVFile after uv tool install/upgrade
  • Add uv file command as an alias for uvfile
  • Add shell completions

Use Cases

Multiple Machines

Keep tools in sync across different computers:

On main machine

uvfile init
git add UVFile
git commit -m "Add my local uv tools via UVFile"
git push

On other machines

git pull
uvfile sync --pin    # Install while preserving existing tools

Team Standards

Share common tooling while allowing personal tools:

uvfile --uvfile ~/work/project/UVFile sync --pin   # Install team tools, keep personal ones

CI/CD

Ensure consistent tooling in CI:

steps:
  - uses: actions/checkout@v4
  - run: |
      curl -L https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh | sh
      uvfile sync

UVFile Format

UVFile uses a simple format that mirrors uv tool install commands:

ruff>=0.2.0 --python 3.11
mypy==1.8.0
black --with tomli --with typing-extensions>=4.0
pdm --with-editable ./dev-tools/pdm-plugin

Supports:

  • Version constraints
  • Python version specification
  • Additional dependencies via --with
  • Editable installs via --with-editable
  • Git repositories
  • Local directories

Environment Variables

  • UVFILE_PATH: Override the default UVFile location (defaults to ./UVFile)

Limitations

  • Doesn't provide a way to merge different UVFiles: you can use multiple UVFiles via different sync options, but there's no way to partially update UVFile, except for manual edits, of course (PRs welcome).
  • Doesn't support all extra arguments (PRs welcome).

Metadata

Release files for UVFile 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for UVFile 0.2.0
File Size Uploaded Provenance
uvfile-0.2.0.tar.gz 9.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for UVFile 0.2.0
File Interpreter ABI Platform
uvfile-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.9 kB

Release files / uvfile-0.2.0.tar.gz

Download URL uvfile-0.2.0.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dc8023dd46ccc131583d2b39bf3a09666f0ffad02ff8f2942afb96d73dd6679a
BLAKE2b-256 checksum
How to use checksums
ca828055cf3e6d343db9a92e660d3e901495763fa28b51fdf1606dc5114932f1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / uvfile-0.2.0-py3-none-any.whl

Download URL uvfile-0.2.0-py3-none-any.whl
Size 8.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b46ed285b530375cbbf65652a5306245bb8690c438adf81621909646fc6d64e
BLAKE2b-256 checksum
How to use checksums
3b22eae79fe190ee91995b84d5e2f024067d48ad5b9ed3c2c59bbae20cacd890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for UVFile 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page