Add unified install/upgrade command
How would this feature be useful?
When you install/upgrade pip, it has a unified command line:
python3 -m pip install --user -U foo
But for pipx, need to have different command, depending on if you want to upgrade or install:
pipx install foo
pipx upgrade foo
For the end user instructions, it would be convenient to have a single command that does install or upgrade to the latest version
Describe the solution you'd like
pipx install foo --upgrade
pipx install foo -U
Describe alternatives you've considered
Alternative instructions having two commands, is not that straight forward:
Consider this in the application readme:
To install latest application foo, run the following:
pipx install foo
# or
pipx upgrade foo
It would be useful to be able to do pipx upgrade package==version instead of pipx install package==version --force
Working on an --upgrade option.
@meowmeowmeowcat Can I base my work on the upgrade command or do you think that should be merged into install and removed completely?
@meowmeowmeowcat Could you please point me into the right direction? I would like to have this decided before I do any unnecessary work.
pipx upgrade should not be removed. IMO adding an option --upgrade to pipx install is enough.
Thanks for the feedback! Will finish as soon as I've figured out how to implement a test.
https://github.com/pypa/pipx/pull/953#issuecomment-1834417543