{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"viv","text":"

viv isn't venv

Documentation

Try before you buy!

python3 <(curl -fsSL viv.dayl.in/viv.py) run pycowsay -- \"viv isn't venv\\!\"\n

Viv is a standalone dependency-free venv creator.

These venvs can be identified by name or by their specification. In any case they will be re-used across scripts (and generated on-demand, if needed).

Importantly, viv will also remove your user site directory. (view with: python -m 'import site;print(site.USER_SITE)').

Viv's uncompromising insistence on portability means that it will always (1) only use the standard library (2) never exceed a single script.

For that reason any usage of the CLI can be accomplished using a remote copy as seen in the below install command.

"},{"location":"#setup","title":"Setup","text":"

Run the below command to install viv.

python3 <(curl -fsSL viv.dayl.in/viv.py) manage install\n

To access viv from within scripts you should add it's location to your PYTHONPATH. By default viv will be installed to $XDG_DATA_HOME/viv or ~/.local/share/viv you can customize this with --src.

export PYTHONPATH=\"$PYTHONPATH:$HOME/.local/share/viv\"\n

Advanced users may recognize that principally, the module just needs to be recognized at run time and the single script viv.py can be invoked directly for the CLI. How you accomplish these options is ultimately up to you but the above instructions can get you started.

"},{"location":"#pypi-not-recommended","title":"Pypi (Not Recommended)","text":"
pip install viv\n

Why is this not recommended? Mainly, because viv is all about hacking your sys.path. Placing it in it's own virtual environment or installing in a user site directory may complicate this endeavor.

"},{"location":"#usage","title":"Usage","text":"

In any python script with external dependencies you can add this line, to automate vivenv creation and installation of dependencies.

__import__(\"viv\").use(\"click\")\n

To remove all vivenvs you can use the below command:

viv remove $(viv list -q)\n

To remove viv all together you can use the included purge command:

python3 <(curl -fsSL viv.dayl.in/viv.py) manage purge\n
"},{"location":"#additional-features","title":"Additional Features","text":"

An experimental feature of viv is generating shim's that leverage the principles of viv. These shims would operate similar to pipx in which you can specify a command line app to \"install\".

Note that --standalone will auto-generate a code-golfed minified version of viv to accomplish the same basic task as using a local copy of viv. After generating this a standalone shim you can freely use this script across unix machines which have python>3.8. See examples/black for output of below command.

python3 <(curl -fsSL viv.dayl.in/viv.py) shim black -o ./black --standalone --freeze\n
"},{"location":"#alternatives","title":"Alternatives","text":""},{"location":"#pip-run","title":"pip-run","text":"
pip-run (10.0.5)\n\u251c\u2500\u2500 autocommand (2.2.2)\n\u251c\u2500\u2500 jaraco-context (4.3.0)\n\u251c\u2500\u2500 jaraco-functools (3.6.0)\n\u2502   \u2514\u2500\u2500 more-itertools (9.1.0)\n\u251c\u2500\u2500 jaraco-text (3.11.1)\n\u2502   \u251c\u2500\u2500 autocommand (2.2.2)\n\u2502   \u251c\u2500\u2500 inflect (6.0.2)\n\u2502   \u2502   \u2514\u2500\u2500 pydantic>=1.9.1 (1.10.5)\n\u2502   \u2502       \u2514\u2500\u2500 typing-extensions>=4.2.0 (4.5.0)\n\u2502   \u251c\u2500\u2500 jaraco-context>=4.1 (4.3.0)\n\u2502   \u251c\u2500\u2500 jaraco-functools (3.6.0)\n\u2502   \u2502   \u2514\u2500\u2500 more-itertools (9.1.0)\n\u2502   \u2514\u2500\u2500 more-itertools (9.1.0)\n\u251c\u2500\u2500 more-itertools>=8.3 (9.1.0)\n\u251c\u2500\u2500 packaging (23.0)\n\u251c\u2500\u2500 path>=15.1 (16.6.0)\n\u251c\u2500\u2500 pip>=19.3 (23.0.1)\n\u2514\u2500\u2500 platformdirs (3.1.0)\n
"},{"location":"#pipx","title":"pipx","text":"
pipx (1.1.0)\n\u251c\u2500\u2500 argcomplete>=1.9.4 (2.1.1)\n\u251c\u2500\u2500 packaging>=20.0 (23.0)\n\u2514\u2500\u2500 userpath>=1.6.0 (1.8.0)\n    \u2514\u2500\u2500 click (8.1.3)\n
"},{"location":"cli/","title":"cli","text":""},{"location":"cli/#list","title":"list","text":""},{"location":"cli/#exe","title":"exe","text":""},{"location":"cli/#exe-python","title":"exe python","text":""},{"location":"cli/#exe-pip","title":"exe pip","text":""},{"location":"cli/#remove","title":"remove","text":""},{"location":"cli/#manage","title":"manage","text":""},{"location":"cli/#manage-update","title":"manage update","text":""},{"location":"cli/#manage-purge","title":"manage purge","text":""},{"location":"cli/#manage-show","title":"manage show","text":""},{"location":"cli/#manage-install","title":"manage install","text":""},{"location":"cli/#freeze","title":"freeze","text":""},{"location":"cli/#shim","title":"shim","text":""},{"location":"cli/#run","title":"run","text":""}]}