That single command creates a throwaway virtual environment, installs an alpha release of my LLM tool, adds an alpha release of my llm-claude-3 plugin, runs that command with options, returns the results and then throws everything away again.
And because of the way uv uses symlinks and caching, running the commands a second time is almost instant.
You don't need to think about the virtual environment that might have been created to run the tool, that thing is entirely ephemeral. The caching is shared with all other virtual environments on your machine, so if some other project uses the same version of a dependency that cached dependency will be shared.
Contrast that with other Python virtual environment tools where you can end up with the same exact dependency copied dozens of times across your system.
"pipx run" for example can result in identical copies of dependencies that are used by multiple tools.
Ah, so by "everything" you just meant some configuration explaining what's in that environment. (In a broad sense, including e.g. the use of hard links to the cache.)
Yes, it's a quite clever system. I have plans to follow a similar strategy, implemented in Python (self-installing into its own isolated environment, similar to the one that Pipx makes for its Pip copy).
The other day I got to share a demo by pasting this command in a Discord channel:
That single command creates a throwaway virtual environment, installs an alpha release of my LLM tool, adds an alpha release of my llm-claude-3 plugin, runs that command with options, returns the results and then throws everything away again.And because of the way uv uses symlinks and caching, running the commands a second time is almost instant.
(That stuff is no longer alpha, see https://simonwillison.net/2024/Oct/29/llm-multi-modal/)