UVFile


NameUVFile JSON
Version 0.1.1 PyPI version JSON
download
home_pageNone
SummaryLike Brewfile but for UV
upload_time2025-02-05 14:08:13
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
```


## 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
```shell
uvfile init
```

### Install tools from UVFile

```shell
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
```shell
uvfile sync --pin --clean
uvfile sync --force --clean
```

### Preview changes
Add `--dry-run` to `sync` commands
```shell
uvfile sync --force --clean --dry-run
```
```shell
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:

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

## 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/39/32/97677ea6cbf967670e775f5c8baa646c4454d3799f61a88e9d1a94cbd5b5/uvfile-0.1.1.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\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 extras\n- Share common tooling within teams while allowing personal tools\n\n\n## Usage\n\n### Initialize UVFile from currently installed tools\n```shell\nuvfile init\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 tools in UVFile\nuvfile sync --clean          # Remove tools unlisted in UVFile\nuvfile sync --pin --clean\nuvfile sync --force --clean\n```\n### Combine `sync` options\n```shell\nuvfile sync --pin --clean\nuvfile sync --force --clean\n```\n\n### Preview changes\nAdd `--dry-run` to `sync` commands\n```shell\nuvfile sync --force --clean --dry-run\n```\n```shell\nWould run: uv tool uninstall cowsay\nWould run: uv tool install aider-chat --python python3.12 --reinstall\nWould run: uv tool install cookiecutter --reinstall\nWould run: uv tool install lefthook --reinstall\nWould run: uv tool install poetry --reinstall\nWould run: uv tool install project-mapper@https://github.com/blakesims/project-mapper.git --reinstall\nWould run: uv tool install pypyp --reinstall\nWould run: uv tool install ruff --reinstall\nWould run: uv tool install type-ignore@https://github.com/cleder/type-ignore.git --reinstall\nWould run: uv tool install uvfile --reinstall\n```\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## 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.1",
    "project_urls": null,
    "split_keywords": [
        "brewfile",
        " pipx",
        " tools",
        " uv",
        " uvfile",
        " uvx"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f16fea5f5ab376f631826201ebde54186baf7f43aa29857eba0c46693a699504",
                "md5": "c78d64e97b59e67ec6d287a5a77ee570",
                "sha256": "e883b0f5541e1bb6d56c1b93dd33b9072ce84a416c416363c6913acb79df17de"
            },
            "downloads": -1,
            "filename": "uvfile-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c78d64e97b59e67ec6d287a5a77ee570",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 7560,
            "upload_time": "2025-02-05T14:08:11",
            "upload_time_iso_8601": "2025-02-05T14:08:11.702300Z",
            "url": "https://files.pythonhosted.org/packages/f1/6f/ea5f5ab376f631826201ebde54186baf7f43aa29857eba0c46693a699504/uvfile-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "393297677ea6cbf967670e775f5c8baa646c4454d3799f61a88e9d1a94cbd5b5",
                "md5": "b3e6798c078217a1d22ce3d46f4924e7",
                "sha256": "e147132b8339b78989668550127e5420634bcd229b264bfd0a8110b445545f2b"
            },
            "downloads": -1,
            "filename": "uvfile-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b3e6798c078217a1d22ce3d46f4924e7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 22351,
            "upload_time": "2025-02-05T14:08:13",
            "upload_time_iso_8601": "2025-02-05T14:08:13.057771Z",
            "url": "https://files.pythonhosted.org/packages/39/32/97677ea6cbf967670e775f5c8baa646c4454d3799f61a88e9d1a94cbd5b5/uvfile-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-05 14:08:13",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "uvfile"
}
        
Elapsed time: 0.56812s