-
Notifications
You must be signed in to change notification settings - Fork 478
Description
How would this feature be useful?
With the completion of #660 , the possibility now exists to re-create one or more pipx-managed environments based on the output of pipx list --json
.
This would be useful for backup or versioning across one or more machines. For instance, I could use the output of pipx list --json
from workstation A to quickly provision workstation B or laptop C with a same/very similar set of tools.
Describe the solution you'd like
I don't have firm opinions on the API here, but i would kind of naively expect pipx install-all my-pipx-list.json
, which creates the new subcommand install-all
, with name parity with existing -all
sub-command equivalents.
Tricky points I can think of:
- what if workstation B has a different version of one or more of the top-level packages in the exported list? who wins?
- what if there are interpreter version incompatibilities in a top-level package or one or more (potentially pinned) deps or injected packages?
- what about packages installed from local tarballs, etc?
Describe alternatives you've considered
JSON is supposed to be human readable, right? :) I could certainly hack something together with zsh
and jq
that walks the tree and installs root + injected, but it seems natural enough to absorb this into pipx
itself.