UVFile


NameUVFile JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryLike Brewfile but for UV
upload_time2025-01-24 17:42:26
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseMIT
keywords brewfile pipx tools uv uvfile uvx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # uvfile

Tools management for [uv](https://github.com/astral-sh/uv). Think Brewfile, but for Python CLI
tools.

> **Note:** Most of this tool, was written
> by [Pseudocoder](https://chatgpt.com/g/g-Z5tFTQt5G-pseudocoder) and the most of the readme was
> written by [Claude](https://anthropic.com/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.

```shell
uv tool install uvfile
```

## Install tools from UVFile

```shell
uvfile sync                  # Install missing tools
uvfile sync --pin            # Install and match exact versions
uvfile sync --force          # Force reinstall all listed tools
uvfile sync --clean          # Remove unlisted tools

# Common combinations
uvfile sync --pin --clean    # Match exact environment
uvfile sync --force --clean  # Fresh reinstall, remove unlisted
```

## 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 dependencies
- Share common tooling within teams while allowing personal tools

## Shell Integration

Add this to your shell config:

```shell
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

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

#### On other machines

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

### Team Standards

Share common tooling while allowing personal tools:

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

### CI/CD

Ensure consistent tooling in CI:

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

## Usage

### Initialize from currently installed tools

```shell
uvfile init
```

Creates a `UVFile` with all your installed tools and their exact versions.

## 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).
            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "UVFile",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "brewfile, pipx, tools, uv, uvfile, uvx",
    "author": null,
    "author_email": "Bobronium <write@bobronium.me>",
    "download_url": "https://files.pythonhosted.org/packages/b2/8d/b9134116d186121ae5ae432684ec51b6c0703f78a2f40fbc3b9ca468c01c/uvfile-0.1.0.tar.gz",
    "platform": null,
    "description": "# uvfile\n\nTools management for [uv](https://github.com/astral-sh/uv). Think Brewfile, but for Python CLI\ntools.\n\n> **Note:** Most of this tool, was written\n> by [Pseudocoder](https://chatgpt.com/g/g-Z5tFTQt5G-pseudocoder) and the most of the readme was\n> written by [Claude](https://anthropic.com/claude) based on my design and requirements. It works,\n> but the implementation has room for improvement. I focused on the interface and user experience\n> while delegating the implementation details to the LLM.\n\n```shell\nuv tool install uvfile\n```\n\n## Install tools from UVFile\n\n```shell\nuvfile sync                  # Install missing tools\nuvfile sync --pin            # Install and match exact versions\nuvfile sync --force          # Force reinstall all listed tools\nuvfile sync --clean          # Remove unlisted tools\n\n# Common combinations\nuvfile sync --pin --clean    # Match exact environment\nuvfile sync --force --clean  # Fresh reinstall, remove unlisted\n```\n\n## Why?\n\nYou want to track and sync your globally installed Python CLI tools across different environments,\nbut `uv tool install` doesn't provide a way to save and restore tool states. With `uvfile` you can:\n\n- Initialize a manifest of your system-wide Python tools\n- Sync tools across different machines\n- Track tool versions and their dependencies\n- Share common tooling within teams while allowing personal tools\n\n## Shell Integration\n\nAdd this to your shell config:\n\n```shell\nif command -v uvfile >/dev/null 2>&1; then\n  source <(uvfile env)\nfi\n```\n\nThis will:\n\n- Auto-update UVFile after `uv tool install/upgrade`\n- Add `uv file` command as an alias for uvfile\n- Add shell completions\n\n## Use Cases\n\n### Multiple Machines\n\nKeep tools in sync across different computers:\n\n#### On main machine\n\n```shell\nuvfile init\ngit add UVFile\ngit commit -m \"Add my local uv tools via UVFile\"\ngit push\n````\n\n#### On other machines\n\n```shell\ngit pull\nuvfile sync --pin    # Install while preserving existing tools\n```\n\n### Team Standards\n\nShare common tooling while allowing personal tools:\n\n```shell\nuvfile --uvfile ~/work/project/UVFile sync --pin   # Install team tools, keep personal ones\n```\n\n### CI/CD\n\nEnsure consistent tooling in CI:\n\n```yaml\nsteps:\n  - uses: actions/checkout@v4\n  - run: |\n      curl -L https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh | sh\n      uvfile sync\n```\n\n## Usage\n\n### Initialize from currently installed tools\n\n```shell\nuvfile init\n```\n\nCreates a `UVFile` with all your installed tools and their exact versions.\n\n## UVFile Format\n\nUVFile uses a simple format that mirrors `uv tool install` commands:\n\n```\nruff>=0.2.0 --python 3.11\nmypy==1.8.0\nblack --with tomli --with typing-extensions>=4.0\npdm --with-editable ./dev-tools/pdm-plugin\n```\n\nSupports:\n\n- Version constraints\n- Python version specification\n- Additional dependencies via `--with`\n- Editable installs via `--with-editable`\n- Git repositories\n- Local directories\n\n## Environment Variables\n\n- `UVFILE_PATH`: Override the default UVFile location (defaults to `./UVFile`)\n\n## Limitations\n\n- Doesn't provide a way to merge different UVFiles: you can use multiple UVFiles via different sync\n  options, but there's no way to partially update UVFile, except for manual edits, of course (PRs\n  welcome).\n- Doesn't support all extra arguments (PRs welcome).",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Like Brewfile but for UV",
    "version": "0.1.0",
    "project_urls": null,
    "split_keywords": [
        "brewfile",
        " pipx",
        " tools",
        " uv",
        " uvfile",
        " uvx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "028dda93ff8c652c7a1e700e3b15c9933dfd50b8f9c782ee1179d7039cbe357a",
                "md5": "fd0d5e6b1eca32531bf8265a66e13fe9",
                "sha256": "09de538c8b5f01552167773d7cc1afe4743ec9241612bc1ca74dfd6a27acd922"
            },
            "downloads": -1,
            "filename": "uvfile-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fd0d5e6b1eca32531bf8265a66e13fe9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7410,
            "upload_time": "2025-01-24T17:42:24",
            "upload_time_iso_8601": "2025-01-24T17:42:24.740970Z",
            "url": "https://files.pythonhosted.org/packages/02/8d/da93ff8c652c7a1e700e3b15c9933dfd50b8f9c782ee1179d7039cbe357a/uvfile-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b28db9134116d186121ae5ae432684ec51b6c0703f78a2f40fbc3b9ca468c01c",
                "md5": "3f7384907f16dfb5e81f4b6dd3b930c8",
                "sha256": "8a9de80a128d7100997fb329e2e27a0029f42c0fb0285f6e55359bac82659b90"
            },
            "downloads": -1,
            "filename": "uvfile-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3f7384907f16dfb5e81f4b6dd3b930c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 22196,
            "upload_time": "2025-01-24T17:42:26",
            "upload_time_iso_8601": "2025-01-24T17:42:26.696925Z",
            "url": "https://files.pythonhosted.org/packages/b2/8d/b9134116d186121ae5ae432684ec51b6c0703f78a2f40fbc3b9ca468c01c/uvfile-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-24 17:42:26",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "uvfile"
}
        
Elapsed time: 0.46236s