Compare commits

...

9 commits

Author SHA1 Message Date
e70afb3eac
refactor: add cache to viv m s 2023-06-02 16:58:33 -05:00
853e6e63ae
feat: add script mode to viv run 2023-06-02 16:55:27 -05:00
1b180d5b0b
chore: bump version 2023-06-02 14:09:50 -05:00
4188742e29
docs: add screenshot 2023-06-02 14:09:40 -05:00
bbf078a0a5
docs: update svg's 2023-06-02 14:03:08 -05:00
439d5292c1
refactor: swap hardcode with loop 2023-06-02 14:00:55 -05:00
993e0e699b
feat: generalize viv exe
now can be used to any binary within the environment
2023-06-02 13:51:38 -05:00
6c2bb1b84f
style: return formatting state 2023-06-02 13:26:49 -05:00
f069eafb11
fix: don't use none type 2023-06-02 13:14:04 -05:00
8 changed files with 325 additions and 211 deletions

View file

@ -1,12 +1,17 @@
# viv
<div align="center">
<a href="https://github.com/daylinmorgan/viv">
<img src="https://raw.githubusercontent.com/daylinmorgan/viv/main/assets/logo.svg" alt="Logo" width=500 >
</a>
<p align="center">
viv isn't venv
<h1> viv isn't venv </h1>
</p>
<div align="center">
<img
src="https://raw.githubusercontent.com/daylinmorgan/viv/main/docs/svgs/viv-help.svg"
alt="cli screenshot"
width="500"
>
</div>
<p align="center">
<a href="https://viv.dayl.in">Documentation</a>
</p>

View file

@ -1,4 +1,4 @@
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 350.7333333333333" xmlns="http://www.w3.org/2000/svg">
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 423.9333333333333" xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io & yartsu https://github.com/daylinmorgan/yartsu -->
<style>
@ -19,14 +19,14 @@
font-weight: 700;
}
.terminal-2684787815-matrix {
.terminal-2174466350-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
.terminal-2684787815-title {
.terminal-2174466350-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
@ -36,68 +36,80 @@
-webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
}
.terminal-2684787815-r1 { fill: #94e2d5;font-weight: bold }
.terminal-2684787815-r2 { fill: #c6d0f5 }
.terminal-2684787815-r3 { fill: #f9e2af;font-weight: bold }
.terminal-2174466350-r1 { fill: #94e2d5;font-weight: bold }
.terminal-2174466350-r2 { fill: #c6d0f5 }
.terminal-2174466350-r3 { fill: #f9e2af;font-weight: bold }
</style>
<defs>
<clipPath id="terminal-2684787815-clip-terminal">
<rect x="0" y="0" width="853.0" height="267.4" />
<clipPath id="terminal-2174466350-clip-terminal">
<rect x="0" y="0" width="853.0" height="340.59999999999997" />
</clipPath>
<clipPath id="terminal-2684787815-line-0">
<clipPath id="terminal-2174466350-line-0">
<rect x="0" y="1.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-1">
<clipPath id="terminal-2174466350-line-1">
<rect x="0" y="25.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-2">
<clipPath id="terminal-2174466350-line-2">
<rect x="0" y="50.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-3">
<clipPath id="terminal-2174466350-line-3">
<rect x="0" y="74.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-4">
<clipPath id="terminal-2174466350-line-4">
<rect x="0" y="99.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-5">
<clipPath id="terminal-2174466350-line-5">
<rect x="0" y="123.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-6">
<clipPath id="terminal-2174466350-line-6">
<rect x="0" y="147.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-7">
<clipPath id="terminal-2174466350-line-7">
<rect x="0" y="172.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-8">
<clipPath id="terminal-2174466350-line-8">
<rect x="0" y="196.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2684787815-line-9">
<clipPath id="terminal-2174466350-line-9">
<rect x="0" y="221.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2174466350-line-10">
<rect x="0" y="245.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2174466350-line-11">
<rect x="0" y="269.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2174466350-line-12">
<rect x="0" y="294.3" width="854" height="24.65"/>
</clipPath>
</defs>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="316.4" rx="8"/><text class="terminal-2684787815-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;--help</text>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="389.6" rx="8"/><text class="terminal-2174466350-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;--help</text>
<g transform="translate(32,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
<circle cx="44" cy="0" r="7" fill="#28c840"/>
</g>
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-2684787815-clip-terminal)">
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-2174466350-clip-terminal)">
<g class="terminal-2684787815-matrix">
<text class="terminal-2684787815-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-2684787815-line-0)">usage</text><text class="terminal-2684787815-r2" x="61" y="20" textLength="341.6" clip-path="url(#terminal-2684787815-line-0)">:&#160;viv&#160;exe&#160;[-h]&#160;&lt;sub-cmd&gt;&#160;...</text><text class="terminal-2684787815-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-2684787815-line-0)">
</text><text class="terminal-2684787815-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-2684787815-line-1)">
</text><text class="terminal-2684787815-r2" x="0" y="68.8" textLength="402.6" clip-path="url(#terminal-2684787815-line-2)">run&#160;python/pip&#160;in&#160;existing&#160;vivenv</text><text class="terminal-2684787815-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-2684787815-line-2)">
</text><text class="terminal-2684787815-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-2684787815-line-3)">
</text><text class="terminal-2684787815-r1" x="0" y="117.6" textLength="85.4" clip-path="url(#terminal-2684787815-line-4)">options</text><text class="terminal-2684787815-r2" x="85.4" y="117.6" textLength="12.2" clip-path="url(#terminal-2684787815-line-4)">:</text><text class="terminal-2684787815-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-2684787815-line-4)">
</text><text class="terminal-2684787815-r3" x="24.4" y="142" textLength="24.4" clip-path="url(#terminal-2684787815-line-5)">-h</text><text class="terminal-2684787815-r2" x="48.8" y="142" textLength="24.4" clip-path="url(#terminal-2684787815-line-5)">,&#160;</text><text class="terminal-2684787815-r3" x="73.2" y="142" textLength="73.2" clip-path="url(#terminal-2684787815-line-5)">--help</text><text class="terminal-2684787815-r2" x="146.4" y="142" textLength="427" clip-path="url(#terminal-2684787815-line-5)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-2684787815-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-2684787815-line-5)">
</text><text class="terminal-2684787815-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-2684787815-line-6)">
</text><text class="terminal-2684787815-r1" x="0" y="190.8" textLength="122" clip-path="url(#terminal-2684787815-line-7)">subcommand</text><text class="terminal-2684787815-r2" x="122" y="190.8" textLength="12.2" clip-path="url(#terminal-2684787815-line-7)">:</text><text class="terminal-2684787815-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-2684787815-line-7)">
</text><text class="terminal-2684787815-r3" x="24.4" y="215.2" textLength="109.8" clip-path="url(#terminal-2684787815-line-8)">&lt;sub-cmd&gt;</text><text class="terminal-2684787815-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-2684787815-line-8)">
</text><text class="terminal-2684787815-r3" x="48.8" y="239.6" textLength="36.6" clip-path="url(#terminal-2684787815-line-9)">pip</text><text class="terminal-2684787815-r2" x="85.4" y="239.6" textLength="305" clip-path="url(#terminal-2684787815-line-9)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;run&#160;cmd&#160;with&#160;pip</text><text class="terminal-2684787815-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-2684787815-line-9)">
</text><text class="terminal-2684787815-r3" x="48.8" y="264" textLength="73.2" clip-path="url(#terminal-2684787815-line-10)">python</text><text class="terminal-2684787815-r2" x="122" y="264" textLength="305" clip-path="url(#terminal-2684787815-line-10)">&#160;&#160;&#160;&#160;&#160;&#160;run&#160;cmd&#160;with&#160;python</text><text class="terminal-2684787815-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-2684787815-line-10)">
<g class="terminal-2174466350-matrix">
<text class="terminal-2174466350-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-2174466350-line-0)">usage</text><text class="terminal-2174466350-r2" x="61" y="20" textLength="305" clip-path="url(#terminal-2174466350-line-0)">:&#160;viv&#160;exe&#160;[-h]&#160;vivenv&#160;cmd</text><text class="terminal-2174466350-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-2174466350-line-0)">
</text><text class="terminal-2174466350-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-2174466350-line-1)">
</text><text class="terminal-2174466350-r2" x="0" y="68.8" textLength="439.2" clip-path="url(#terminal-2174466350-line-2)">run&#160;binary/script&#160;in&#160;existing&#160;vivenv</text><text class="terminal-2174466350-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-2174466350-line-2)">
</text><text class="terminal-2174466350-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-2174466350-line-3)">
</text><text class="terminal-2174466350-r2" x="0" y="117.6" textLength="109.8" clip-path="url(#terminal-2174466350-line-4)">examples:</text><text class="terminal-2174466350-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-2174466350-line-4)">
</text><text class="terminal-2174466350-r2" x="0" y="142" textLength="390.4" clip-path="url(#terminal-2174466350-line-5)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;pip&#160;--&#160;list</text><text class="terminal-2174466350-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-2174466350-line-5)">
</text><text class="terminal-2174466350-r2" x="0" y="166.4" textLength="488" clip-path="url(#terminal-2174466350-line-6)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;python&#160;--&#160;script.py</text><text class="terminal-2174466350-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-2174466350-line-6)">
</text><text class="terminal-2174466350-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-2174466350-line-7)">
</text><text class="terminal-2174466350-r1" x="0" y="215.2" textLength="244" clip-path="url(#terminal-2174466350-line-8)">positional&#160;arguments</text><text class="terminal-2174466350-r2" x="244" y="215.2" textLength="12.2" clip-path="url(#terminal-2174466350-line-8)">:</text><text class="terminal-2174466350-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-2174466350-line-8)">
</text><text class="terminal-2174466350-r3" x="24.4" y="239.6" textLength="73.2" clip-path="url(#terminal-2174466350-line-9)">vivenv</text><text class="terminal-2174466350-r2" x="97.6" y="239.6" textLength="329.4" clip-path="url(#terminal-2174466350-line-9)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;name/hash&#160;of&#160;vivenv</text><text class="terminal-2174466350-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-2174466350-line-9)">
</text><text class="terminal-2174466350-r3" x="24.4" y="264" textLength="36.6" clip-path="url(#terminal-2174466350-line-10)">cmd</text><text class="terminal-2174466350-r2" x="61" y="264" textLength="390.4" clip-path="url(#terminal-2174466350-line-10)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;command&#160;to&#160;to&#160;execute</text><text class="terminal-2174466350-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-2174466350-line-10)">
</text><text class="terminal-2174466350-r2" x="854" y="288.4" textLength="12.2" clip-path="url(#terminal-2174466350-line-11)">
</text><text class="terminal-2174466350-r1" x="0" y="312.8" textLength="85.4" clip-path="url(#terminal-2174466350-line-12)">options</text><text class="terminal-2174466350-r2" x="85.4" y="312.8" textLength="12.2" clip-path="url(#terminal-2174466350-line-12)">:</text><text class="terminal-2174466350-r2" x="854" y="312.8" textLength="12.2" clip-path="url(#terminal-2174466350-line-12)">
</text><text class="terminal-2174466350-r3" x="24.4" y="337.2" textLength="24.4" clip-path="url(#terminal-2174466350-line-13)">-h</text><text class="terminal-2174466350-r2" x="48.8" y="337.2" textLength="24.4" clip-path="url(#terminal-2174466350-line-13)">,&#160;</text><text class="terminal-2174466350-r3" x="73.2" y="337.2" textLength="73.2" clip-path="url(#terminal-2174466350-line-13)">--help</text><text class="terminal-2174466350-r2" x="146.4" y="337.2" textLength="427" clip-path="url(#terminal-2174466350-line-13)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-2174466350-r2" x="854" y="337.2" textLength="12.2" clip-path="url(#terminal-2174466350-line-13)">
</text>
</g>
</g>

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

@ -1,4 +1,4 @@
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 277.5333333333333" xmlns="http://www.w3.org/2000/svg">
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 423.9333333333333" xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io & yartsu https://github.com/daylinmorgan/yartsu -->
<style>
@ -19,14 +19,14 @@
font-weight: 700;
}
.terminal-2240111166-matrix {
.terminal-1793440407-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
.terminal-2240111166-title {
.terminal-1793440407-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
@ -36,56 +36,80 @@
-webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
}
.terminal-2240111166-r1 { fill: #94e2d5;font-weight: bold }
.terminal-2240111166-r2 { fill: #c6d0f5 }
.terminal-2240111166-r3 { fill: #f9e2af;font-weight: bold }
.terminal-1793440407-r1 { fill: #94e2d5;font-weight: bold }
.terminal-1793440407-r2 { fill: #c6d0f5 }
.terminal-1793440407-r3 { fill: #f9e2af;font-weight: bold }
</style>
<defs>
<clipPath id="terminal-2240111166-clip-terminal">
<rect x="0" y="0" width="853.0" height="194.2" />
<clipPath id="terminal-1793440407-clip-terminal">
<rect x="0" y="0" width="853.0" height="340.59999999999997" />
</clipPath>
<clipPath id="terminal-2240111166-line-0">
<clipPath id="terminal-1793440407-line-0">
<rect x="0" y="1.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-1">
<clipPath id="terminal-1793440407-line-1">
<rect x="0" y="25.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-2">
<clipPath id="terminal-1793440407-line-2">
<rect x="0" y="50.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-3">
<clipPath id="terminal-1793440407-line-3">
<rect x="0" y="74.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-4">
<clipPath id="terminal-1793440407-line-4">
<rect x="0" y="99.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-5">
<clipPath id="terminal-1793440407-line-5">
<rect x="0" y="123.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2240111166-line-6">
<clipPath id="terminal-1793440407-line-6">
<rect x="0" y="147.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-7">
<rect x="0" y="172.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-8">
<rect x="0" y="196.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-9">
<rect x="0" y="221.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-10">
<rect x="0" y="245.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-11">
<rect x="0" y="269.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1793440407-line-12">
<rect x="0" y="294.3" width="854" height="24.65"/>
</clipPath>
</defs>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="243.2" rx="8"/><text class="terminal-2240111166-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;pip&#160;--help</text>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="389.6" rx="8"/><text class="terminal-1793440407-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;pip&#160;--help</text>
<g transform="translate(32,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
<circle cx="44" cy="0" r="7" fill="#28c840"/>
</g>
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-2240111166-clip-terminal)">
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-1793440407-clip-terminal)">
<g class="terminal-2240111166-matrix">
<text class="terminal-2240111166-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-2240111166-line-0)">usage</text><text class="terminal-2240111166-r2" x="61" y="20" textLength="427" clip-path="url(#terminal-2240111166-line-0)">:&#160;viv&#160;exe&#160;pip&#160;[-h]&#160;vivenv&#160;[cmd&#160;...]</text><text class="terminal-2240111166-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-2240111166-line-0)">
</text><text class="terminal-2240111166-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-2240111166-line-1)">
</text><text class="terminal-2240111166-r1" x="0" y="68.8" textLength="244" clip-path="url(#terminal-2240111166-line-2)">positional&#160;arguments</text><text class="terminal-2240111166-r2" x="244" y="68.8" textLength="12.2" clip-path="url(#terminal-2240111166-line-2)">:</text><text class="terminal-2240111166-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-2240111166-line-2)">
</text><text class="terminal-2240111166-r3" x="24.4" y="93.2" textLength="73.2" clip-path="url(#terminal-2240111166-line-3)">vivenv</text><text class="terminal-2240111166-r2" x="97.6" y="93.2" textLength="329.4" clip-path="url(#terminal-2240111166-line-3)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;name/hash&#160;of&#160;vivenv</text><text class="terminal-2240111166-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-2240111166-line-3)">
</text><text class="terminal-2240111166-r3" x="24.4" y="117.6" textLength="36.6" clip-path="url(#terminal-2240111166-line-4)">cmd</text><text class="terminal-2240111166-r2" x="61" y="117.6" textLength="390.4" clip-path="url(#terminal-2240111166-line-4)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;command&#160;to&#160;to&#160;execute</text><text class="terminal-2240111166-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-2240111166-line-4)">
</text><text class="terminal-2240111166-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-2240111166-line-5)">
</text><text class="terminal-2240111166-r1" x="0" y="166.4" textLength="85.4" clip-path="url(#terminal-2240111166-line-6)">options</text><text class="terminal-2240111166-r2" x="85.4" y="166.4" textLength="12.2" clip-path="url(#terminal-2240111166-line-6)">:</text><text class="terminal-2240111166-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-2240111166-line-6)">
</text><text class="terminal-2240111166-r3" x="24.4" y="190.8" textLength="24.4" clip-path="url(#terminal-2240111166-line-7)">-h</text><text class="terminal-2240111166-r2" x="48.8" y="190.8" textLength="24.4" clip-path="url(#terminal-2240111166-line-7)">,&#160;</text><text class="terminal-2240111166-r3" x="73.2" y="190.8" textLength="73.2" clip-path="url(#terminal-2240111166-line-7)">--help</text><text class="terminal-2240111166-r2" x="146.4" y="190.8" textLength="427" clip-path="url(#terminal-2240111166-line-7)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-2240111166-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-2240111166-line-7)">
<g class="terminal-1793440407-matrix">
<text class="terminal-1793440407-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-1793440407-line-0)">usage</text><text class="terminal-1793440407-r2" x="61" y="20" textLength="305" clip-path="url(#terminal-1793440407-line-0)">:&#160;viv&#160;exe&#160;[-h]&#160;vivenv&#160;cmd</text><text class="terminal-1793440407-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-1793440407-line-0)">
</text><text class="terminal-1793440407-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-1793440407-line-1)">
</text><text class="terminal-1793440407-r2" x="0" y="68.8" textLength="439.2" clip-path="url(#terminal-1793440407-line-2)">run&#160;binary/script&#160;in&#160;existing&#160;vivenv</text><text class="terminal-1793440407-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-1793440407-line-2)">
</text><text class="terminal-1793440407-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-1793440407-line-3)">
</text><text class="terminal-1793440407-r2" x="0" y="117.6" textLength="109.8" clip-path="url(#terminal-1793440407-line-4)">examples:</text><text class="terminal-1793440407-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-1793440407-line-4)">
</text><text class="terminal-1793440407-r2" x="0" y="142" textLength="390.4" clip-path="url(#terminal-1793440407-line-5)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;pip&#160;--&#160;list</text><text class="terminal-1793440407-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-1793440407-line-5)">
</text><text class="terminal-1793440407-r2" x="0" y="166.4" textLength="488" clip-path="url(#terminal-1793440407-line-6)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;python&#160;--&#160;script.py</text><text class="terminal-1793440407-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-1793440407-line-6)">
</text><text class="terminal-1793440407-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-1793440407-line-7)">
</text><text class="terminal-1793440407-r1" x="0" y="215.2" textLength="244" clip-path="url(#terminal-1793440407-line-8)">positional&#160;arguments</text><text class="terminal-1793440407-r2" x="244" y="215.2" textLength="12.2" clip-path="url(#terminal-1793440407-line-8)">:</text><text class="terminal-1793440407-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-1793440407-line-8)">
</text><text class="terminal-1793440407-r3" x="24.4" y="239.6" textLength="73.2" clip-path="url(#terminal-1793440407-line-9)">vivenv</text><text class="terminal-1793440407-r2" x="97.6" y="239.6" textLength="329.4" clip-path="url(#terminal-1793440407-line-9)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;name/hash&#160;of&#160;vivenv</text><text class="terminal-1793440407-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-1793440407-line-9)">
</text><text class="terminal-1793440407-r3" x="24.4" y="264" textLength="36.6" clip-path="url(#terminal-1793440407-line-10)">cmd</text><text class="terminal-1793440407-r2" x="61" y="264" textLength="390.4" clip-path="url(#terminal-1793440407-line-10)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;command&#160;to&#160;to&#160;execute</text><text class="terminal-1793440407-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-1793440407-line-10)">
</text><text class="terminal-1793440407-r2" x="854" y="288.4" textLength="12.2" clip-path="url(#terminal-1793440407-line-11)">
</text><text class="terminal-1793440407-r1" x="0" y="312.8" textLength="85.4" clip-path="url(#terminal-1793440407-line-12)">options</text><text class="terminal-1793440407-r2" x="85.4" y="312.8" textLength="12.2" clip-path="url(#terminal-1793440407-line-12)">:</text><text class="terminal-1793440407-r2" x="854" y="312.8" textLength="12.2" clip-path="url(#terminal-1793440407-line-12)">
</text><text class="terminal-1793440407-r3" x="24.4" y="337.2" textLength="24.4" clip-path="url(#terminal-1793440407-line-13)">-h</text><text class="terminal-1793440407-r2" x="48.8" y="337.2" textLength="24.4" clip-path="url(#terminal-1793440407-line-13)">,&#160;</text><text class="terminal-1793440407-r3" x="73.2" y="337.2" textLength="73.2" clip-path="url(#terminal-1793440407-line-13)">--help</text><text class="terminal-1793440407-r2" x="146.4" y="337.2" textLength="427" clip-path="url(#terminal-1793440407-line-13)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-1793440407-r2" x="854" y="337.2" textLength="12.2" clip-path="url(#terminal-1793440407-line-13)">
</text>
</g>
</g>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

@ -1,4 +1,4 @@
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 277.5333333333333" xmlns="http://www.w3.org/2000/svg">
<svg class="rich-terminal shadow" viewBox="0 0 890.3333333333334 423.9333333333333" xmlns="http://www.w3.org/2000/svg">
<!-- Generated with Rich https://www.textualize.io & yartsu https://github.com/daylinmorgan/yartsu -->
<style>
@ -19,14 +19,14 @@
font-weight: 700;
}
.terminal-1517577456-matrix {
.terminal-2696068080-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
.terminal-1517577456-title {
.terminal-2696068080-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
@ -36,56 +36,80 @@
-webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
}
.terminal-1517577456-r1 { fill: #94e2d5;font-weight: bold }
.terminal-1517577456-r2 { fill: #c6d0f5 }
.terminal-1517577456-r3 { fill: #f9e2af;font-weight: bold }
.terminal-2696068080-r1 { fill: #94e2d5;font-weight: bold }
.terminal-2696068080-r2 { fill: #c6d0f5 }
.terminal-2696068080-r3 { fill: #f9e2af;font-weight: bold }
</style>
<defs>
<clipPath id="terminal-1517577456-clip-terminal">
<rect x="0" y="0" width="853.0" height="194.2" />
<clipPath id="terminal-2696068080-clip-terminal">
<rect x="0" y="0" width="853.0" height="340.59999999999997" />
</clipPath>
<clipPath id="terminal-1517577456-line-0">
<clipPath id="terminal-2696068080-line-0">
<rect x="0" y="1.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-1">
<clipPath id="terminal-2696068080-line-1">
<rect x="0" y="25.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-2">
<clipPath id="terminal-2696068080-line-2">
<rect x="0" y="50.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-3">
<clipPath id="terminal-2696068080-line-3">
<rect x="0" y="74.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-4">
<clipPath id="terminal-2696068080-line-4">
<rect x="0" y="99.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-5">
<clipPath id="terminal-2696068080-line-5">
<rect x="0" y="123.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1517577456-line-6">
<clipPath id="terminal-2696068080-line-6">
<rect x="0" y="147.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-7">
<rect x="0" y="172.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-8">
<rect x="0" y="196.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-9">
<rect x="0" y="221.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-10">
<rect x="0" y="245.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-11">
<rect x="0" y="269.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-2696068080-line-12">
<rect x="0" y="294.3" width="854" height="24.65"/>
</clipPath>
</defs>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="243.2" rx="8"/><text class="terminal-1517577456-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;python&#160;--help</text>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="389.6" rx="8"/><text class="terminal-2696068080-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;exe&#160;python&#160;--help</text>
<g transform="translate(32,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
<circle cx="44" cy="0" r="7" fill="#28c840"/>
</g>
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-1517577456-clip-terminal)">
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-2696068080-clip-terminal)">
<g class="terminal-1517577456-matrix">
<text class="terminal-1517577456-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-1517577456-line-0)">usage</text><text class="terminal-1517577456-r2" x="61" y="20" textLength="463.6" clip-path="url(#terminal-1517577456-line-0)">:&#160;viv&#160;exe&#160;python&#160;[-h]&#160;vivenv&#160;[cmd&#160;...]</text><text class="terminal-1517577456-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-1517577456-line-0)">
</text><text class="terminal-1517577456-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-1517577456-line-1)">
</text><text class="terminal-1517577456-r1" x="0" y="68.8" textLength="244" clip-path="url(#terminal-1517577456-line-2)">positional&#160;arguments</text><text class="terminal-1517577456-r2" x="244" y="68.8" textLength="12.2" clip-path="url(#terminal-1517577456-line-2)">:</text><text class="terminal-1517577456-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-1517577456-line-2)">
</text><text class="terminal-1517577456-r3" x="24.4" y="93.2" textLength="73.2" clip-path="url(#terminal-1517577456-line-3)">vivenv</text><text class="terminal-1517577456-r2" x="97.6" y="93.2" textLength="329.4" clip-path="url(#terminal-1517577456-line-3)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;name/hash&#160;of&#160;vivenv</text><text class="terminal-1517577456-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-1517577456-line-3)">
</text><text class="terminal-1517577456-r3" x="24.4" y="117.6" textLength="36.6" clip-path="url(#terminal-1517577456-line-4)">cmd</text><text class="terminal-1517577456-r2" x="61" y="117.6" textLength="390.4" clip-path="url(#terminal-1517577456-line-4)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;command&#160;to&#160;to&#160;execute</text><text class="terminal-1517577456-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-1517577456-line-4)">
</text><text class="terminal-1517577456-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-1517577456-line-5)">
</text><text class="terminal-1517577456-r1" x="0" y="166.4" textLength="85.4" clip-path="url(#terminal-1517577456-line-6)">options</text><text class="terminal-1517577456-r2" x="85.4" y="166.4" textLength="12.2" clip-path="url(#terminal-1517577456-line-6)">:</text><text class="terminal-1517577456-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-1517577456-line-6)">
</text><text class="terminal-1517577456-r3" x="24.4" y="190.8" textLength="24.4" clip-path="url(#terminal-1517577456-line-7)">-h</text><text class="terminal-1517577456-r2" x="48.8" y="190.8" textLength="24.4" clip-path="url(#terminal-1517577456-line-7)">,&#160;</text><text class="terminal-1517577456-r3" x="73.2" y="190.8" textLength="73.2" clip-path="url(#terminal-1517577456-line-7)">--help</text><text class="terminal-1517577456-r2" x="146.4" y="190.8" textLength="427" clip-path="url(#terminal-1517577456-line-7)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-1517577456-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-1517577456-line-7)">
<g class="terminal-2696068080-matrix">
<text class="terminal-2696068080-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-2696068080-line-0)">usage</text><text class="terminal-2696068080-r2" x="61" y="20" textLength="305" clip-path="url(#terminal-2696068080-line-0)">:&#160;viv&#160;exe&#160;[-h]&#160;vivenv&#160;cmd</text><text class="terminal-2696068080-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-2696068080-line-0)">
</text><text class="terminal-2696068080-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-2696068080-line-1)">
</text><text class="terminal-2696068080-r2" x="0" y="68.8" textLength="439.2" clip-path="url(#terminal-2696068080-line-2)">run&#160;binary/script&#160;in&#160;existing&#160;vivenv</text><text class="terminal-2696068080-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-2696068080-line-2)">
</text><text class="terminal-2696068080-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-2696068080-line-3)">
</text><text class="terminal-2696068080-r2" x="0" y="117.6" textLength="109.8" clip-path="url(#terminal-2696068080-line-4)">examples:</text><text class="terminal-2696068080-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-2696068080-line-4)">
</text><text class="terminal-2696068080-r2" x="0" y="142" textLength="390.4" clip-path="url(#terminal-2696068080-line-5)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;pip&#160;--&#160;list</text><text class="terminal-2696068080-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-2696068080-line-5)">
</text><text class="terminal-2696068080-r2" x="0" y="166.4" textLength="488" clip-path="url(#terminal-2696068080-line-6)">&#160;&#160;&#160;&#160;viv&#160;exe&#160;&lt;vivenv&gt;&#160;python&#160;--&#160;script.py</text><text class="terminal-2696068080-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-2696068080-line-6)">
</text><text class="terminal-2696068080-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-2696068080-line-7)">
</text><text class="terminal-2696068080-r1" x="0" y="215.2" textLength="244" clip-path="url(#terminal-2696068080-line-8)">positional&#160;arguments</text><text class="terminal-2696068080-r2" x="244" y="215.2" textLength="12.2" clip-path="url(#terminal-2696068080-line-8)">:</text><text class="terminal-2696068080-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-2696068080-line-8)">
</text><text class="terminal-2696068080-r3" x="24.4" y="239.6" textLength="73.2" clip-path="url(#terminal-2696068080-line-9)">vivenv</text><text class="terminal-2696068080-r2" x="97.6" y="239.6" textLength="329.4" clip-path="url(#terminal-2696068080-line-9)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;name/hash&#160;of&#160;vivenv</text><text class="terminal-2696068080-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-2696068080-line-9)">
</text><text class="terminal-2696068080-r3" x="24.4" y="264" textLength="36.6" clip-path="url(#terminal-2696068080-line-10)">cmd</text><text class="terminal-2696068080-r2" x="61" y="264" textLength="390.4" clip-path="url(#terminal-2696068080-line-10)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;command&#160;to&#160;to&#160;execute</text><text class="terminal-2696068080-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-2696068080-line-10)">
</text><text class="terminal-2696068080-r2" x="854" y="288.4" textLength="12.2" clip-path="url(#terminal-2696068080-line-11)">
</text><text class="terminal-2696068080-r1" x="0" y="312.8" textLength="85.4" clip-path="url(#terminal-2696068080-line-12)">options</text><text class="terminal-2696068080-r2" x="85.4" y="312.8" textLength="12.2" clip-path="url(#terminal-2696068080-line-12)">:</text><text class="terminal-2696068080-r2" x="854" y="312.8" textLength="12.2" clip-path="url(#terminal-2696068080-line-12)">
</text><text class="terminal-2696068080-r3" x="24.4" y="337.2" textLength="24.4" clip-path="url(#terminal-2696068080-line-13)">-h</text><text class="terminal-2696068080-r2" x="48.8" y="337.2" textLength="24.4" clip-path="url(#terminal-2696068080-line-13)">,&#160;</text><text class="terminal-2696068080-r3" x="73.2" y="337.2" textLength="73.2" clip-path="url(#terminal-2696068080-line-13)">--help</text><text class="terminal-2696068080-r2" x="146.4" y="337.2" textLength="427" clip-path="url(#terminal-2696068080-line-13)">&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-2696068080-r2" x="854" y="337.2" textLength="12.2" clip-path="url(#terminal-2696068080-line-13)">
</text>
</g>
</g>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

View file

@ -19,14 +19,14 @@
font-weight: 700;
}
.terminal-1825138163-matrix {
.terminal-2508285730-matrix {
font-family: Fira Code, monospace;
font-size: 20px;
line-height: 24.4px;
font-variant-east-asian: full-width;
}
.terminal-1825138163-title {
.terminal-2508285730-title {
font-size: 18px;
font-weight: bold;
font-family: arial;
@ -36,110 +36,110 @@
-webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7));
}
.terminal-1825138163-r1 { fill: #94e2d5;font-weight: bold }
.terminal-1825138163-r2 { fill: #c6d0f5 }
.terminal-1825138163-r3 { fill: #f5c2e7;font-weight: bold }
.terminal-1825138163-r4 { fill: #c6d0f5;font-weight: bold }
.terminal-1825138163-r5 { fill: #f9e2af;font-weight: bold }
.terminal-2508285730-r1 { fill: #94e2d5;font-weight: bold }
.terminal-2508285730-r2 { fill: #c6d0f5 }
.terminal-2508285730-r3 { fill: #f5c2e7;font-weight: bold }
.terminal-2508285730-r4 { fill: #c6d0f5;font-weight: bold }
.terminal-2508285730-r5 { fill: #f9e2af;font-weight: bold }
</style>
<defs>
<clipPath id="terminal-1825138163-clip-terminal">
<clipPath id="terminal-2508285730-clip-terminal">
<rect x="0" y="0" width="853.0" height="511.4" />
</clipPath>
<clipPath id="terminal-1825138163-line-0">
<clipPath id="terminal-2508285730-line-0">
<rect x="0" y="1.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-1">
<clipPath id="terminal-2508285730-line-1">
<rect x="0" y="25.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-2">
<clipPath id="terminal-2508285730-line-2">
<rect x="0" y="50.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-3">
<clipPath id="terminal-2508285730-line-3">
<rect x="0" y="74.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-4">
<clipPath id="terminal-2508285730-line-4">
<rect x="0" y="99.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-5">
<clipPath id="terminal-2508285730-line-5">
<rect x="0" y="123.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-6">
<clipPath id="terminal-2508285730-line-6">
<rect x="0" y="147.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-7">
<clipPath id="terminal-2508285730-line-7">
<rect x="0" y="172.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-8">
<clipPath id="terminal-2508285730-line-8">
<rect x="0" y="196.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-9">
<clipPath id="terminal-2508285730-line-9">
<rect x="0" y="221.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-10">
<clipPath id="terminal-2508285730-line-10">
<rect x="0" y="245.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-11">
<clipPath id="terminal-2508285730-line-11">
<rect x="0" y="269.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-12">
<clipPath id="terminal-2508285730-line-12">
<rect x="0" y="294.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-13">
<clipPath id="terminal-2508285730-line-13">
<rect x="0" y="318.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-14">
<clipPath id="terminal-2508285730-line-14">
<rect x="0" y="343.1" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-15">
<clipPath id="terminal-2508285730-line-15">
<rect x="0" y="367.5" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-16">
<clipPath id="terminal-2508285730-line-16">
<rect x="0" y="391.9" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-17">
<clipPath id="terminal-2508285730-line-17">
<rect x="0" y="416.3" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-18">
<clipPath id="terminal-2508285730-line-18">
<rect x="0" y="440.7" width="854" height="24.65"/>
</clipPath>
<clipPath id="terminal-1825138163-line-19">
<clipPath id="terminal-2508285730-line-19">
<rect x="0" y="465.1" width="854" height="24.65"/>
</clipPath>
</defs>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="560.4" rx="8"/><text class="terminal-1825138163-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;&#160;--help</text>
<rect fill="#1e1e2e" stroke="rgba(255,255,255,0.35)" stroke-width="1" x="10.1667" y="1" width="870" height="560.4" rx="8"/><text class="terminal-2508285730-title" fill="#c6d0f5" text-anchor="middle" x="435" y="27">viv&#160;&#160;--help</text>
<g transform="translate(32,22)">
<circle cx="0" cy="0" r="7" fill="#ff5f57"/>
<circle cx="22" cy="0" r="7" fill="#febc2e"/>
<circle cx="44" cy="0" r="7" fill="#28c840"/>
</g>
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-1825138163-clip-terminal)">
<g transform="translate(18.166666666666664, 41) scale(.95)" clip-path="url(#terminal-2508285730-clip-terminal)">
<g class="terminal-1825138163-matrix">
<text class="terminal-1825138163-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-1825138163-line-0)">usage</text><text class="terminal-1825138163-r2" x="61" y="20" textLength="353.8" clip-path="url(#terminal-1825138163-line-0)">:&#160;viv&#160;[-h]&#160;[-V]&#160;&lt;sub-cmd&gt;&#160;...</text><text class="terminal-1825138163-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-1825138163-line-0)">
</text><text class="terminal-1825138163-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-1825138163-line-1)">
</text><text class="terminal-1825138163-r3" x="0" y="68.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-2)">v</text><text class="terminal-1825138163-r1" x="12.2" y="68.8" textLength="24.4" clip-path="url(#terminal-1825138163-line-2)">iv</text><text class="terminal-1825138163-r3" x="48.8" y="68.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-2)">i</text><text class="terminal-1825138163-r1" x="61" y="68.8" textLength="48.8" clip-path="url(#terminal-1825138163-line-2)">sn&#x27;t</text><text class="terminal-1825138163-r3" x="122" y="68.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-2)">v</text><text class="terminal-1825138163-r1" x="134.2" y="68.8" textLength="48.8" clip-path="url(#terminal-1825138163-line-2)">env!</text><text class="terminal-1825138163-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-2)">
</text><text class="terminal-1825138163-r2" x="0" y="93.2" textLength="341.6" clip-path="url(#terminal-1825138163-line-3)">to&#160;create/activate&#160;a&#160;vivenv:</text><text class="terminal-1825138163-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-1825138163-line-3)">
</text><text class="terminal-1825138163-r2" x="0" y="117.6" textLength="268.4" clip-path="url(#terminal-1825138163-line-4)">-&#160;from&#160;command&#160;line:&#160;`</text><text class="terminal-1825138163-r4" x="268.4" y="117.6" textLength="73.2" clip-path="url(#terminal-1825138163-line-4)">viv&#160;-h</text><text class="terminal-1825138163-r2" x="341.6" y="117.6" textLength="12.2" clip-path="url(#terminal-1825138163-line-4)">`</text><text class="terminal-1825138163-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-1825138163-line-4)">
</text><text class="terminal-1825138163-r2" x="0" y="142" textLength="292.8" clip-path="url(#terminal-1825138163-line-5)">-&#160;within&#160;python&#160;script:&#160;</text><text class="terminal-1825138163-r4" x="292.8" y="142" textLength="536.8" clip-path="url(#terminal-1825138163-line-5)">__import__(&quot;viv&quot;).use(&quot;typer&quot;,&#160;&quot;rich-click&quot;)</text><text class="terminal-1825138163-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-1825138163-line-5)">
</text><text class="terminal-1825138163-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-1825138163-line-6)">
</text><text class="terminal-1825138163-r1" x="0" y="190.8" textLength="85.4" clip-path="url(#terminal-1825138163-line-7)">options</text><text class="terminal-1825138163-r2" x="85.4" y="190.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-7)">:</text><text class="terminal-1825138163-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-7)">
</text><text class="terminal-1825138163-r5" x="24.4" y="215.2" textLength="24.4" clip-path="url(#terminal-1825138163-line-8)">-h</text><text class="terminal-1825138163-r2" x="48.8" y="215.2" textLength="24.4" clip-path="url(#terminal-1825138163-line-8)">,&#160;</text><text class="terminal-1825138163-r5" x="73.2" y="215.2" textLength="73.2" clip-path="url(#terminal-1825138163-line-8)">--help</text><text class="terminal-1825138163-r2" x="146.4" y="215.2" textLength="463.6" clip-path="url(#terminal-1825138163-line-8)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-1825138163-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-1825138163-line-8)">
</text><text class="terminal-1825138163-r5" x="24.4" y="239.6" textLength="24.4" clip-path="url(#terminal-1825138163-line-9)">-V</text><text class="terminal-1825138163-r2" x="48.8" y="239.6" textLength="24.4" clip-path="url(#terminal-1825138163-line-9)">,&#160;</text><text class="terminal-1825138163-r5" x="73.2" y="239.6" textLength="109.8" clip-path="url(#terminal-1825138163-line-9)">--version</text><text class="terminal-1825138163-r2" x="183" y="239.6" textLength="512.4" clip-path="url(#terminal-1825138163-line-9)">&#160;&#160;&#160;&#160;show&#160;program&#x27;s&#160;version&#160;number&#160;and&#160;exit</text><text class="terminal-1825138163-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-1825138163-line-9)">
</text><text class="terminal-1825138163-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-1825138163-line-10)">
</text><text class="terminal-1825138163-r1" x="0" y="288.4" textLength="134.2" clip-path="url(#terminal-1825138163-line-11)">subcommands</text><text class="terminal-1825138163-r2" x="134.2" y="288.4" textLength="12.2" clip-path="url(#terminal-1825138163-line-11)">:</text><text class="terminal-1825138163-r2" x="854" y="288.4" textLength="12.2" clip-path="url(#terminal-1825138163-line-11)">
</text><text class="terminal-1825138163-r5" x="24.4" y="312.8" textLength="109.8" clip-path="url(#terminal-1825138163-line-12)">&lt;sub-cmd&gt;</text><text class="terminal-1825138163-r2" x="854" y="312.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-12)">
</text><text class="terminal-1825138163-r5" x="48.8" y="337.2" textLength="97.6" clip-path="url(#terminal-1825138163-line-13)">list&#160;(l)</text><text class="terminal-1825138163-r2" x="146.4" y="337.2" textLength="280.6" clip-path="url(#terminal-1825138163-line-13)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;list&#160;all&#160;vivenvs</text><text class="terminal-1825138163-r2" x="854" y="337.2" textLength="12.2" clip-path="url(#terminal-1825138163-line-13)">
</text><text class="terminal-1825138163-r5" x="48.8" y="361.6" textLength="85.4" clip-path="url(#terminal-1825138163-line-14)">exe&#160;(e)</text><text class="terminal-1825138163-r2" x="134.2" y="361.6" textLength="500.2" clip-path="url(#terminal-1825138163-line-14)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;run&#160;python/pip&#160;in&#160;existing&#160;vivenv</text><text class="terminal-1825138163-r2" x="854" y="361.6" textLength="12.2" clip-path="url(#terminal-1825138163-line-14)">
</text><text class="terminal-1825138163-r5" x="48.8" y="386" textLength="134.2" clip-path="url(#terminal-1825138163-line-15)">remove&#160;(rm)</text><text class="terminal-1825138163-r2" x="183" y="386" textLength="231.8" clip-path="url(#terminal-1825138163-line-15)">&#160;&#160;&#160;&#160;remove&#160;a&#160;vivenv</text><text class="terminal-1825138163-r2" x="854" y="386" textLength="12.2" clip-path="url(#terminal-1825138163-line-15)">
</text><text class="terminal-1825138163-r5" x="48.8" y="410.4" textLength="122" clip-path="url(#terminal-1825138163-line-16)">freeze&#160;(f)</text><text class="terminal-1825138163-r2" x="170.8" y="410.4" textLength="561.2" clip-path="url(#terminal-1825138163-line-16)">&#160;&#160;&#160;&#160;&#160;create&#160;import&#160;statement&#160;from&#160;package&#160;spec</text><text class="terminal-1825138163-r2" x="854" y="410.4" textLength="12.2" clip-path="url(#terminal-1825138163-line-16)">
</text><text class="terminal-1825138163-r5" x="48.8" y="434.8" textLength="97.6" clip-path="url(#terminal-1825138163-line-17)">info&#160;(i)</text><text class="terminal-1825138163-r2" x="146.4" y="434.8" textLength="414.8" clip-path="url(#terminal-1825138163-line-17)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;get&#160;metadata&#160;about&#160;a&#160;vivenv</text><text class="terminal-1825138163-r2" x="854" y="434.8" textLength="12.2" clip-path="url(#terminal-1825138163-line-17)">
</text><text class="terminal-1825138163-r5" x="48.8" y="459.2" textLength="122" clip-path="url(#terminal-1825138163-line-18)">manage&#160;(m)</text><text class="terminal-1825138163-r2" x="170.8" y="459.2" textLength="268.4" clip-path="url(#terminal-1825138163-line-18)">&#160;&#160;&#160;&#160;&#160;manage&#160;viv&#160;itself</text><text class="terminal-1825138163-r2" x="854" y="459.2" textLength="12.2" clip-path="url(#terminal-1825138163-line-18)">
</text><text class="terminal-1825138163-r5" x="48.8" y="483.6" textLength="97.6" clip-path="url(#terminal-1825138163-line-19)">shim&#160;(s)</text><text class="terminal-1825138163-r2" x="146.4" y="483.6" textLength="439.2" clip-path="url(#terminal-1825138163-line-19)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;generate&#160;viv-powered&#160;cli&#160;apps</text><text class="terminal-1825138163-r2" x="854" y="483.6" textLength="12.2" clip-path="url(#terminal-1825138163-line-19)">
</text><text class="terminal-1825138163-r5" x="48.8" y="508" textLength="85.4" clip-path="url(#terminal-1825138163-line-20)">run&#160;(r)</text><text class="terminal-1825138163-r2" x="134.2" y="508" textLength="500.2" clip-path="url(#terminal-1825138163-line-20)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;run&#160;an&#160;app&#160;with&#160;an&#160;on-demand&#160;venv</text><text class="terminal-1825138163-r2" x="854" y="508" textLength="12.2" clip-path="url(#terminal-1825138163-line-20)">
<g class="terminal-2508285730-matrix">
<text class="terminal-2508285730-r1" x="0" y="20" textLength="61" clip-path="url(#terminal-2508285730-line-0)">usage</text><text class="terminal-2508285730-r2" x="61" y="20" textLength="353.8" clip-path="url(#terminal-2508285730-line-0)">:&#160;viv&#160;[-h]&#160;[-V]&#160;&lt;sub-cmd&gt;&#160;...</text><text class="terminal-2508285730-r2" x="854" y="20" textLength="12.2" clip-path="url(#terminal-2508285730-line-0)">
</text><text class="terminal-2508285730-r2" x="854" y="44.4" textLength="12.2" clip-path="url(#terminal-2508285730-line-1)">
</text><text class="terminal-2508285730-r3" x="0" y="68.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-2)">v</text><text class="terminal-2508285730-r1" x="12.2" y="68.8" textLength="24.4" clip-path="url(#terminal-2508285730-line-2)">iv</text><text class="terminal-2508285730-r3" x="48.8" y="68.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-2)">i</text><text class="terminal-2508285730-r1" x="61" y="68.8" textLength="48.8" clip-path="url(#terminal-2508285730-line-2)">sn&#x27;t</text><text class="terminal-2508285730-r3" x="122" y="68.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-2)">v</text><text class="terminal-2508285730-r1" x="134.2" y="68.8" textLength="48.8" clip-path="url(#terminal-2508285730-line-2)">env!</text><text class="terminal-2508285730-r2" x="854" y="68.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-2)">
</text><text class="terminal-2508285730-r2" x="0" y="93.2" textLength="341.6" clip-path="url(#terminal-2508285730-line-3)">to&#160;create/activate&#160;a&#160;vivenv:</text><text class="terminal-2508285730-r2" x="854" y="93.2" textLength="12.2" clip-path="url(#terminal-2508285730-line-3)">
</text><text class="terminal-2508285730-r2" x="0" y="117.6" textLength="268.4" clip-path="url(#terminal-2508285730-line-4)">-&#160;from&#160;command&#160;line:&#160;`</text><text class="terminal-2508285730-r4" x="268.4" y="117.6" textLength="73.2" clip-path="url(#terminal-2508285730-line-4)">viv&#160;-h</text><text class="terminal-2508285730-r2" x="341.6" y="117.6" textLength="12.2" clip-path="url(#terminal-2508285730-line-4)">`</text><text class="terminal-2508285730-r2" x="854" y="117.6" textLength="12.2" clip-path="url(#terminal-2508285730-line-4)">
</text><text class="terminal-2508285730-r2" x="0" y="142" textLength="292.8" clip-path="url(#terminal-2508285730-line-5)">-&#160;within&#160;python&#160;script:&#160;</text><text class="terminal-2508285730-r4" x="292.8" y="142" textLength="536.8" clip-path="url(#terminal-2508285730-line-5)">__import__(&quot;viv&quot;).use(&quot;typer&quot;,&#160;&quot;rich-click&quot;)</text><text class="terminal-2508285730-r2" x="854" y="142" textLength="12.2" clip-path="url(#terminal-2508285730-line-5)">
</text><text class="terminal-2508285730-r2" x="854" y="166.4" textLength="12.2" clip-path="url(#terminal-2508285730-line-6)">
</text><text class="terminal-2508285730-r1" x="0" y="190.8" textLength="85.4" clip-path="url(#terminal-2508285730-line-7)">options</text><text class="terminal-2508285730-r2" x="85.4" y="190.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-7)">:</text><text class="terminal-2508285730-r2" x="854" y="190.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-7)">
</text><text class="terminal-2508285730-r5" x="24.4" y="215.2" textLength="24.4" clip-path="url(#terminal-2508285730-line-8)">-h</text><text class="terminal-2508285730-r2" x="48.8" y="215.2" textLength="24.4" clip-path="url(#terminal-2508285730-line-8)">,&#160;</text><text class="terminal-2508285730-r5" x="73.2" y="215.2" textLength="73.2" clip-path="url(#terminal-2508285730-line-8)">--help</text><text class="terminal-2508285730-r2" x="146.4" y="215.2" textLength="463.6" clip-path="url(#terminal-2508285730-line-8)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;show&#160;this&#160;help&#160;message&#160;and&#160;exit</text><text class="terminal-2508285730-r2" x="854" y="215.2" textLength="12.2" clip-path="url(#terminal-2508285730-line-8)">
</text><text class="terminal-2508285730-r5" x="24.4" y="239.6" textLength="24.4" clip-path="url(#terminal-2508285730-line-9)">-V</text><text class="terminal-2508285730-r2" x="48.8" y="239.6" textLength="24.4" clip-path="url(#terminal-2508285730-line-9)">,&#160;</text><text class="terminal-2508285730-r5" x="73.2" y="239.6" textLength="109.8" clip-path="url(#terminal-2508285730-line-9)">--version</text><text class="terminal-2508285730-r2" x="183" y="239.6" textLength="512.4" clip-path="url(#terminal-2508285730-line-9)">&#160;&#160;&#160;&#160;show&#160;program&#x27;s&#160;version&#160;number&#160;and&#160;exit</text><text class="terminal-2508285730-r2" x="854" y="239.6" textLength="12.2" clip-path="url(#terminal-2508285730-line-9)">
</text><text class="terminal-2508285730-r2" x="854" y="264" textLength="12.2" clip-path="url(#terminal-2508285730-line-10)">
</text><text class="terminal-2508285730-r1" x="0" y="288.4" textLength="134.2" clip-path="url(#terminal-2508285730-line-11)">subcommands</text><text class="terminal-2508285730-r2" x="134.2" y="288.4" textLength="12.2" clip-path="url(#terminal-2508285730-line-11)">:</text><text class="terminal-2508285730-r2" x="854" y="288.4" textLength="12.2" clip-path="url(#terminal-2508285730-line-11)">
</text><text class="terminal-2508285730-r5" x="24.4" y="312.8" textLength="109.8" clip-path="url(#terminal-2508285730-line-12)">&lt;sub-cmd&gt;</text><text class="terminal-2508285730-r2" x="854" y="312.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-12)">
</text><text class="terminal-2508285730-r5" x="48.8" y="337.2" textLength="97.6" clip-path="url(#terminal-2508285730-line-13)">list&#160;(l)</text><text class="terminal-2508285730-r2" x="146.4" y="337.2" textLength="280.6" clip-path="url(#terminal-2508285730-line-13)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;list&#160;all&#160;vivenvs</text><text class="terminal-2508285730-r2" x="854" y="337.2" textLength="12.2" clip-path="url(#terminal-2508285730-line-13)">
</text><text class="terminal-2508285730-r5" x="48.8" y="361.6" textLength="97.6" clip-path="url(#terminal-2508285730-line-14)">shim&#160;(s)</text><text class="terminal-2508285730-r2" x="146.4" y="361.6" textLength="439.2" clip-path="url(#terminal-2508285730-line-14)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;generate&#160;viv-powered&#160;cli&#160;apps</text><text class="terminal-2508285730-r2" x="854" y="361.6" textLength="12.2" clip-path="url(#terminal-2508285730-line-14)">
</text><text class="terminal-2508285730-r5" x="48.8" y="386" textLength="85.4" clip-path="url(#terminal-2508285730-line-15)">run&#160;(r)</text><text class="terminal-2508285730-r2" x="134.2" y="386" textLength="500.2" clip-path="url(#terminal-2508285730-line-15)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;run&#160;an&#160;app&#160;with&#160;an&#160;on-demand&#160;venv</text><text class="terminal-2508285730-r2" x="854" y="386" textLength="12.2" clip-path="url(#terminal-2508285730-line-15)">
</text><text class="terminal-2508285730-r5" x="48.8" y="410.4" textLength="85.4" clip-path="url(#terminal-2508285730-line-16)">exe&#160;(e)</text><text class="terminal-2508285730-r2" x="134.2" y="410.4" textLength="536.8" clip-path="url(#terminal-2508285730-line-16)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;run&#160;binary/script&#160;in&#160;existing&#160;vivenv</text><text class="terminal-2508285730-r2" x="854" y="410.4" textLength="12.2" clip-path="url(#terminal-2508285730-line-16)">
</text><text class="terminal-2508285730-r5" x="48.8" y="434.8" textLength="134.2" clip-path="url(#terminal-2508285730-line-17)">remove&#160;(rm)</text><text class="terminal-2508285730-r2" x="183" y="434.8" textLength="231.8" clip-path="url(#terminal-2508285730-line-17)">&#160;&#160;&#160;&#160;remove&#160;a&#160;vivenv</text><text class="terminal-2508285730-r2" x="854" y="434.8" textLength="12.2" clip-path="url(#terminal-2508285730-line-17)">
</text><text class="terminal-2508285730-r5" x="48.8" y="459.2" textLength="122" clip-path="url(#terminal-2508285730-line-18)">freeze&#160;(f)</text><text class="terminal-2508285730-r2" x="170.8" y="459.2" textLength="561.2" clip-path="url(#terminal-2508285730-line-18)">&#160;&#160;&#160;&#160;&#160;create&#160;import&#160;statement&#160;from&#160;package&#160;spec</text><text class="terminal-2508285730-r2" x="854" y="459.2" textLength="12.2" clip-path="url(#terminal-2508285730-line-18)">
</text><text class="terminal-2508285730-r5" x="48.8" y="483.6" textLength="97.6" clip-path="url(#terminal-2508285730-line-19)">info&#160;(i)</text><text class="terminal-2508285730-r2" x="146.4" y="483.6" textLength="414.8" clip-path="url(#terminal-2508285730-line-19)">&#160;&#160;&#160;&#160;&#160;&#160;&#160;get&#160;metadata&#160;about&#160;a&#160;vivenv</text><text class="terminal-2508285730-r2" x="854" y="483.6" textLength="12.2" clip-path="url(#terminal-2508285730-line-19)">
</text><text class="terminal-2508285730-r5" x="48.8" y="508" textLength="122" clip-path="url(#terminal-2508285730-line-20)">manage&#160;(m)</text><text class="terminal-2508285730-r2" x="170.8" y="508" textLength="268.4" clip-path="url(#terminal-2508285730-line-20)">&#160;&#160;&#160;&#160;&#160;manage&#160;viv&#160;itself</text><text class="terminal-2508285730-r2" x="854" y="508" textLength="12.2" clip-path="url(#terminal-2508285730-line-20)">
</text>
</g>
</g>

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View file

@ -1,4 +1,8 @@
#!/usr/bin/env python3
#!/usr/bin/env python
# AUTOGENERATED by viv (v23.5a4-37-gf8ebd9d-dev)
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
def _viv_use(*pkgs, track_exe=False, name=""):
import hashlib, json, os, site, shutil, sys, venv # noqa
from pathlib import Path # noqa
@ -18,7 +22,7 @@ def _viv_use(*pkgs, track_exe=False, name=""):
_id = sha256.hexdigest()
if (env := cache / (name if name else _id)) not in cache.glob("*/") or force:
sys.stderr.write(f"generating new vivenv -> {env.name}\n")
venv.create(env, symlinks=True, with_pip=True, clear=True).create(env)
venv.create(env, symlinks=True, with_pip=True, clear=True)
(env / "pip.conf").write_text("[global]\ndisable-pip-version-check=true")
run_kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2))))
p = run([env / "bin" / "pip", "install", "--force-reinstall", *spec], **run_kw)

View file

@ -34,7 +34,6 @@ select = ["E","F","I"]
ignore = ["E402"]
[tool.mypy]
warn_return_any = true
check_untyped_defs = true
disallow_untyped_defs = true
warn_unused_configs = true

View file

@ -14,7 +14,6 @@ import itertools
import json
import os
import re
import shlex
import shutil
import site
import subprocess
@ -51,7 +50,7 @@ from typing import (
from urllib.error import HTTPError
from urllib.request import urlopen
__version__ = "23.5a4-37-gf8ebd9d-dev"
__version__ = "23.5a5-1-g853e6e6-dev"
class Spinner:
@ -222,7 +221,7 @@ to create/activate a vivenv:
_id = sha256.hexdigest()
if (env := cache / (name if name else _id)) not in cache.glob("*/") or force:
sys.stderr.write(f"generating new vivenv -> {env.name}\n")
venv.create(env, symlinks=True, with_pip=True, clear=True).create(env)
venv.create(env, symlinks=True, with_pip=True, clear=True)
(env / "pip.conf").write_text("[global]\ndisable-pip-version-check=true")
run_kw = dict(zip(("stdout", "stderr"), ((None,) * 2 if verbose else (-1, 2))))
p = run([env / "bin" / "pip", "install", "--force-reinstall", *spec], **run_kw)
@ -258,8 +257,8 @@ to create/activate a vivenv:
(self._standalone_func, self.noqa(self._use_str(spec, standalone=True)))
)
return f"""
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
# AUTOGENERATED by viv (v{__version__})
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
{func_use}
"""
@ -313,7 +312,10 @@ to create/activate a vivenv:
else:
imports = ""
return f"""\
#!/usr/bin/env python3
#!/usr/bin/env python
# AUTOGENERATED by viv (v{__version__})
# see `python3 <(curl -fsSL viv.dayl.in/viv.py) --help`
{imports}
import subprocess
import sys
@ -351,6 +353,7 @@ if __name__ == "__main__":
("CLI", cli),
("Running Source", running),
("Local Source", local),
("Cache", c._cache),
)
)
+ "\n"
@ -829,31 +832,34 @@ def resolve_deps(args: Namespace) -> List[str]:
return resolved_spec
def fetch_source(reference: str) -> str:
def fetch_script(url: str) -> str:
try:
r = urlopen(
r = urlopen(url)
except (HTTPError, ValueError) as e:
error(f"Failed to fetch from remote url:\n {a.bold}{url}{a.end}")
echo(
"see below:" + a.style("-> ", "red").join(["\n"] + repr(e).splitlines()),
style="red",
)
sys.exit(1)
return r.read().decode("utf-8")
def fetch_source(reference: str) -> str:
src = fetch_script(
"https://raw.githubusercontent.com/daylinmorgan/viv/"
+ reference
+ "/src/viv/viv.py"
)
except HTTPError as e:
error(
"Issue updating viv see below:"
+ a.style("-> ", "red").join(["\n"] + repr(e).splitlines())
)
if "404" in repr(e):
echo("Please check your reference is valid.", style="red")
sys.exit(1)
src = r.read()
(hash := hashlib.sha256()).update(src)
(hash := hashlib.sha256()).update(src.encode())
sha256 = hash.hexdigest()
cached_src_file = c.srccache / f"{sha256}.py"
if not cached_src_file.is_file():
with cached_src_file.open("w") as f:
f.write(src.decode())
cached_src_file.write_text(src)
return sha256
@ -869,7 +875,12 @@ class Config:
"""viv config manager"""
def __init__(self) -> None:
self._cache = Path(os.getenv("XDG_CACHE_HOME", Path.home() / ".cache")) / "viv"
self._cache = Path(
os.getenv(
"VIV_CACHE",
Path(os.getenv("XDG_CACHE_HOME", Path.home() / ".cache")) / "viv",
)
)
def _ensure(self, p: Path) -> Path:
p.mkdir(parents=True, exist_ok=True)
@ -1015,22 +1026,23 @@ class Viv:
vivenv.show()
def exe(self, args: Namespace) -> None:
"""run python/pip in existing vivenv"""
"""\
run binary/script in existing vivenv
examples:
viv exe <vivenv> pip -- list
viv exe <vivenv> python -- script.py
"""
vivenv = self._match_vivenv(args.vivenv)
bin = vivenv.path / "bin" / args.cmd
pip_path, python_path = (vivenv.path / "bin" / cmd for cmd in ("pip", "python"))
# todo check for vivenv
echo(f"executing command within {vivenv.name}")
if not bin.exists():
error(f"{args.cmd} does not exist in {vivenv.name}", code=1)
cmd = (
f"{pip_path} {' '.join(args.cmd)}"
if args.subcmd == "pip"
else f"{python_path} {' '.join(args.cmd)}"
) + " ".join(args.rest)
cmd = [bin, *args.rest]
echo(f"executing {cmd}")
run(shlex.split(cmd), verbose=True)
run(cmd, verbose=True)
def info(self, args: Namespace) -> None:
"""get metadata about a vivenv"""
@ -1190,13 +1202,38 @@ class Viv:
def run(self, args: Namespace) -> None:
"""\
run an app with an on-demand venv
run an app/script with an on-demand venv
examples:
viv r pycowsay -- "viv isn't venv\!"
viv r rich -b python -- -m rich
viv r -s <remote python script>
"""
if args.script:
env = os.environ
name = args.script.split("/")[-1]
with tempfile.TemporaryDirectory(prefix="viv-") as tmpdir:
tmppath = Path(tmpdir)
script = tmppath / name
if not self.local_source:
(tmppath / "viv.py").write_text(
fetch_script(
"https://raw.githubusercontent.com/daylinmorgan/viv/script-runner/src/viv/viv.py"
)
)
script.write_text(fetch_script(args.script))
if not args.keep:
env.update({"VIV_CACHE": tmpdir})
sys.exit(
subprocess.run(
[sys.executable, script, *args.rest], env=env
).returncode
)
else:
_, bin = self._pick_bin(args)
spec = combined_spec(args.reqs, args.requirements)
vivenv = ViVenv(spec)
@ -1264,7 +1301,10 @@ class Cli:
),
],
("remove",): [Arg("vivenv", help="name/hash of vivenv", nargs="*")],
("exe|pip", "exe|python", "info"): [Arg("vivenv", help="name/hash of vivenv")],
("run",): [
Arg("-s", "--script", help="remote script to run", metavar="<script>")
],
("exe", "info"): [Arg("vivenv", help="name/hash of vivenv")],
("list", "info"): [
Arg(
"--json",
@ -1336,11 +1376,10 @@ class Cli:
action="store_true",
)
],
("exe|python", "exe|pip"): [
("exe"): [
Arg(
"cmd",
help="command to to execute",
nargs="*",
)
],
}
@ -1359,16 +1398,15 @@ class Cli:
)
).update(
{
"exe": dict(
pip=dict(help="run cmd with pip"),
python=dict(help="run cmd with python"),
),
"manage": dict(
show=dict(help="show current installation", aliases=["s"]),
install=dict(help="install fresh viv", aliases=["i"]),
update=dict(help="update viv version", aliases=["u"]),
purge=dict(help="remove traces of viv", aliases=["p"]),
),
"manage": {
subcmd: {"help": help, "aliases": [subcmd[0]]}
for subcmd, help in (
("show", "show current installation"),
("install", "install fresh viv"),
("update", "update viv version"),
("purge", "remove traces of viv"),
)
}
}
)
@ -1397,7 +1435,7 @@ class Cli:
self.parsers[grp].add_argument(*arg.args, **arg.kwargs)
def _validate_args(self, args: Namespace) -> None:
if args.func.__name__ in ("freeze", "shim", "run"):
if args.func.__name__ in ("freeze", "shim"):
if not args.reqs:
error("must specify a requirement", code=1)
if args.func.__name__ in ("freeze", "shim"):
@ -1438,6 +1476,14 @@ class Cli:
+ " shouldn't be used with a git-based installation",
1,
)
if args.func.__name__ == "run":
if not (args.reqs or args.script):
error("must specify a requirement or --script", code=1)
if args.script and args.reqs:
error(
"script mode does not support additional requirements currently",
code=1,
)
def _get_subcmd_parser(
self,