mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-14 21:17:54 -06:00
1 line
No EOL
5.6 KiB
JSON
1 line
No EOL
5.6 KiB
JSON
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"viv","text":"<p> viv isn't venv </p> <p> Documentation </p> <p>Try before you buy!</p> <pre><code>python3 <(curl -fsSL viv.dayl.in/viv.py) run pycowsay -- \"viv isn't venv\\!\"\n</code></pre> <p><code>Viv</code> is a standalone dependency-free <code>venv</code> creator.</p> <p>These <code>venvs</code> 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).</p> <p>Importantly, <code>viv</code> will also remove your user site directory. (view with: <code>python -m 'import site;print(site.USER_SITE)'</code>).</p> <p><code>Viv</code>'s uncompromising insistence on portability means that it will always (1) only use the standard library (2) never exceed a single script.</p> <p>For that reason any usage of the <code>CLI</code> can be accomplished using a remote copy as seen in the below install command.</p>"},{"location":"#setup","title":"Setup","text":"<p>Run the below command to install <code>viv</code>.</p> <pre><code>python3 <(curl -fsSL viv.dayl.in/viv.py) manage install\n</code></pre> <p>To access <code>viv</code> from within scripts you should add it's location to your <code>PYTHONPATH</code>. By default <code>viv</code> will be installed to <code>$XDG_DATA_HOME/viv</code> or <code>~/.local/share/viv</code> you can customize this with <code>--src</code>.</p> <pre><code>export PYTHONPATH=\"$PYTHONPATH:$HOME/.local/share/viv\"\n</code></pre> <p>Advanced users may recognize that principally, the module just needs to be recognized at run time and the single script <code>viv.py</code> 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.</p>"},{"location":"#pypi-not-recommended","title":"Pypi (Not Recommended)","text":"<pre><code>pip install viv\n</code></pre> <p>Why is this not recommended? Mainly, because <code>viv</code> is all about hacking your <code>sys.path</code>. Placing it in it's own virtual environment or installing in a user site directory may complicate this endeavor.</p>"},{"location":"#usage","title":"Usage","text":"<p>In any python script with external dependencies you can add this line, to automate <code>vivenv</code> creation and installation of dependencies.</p> <pre><code>__import__(\"viv\").use(\"click\")\n</code></pre> <p>To remove all <code>vivenvs</code> you can use the below command:</p> <pre><code>viv remove $(viv list -q)\n</code></pre> <p>To remove <code>viv</code> all together you can use the included <code>purge</code> command:</p> <pre><code>python3 <(curl -fsSL viv.dayl.in/viv.py) manage purge\n</code></pre>"},{"location":"#additional-features","title":"Additional Features","text":"<p>An experimental feature of <code>viv</code> is generating shim's that leverage the principles of <code>viv</code>. These shims would operate similar to <code>pipx</code> in which you can specify a command line app to \"install\".</p> <p>Note that <code>--standalone</code> will auto-generate a code-golfed minified version of <code>viv</code> to accomplish the same basic task as using a local copy of <code>viv</code>. After generating this a standalone <code>shim</code> you can freely use this script across unix machines which have <code>python>3.8</code>. See examples/black for output of below command.</p> <pre><code>python3 <(curl -fsSL viv.dayl.in/viv.py) shim black -o ./black --standalone --freeze\n</code></pre>"},{"location":"#alternatives","title":"Alternatives","text":""},{"location":"#pip-run","title":"pip-run","text":"<pre><code>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</code></pre>"},{"location":"#pipx","title":"pipx","text":"<pre><code>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</code></pre>"},{"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":""}]} |