llm-uv-tool
A plugin for LLM that enables proper plugin management when LLM is installed as a uv tool. It resolves compatibility issues between uv's isolated environment approach and LLM's plugin system.
Requirements
- Python 3.10, 3.11, 3.12, 3.13
- uv
Installation
Install LLM with this plugin:
uv tool install --with llm-uv-tool llm
If you already have LLM installed:
llm install llm-uv-tool
Once installed, use LLM's standard commands to manage plugins.
If you've previously installed other LLM plugins before adding llm-uv-tool, refer to the migration guide below for steps to preserve them.
Usage
This plugin provides uv-compatible versions of two built-in LLM commands:
llm installllm uninstall
Once installed, llm-uv-tool's commands replace the built-in versions while maintaining the same interface and arguments. Behind the scenes, they:
- Track installed plugins in a JSON file.
- Map appropriate arguments between LLM's commands and uv's tool system.
- Ensure plugins remain properly installed in uv's isolated environment.
Both commands accept the same arguments as LLM's built-in versions. These arguments are either:
- Mapped to equivalent
uv toolCLI arguments. - Handled internally to provide the same functionality.
llm install --force-reinstall llm-gpt4all
llm uninstall -y llm-gpt4all
The plugin maintains a list of installed plugins in a uv-tool-packages.json file located in your LLM config directory (typically ~/.config/io.datasette.llm/, though the location may vary depending on your OS). This file contains a simple JSON array with an entry for each installed plugin:
[
"llm-anthropic",
"llm-ollama",
"llm-uv-tool"
]
When you install or uninstall plugins, this file is automatically updated to track your changes.
Migrating to llm-uv-tool
If you have already installed LLM plugins and want to migrate to using llm-uv-tool, follow these steps:
-
Install llm-uv-tool in your current LLM environment:
llm install llm-uv-tool
-
Copy all installed plugins to
uv-tool-packages.jsonin your LLM config directory.If you have a small number of plugins, you may prefer to create this file by hand. Alternatively, you can use jq to automate the process with the following command:
llm plugins | jq "[.[].name]" > "$XDG_CONFIG_HOME/io.datasette.llm/uv-tool-packages.json"
On macOS
llmstores its settings in~/Library/Application Support/io.datasette.llm/; on Linux it may be~/.config/io.datasette.llm/.
In addition,llmcan save its settings to a custom location indicated by the$LLM_USER_PATHenvironment variable, so adapt the above$XDG_CONFIG_HOMEto match your setup. -
To verify everything is working, add an additional plugin and check the contents of
uv-tool-packages.json.llm install llm-templates-github
After running this command, the newly installed plugin should appear at the end of the array. Using the above command with llm-templates-github as an example, it might look something like this:
[ "llm-anthropic", "llm-uv-tool", "llm-templates-github" ]
Why use this?
When LLM is installed as a standalone CLI tool using uv's tool feature (uv tool install llm), LLM's standard pip-based plugin installation mechanism conflicts with uv's isolated environments. This means actions like upgrading LLM (uv tool upgrade llm) removes all your installed plugins, forcing repeated reinstallation.
llm-uv-tool solves this issue by:
- Tracking installed plugins persistently.
- Intercepting
llm installandllm uninstallcommands to correctly manage plugins within the uv tool context. - Ensuring a consistent and familiar experience that mirrors the built-in LLM commands.
By handling the underlying uv interactions, this plugin ensures your chosen LLM plugins remain installed and functional across upgrades and other tool management operations.
License
llm-uv-tool is licensed under the MIT license. See the LICENSE file for more information.
Metadata
Release files for llm-uv-tool 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| llm_uv_tool-0.1.4.tar.gz | 47.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| llm_uv_tool-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 52.8 kB
Release files / llm_uv_tool-0.1.4.tar.gz
| Download URL | llm_uv_tool-0.1.4.tar.gz |
|---|---|
| Size | 47.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8943b1182fe8cbbb3db7652db83e60999a2f4b05c64adebd6b8e2593581c9dac
|
|
BLAKE2b-256 checksum How to use checksums |
f427e3ffbf7f2a588624831255602bf304af3b2657f6a1f6bc2c5e89d77cc410
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / llm_uv_tool-0.1.4-py3-none-any.whl
| Download URL | llm_uv_tool-0.1.4-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c47290f9168ac4d073b56c46126b2d5f52cb43cf7e043684d97c0fe430ad4095
|
|
BLAKE2b-256 checksum How to use checksums |
04a77bc577a2192c78da4ebcffe20e4114a143d9dbeac691298ede28c8a1e8e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for llm-uv-tool 0.1.4
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.