diff --git a/docs/cli.md b/docs/cli.md index 21425a3..8599a00 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -9,9 +9,6 @@ ## exe ![cmd](./svgs/viv-exe-help.svg) -## remove -![cmd](./svgs/viv-remove-help.svg) - ## manage ![cmd](./svgs/viv-manage-help.svg) @@ -35,3 +32,12 @@ ## run ![cmd](./svgs/viv-run-help.svg) + +## cache +![cmd](./svgs/viv-cache-help.svg) + +### cache info +![cmd](./svgs/viv-cache-info-help.svg) + +### cache remove +![cmd](./svgs/viv-cache-remove-help.svg) diff --git a/docs/svgs/viv-cache-help.svg b/docs/svgs/viv-cache-help.svg new file mode 100644 index 0000000..ec3d67a --- /dev/null +++ b/docs/svgs/viv-cache-help.svg @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + viv cache --help + + + + + + + + + + usage: viv cache [-h] <sub-cmd> ... + +manage the viv vivenv cache + +options: +-h--help    show this help message and exit + +subcommand: +<sub-cmd> +info (i)    get metadata about a vivenv +remove (r)  remove a vivenv + + + + diff --git a/docs/svgs/viv-cache-info-help.svg b/docs/svgs/viv-cache-info-help.svg new file mode 100644 index 0000000..e85c6c4 --- /dev/null +++ b/docs/svgs/viv-cache-info-help.svg @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + viv cache info --help + + + + + + + + + + usage: viv cache info [-h] [-p] [--json] vivenv + +positional arguments: +vivenv        name/hash of vivenv + +options: +-h--help    show this help message and exit +-p--path    print the absolute path to the vivenv +--json        name:metadata json for vivenvs + + + + diff --git a/docs/svgs/viv-cache-remove-help.svg b/docs/svgs/viv-cache-remove-help.svg new file mode 100644 index 0000000..ef7efbe --- /dev/null +++ b/docs/svgs/viv-cache-remove-help.svg @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + viv cache remove --help + + + + + + + + + + usage: viv cache remove [-h] [vivenv ...] + +positional arguments: +vivenv        name/hash of vivenv + +options: +-h--help    show this help message and exit + + + + diff --git a/docs/svgs/viv-help.svg b/docs/svgs/viv-help.svg index be33cdd..22ed303 100644 --- a/docs/svgs/viv-help.svg +++ b/docs/svgs/viv-help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - viv  --help + viv  --help - + - - usage: viv [-h] [-V] <sub-cmd> ... - -vivisn'tvenv -command line: `viv --help` -python api: __import__("viv").use("typer", "rich-click") - -options: --h--help       show this help message and exit --V--version    show program's version number and exit - -subcommands: -<sub-cmd> -list (l)       list all vivenvs -shim (s)       generate viv-powered cli apps -run (r)        run an app/script with an on-demand venv -exe (e)        run binary/script in existing vivenv -remove (rm)    remove a vivenv -freeze (f)     create import statement from package spec -info (i)       get metadata about a vivenv -manage (m)     manage viv itself + + usage: viv [-h] [-V] <sub-cmd> ... + +vivisn'tvenv +command line: `viv run typer rich-click -s ./script.py` +python api: __import__("viv").use("typer", "rich-click") + +options: +-h--help       show this help message and exit +-V--version    show program's version number and exit + +subcommands: +<sub-cmd> +list (l)       list vivenvs +shim (s)       generate viv-powered cli apps +run (r)        run an app/script with an on-demand venv +exe (e)        run binary/script in existing vivenv +cache (c)      manage the viv vivenv cache +freeze (f)     create import statement from package spec +manage (m)     manage viv itself diff --git a/docs/svgs/viv-list-help.svg b/docs/svgs/viv-list-help.svg index db6400b..194e649 100644 --- a/docs/svgs/viv-list-help.svg +++ b/docs/svgs/viv-list-help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - viv list --help + viv list --help - + - - usage: viv list [-h] [-f] [-q] [--json] - -list all vivenvs - -options: --h--help     show this help message and exit --f--full     show full metadata for vivenvs --q--quiet    suppress non-essential output ---json         name:metadata json for vivenvs + + usage: viv list [-h] [-v] [-q] [-f <key:value>] [--json] + +list vivenvs + +examples: +  `viv list \ +      --filter "accessed-after:2023-08-01"` +  `viv list -q --filter \ +    "created-before:$(date -d '2 weeks ago' +'%Y-%m-%d')"` +  `viv list --filter "file:./script.py"` +  `viv list --filter "file:None"` + +options: +-h--help                  show this help message and exit +-v--verbose               pretty print full metadata for vivenvs +-q--quiet                 show only ids +-f--filter <key:value>    filter vivenvs based on key:val +--json                      name:metadata json for vivenvs diff --git a/docs/svgs/viv-manage-install-help.svg b/docs/svgs/viv-manage-install-help.svg index cac72ac..32dc31d 100644 --- a/docs/svgs/viv-manage-install-help.svg +++ b/docs/svgs/viv-manage-install-help.svg @@ -19,14 +19,14 @@ font-weight: 700; } - .terminal-3566109819-matrix { + .terminal-2178057871-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3566109819-title { + .terminal-2178057871-title { font-size: 18px; font-weight: bold; font-family: arial; @@ -36,57 +36,57 @@ -webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); } - .terminal-3566109819-r1 { fill: #94e2d5;font-weight: bold } -.terminal-3566109819-r2 { fill: #c6d0f5 } -.terminal-3566109819-r3 { fill: #f9e2af;font-weight: bold } -.terminal-3566109819-r4 { fill: #f9e2af } + .terminal-2178057871-r1 { fill: #94e2d5;font-weight: bold } +.terminal-2178057871-r2 { fill: #c6d0f5 } +.terminal-2178057871-r3 { fill: #f9e2af;font-weight: bold } +.terminal-2178057871-r4 { fill: #f9e2af } - + - + - + - + - + - + - + - + - viv manage install --help + viv manage install --help - + - - usage: viv manage install [-h] [-r <ref>] [-s <src>] [-c <cli>] [-y] - -options: --h--help         show this help message and exit --r--ref <ref>    git reference (branch/tag/commit) --s--src <src>    path/to/source_file --c--cli <cli>    path/to/cli (symlink to src) --y--yes          respond yes to all prompts + + usage: viv manage install [-h] [-r <ref>] [-s <path>] [-c <path>] [-y] + +options: +-h--help          show this help message and exit +-r--ref <ref>     git reference (branch/tag/commit) +-s--src <path>    path/to/source_file +-c--cli <path>    path/to/cli (symlink to src) +-y--yes           respond yes to all prompts diff --git a/docs/svgs/viv-manage-purge-help.svg b/docs/svgs/viv-manage-purge-help.svg index 1ec3ae0..2fb0ff7 100644 --- a/docs/svgs/viv-manage-purge-help.svg +++ b/docs/svgs/viv-manage-purge-help.svg @@ -19,14 +19,14 @@ font-weight: 700; } - .terminal-1523286739-matrix { + .terminal-4262233319-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-1523286739-title { + .terminal-4262233319-title { font-size: 18px; font-weight: bold; font-family: arial; @@ -36,57 +36,57 @@ -webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); } - .terminal-1523286739-r1 { fill: #94e2d5;font-weight: bold } -.terminal-1523286739-r2 { fill: #c6d0f5 } -.terminal-1523286739-r3 { fill: #f9e2af;font-weight: bold } -.terminal-1523286739-r4 { fill: #f9e2af } + .terminal-4262233319-r1 { fill: #94e2d5;font-weight: bold } +.terminal-4262233319-r2 { fill: #c6d0f5 } +.terminal-4262233319-r3 { fill: #f9e2af;font-weight: bold } +.terminal-4262233319-r4 { fill: #f9e2af } - + - + - + - + - + - + - + - + - viv manage purge --help + viv manage purge --help - + - - usage: viv manage purge [-h] [-r <ref>] [-s <src>] [-c <cli>] [-y] - -options: --h--help         show this help message and exit --r--ref <ref>    git reference (branch/tag/commit) --s--src <src>    path/to/source_file --c--cli <cli>    path/to/cli (symlink to src) --y--yes          respond yes to all prompts + + usage: viv manage purge [-h] [-r <ref>] [-s <path>] [-c <path>] [-y] + +options: +-h--help          show this help message and exit +-r--ref <ref>     git reference (branch/tag/commit) +-s--src <path>    path/to/source_file +-c--cli <path>    path/to/cli (symlink to src) +-y--yes           respond yes to all prompts diff --git a/docs/svgs/viv-manage-update-help.svg b/docs/svgs/viv-manage-update-help.svg index cf51137..9d11b0d 100644 --- a/docs/svgs/viv-manage-update-help.svg +++ b/docs/svgs/viv-manage-update-help.svg @@ -19,14 +19,14 @@ font-weight: 700; } - .terminal-3428156307-matrix { + .terminal-1952023975-matrix { font-family: Fira Code, monospace; font-size: 20px; line-height: 24.4px; font-variant-east-asian: full-width; } - .terminal-3428156307-title { + .terminal-1952023975-title { font-size: 18px; font-weight: bold; font-family: arial; @@ -36,57 +36,57 @@ -webkit-filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); filter: drop-shadow( 2px 5px 2px rgba(0, 0, 0, .7)); } - .terminal-3428156307-r1 { fill: #94e2d5;font-weight: bold } -.terminal-3428156307-r2 { fill: #c6d0f5 } -.terminal-3428156307-r3 { fill: #f9e2af;font-weight: bold } -.terminal-3428156307-r4 { fill: #f9e2af } + .terminal-1952023975-r1 { fill: #94e2d5;font-weight: bold } +.terminal-1952023975-r2 { fill: #c6d0f5 } +.terminal-1952023975-r3 { fill: #f9e2af;font-weight: bold } +.terminal-1952023975-r4 { fill: #f9e2af } - + - + - + - + - + - + - + - + - viv manage update --help + viv manage update --help - + - - usage: viv manage update [-h] [-r <ref>] [-s <src>] [-c <cli>] [-y] - -options: --h--help         show this help message and exit --r--ref <ref>    git reference (branch/tag/commit) --s--src <src>    path/to/source_file --c--cli <cli>    path/to/cli (symlink to src) --y--yes          respond yes to all prompts + + usage: viv manage update [-h] [-r <ref>] [-s <path>] [-c <path>] [-y] + +options: +-h--help          show this help message and exit +-r--ref <ref>     git reference (branch/tag/commit) +-s--src <path>    path/to/source_file +-c--cli <path>    path/to/cli (symlink to src) +-y--yes           respond yes to all prompts diff --git a/docs/svgs/viv-remove-help.svg b/docs/svgs/viv-remove-help.svg deleted file mode 100644 index a594881..0000000 --- a/docs/svgs/viv-remove-help.svg +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - viv remove --help - - - - - - - - - - usage: viv remove [-h] [vivenv ...] - -remove a vivenv - -To remove all viv venvs: -`viv rm $(viv l -q)` - -positional arguments: -vivenv        name/hash of vivenv - -options: --h--help    show this help message and exit - - - - diff --git a/docs/svgs/viv-run-help.svg b/docs/svgs/viv-run-help.svg index 9cddecd..2abca47 100644 --- a/docs/svgs/viv-run-help.svg +++ b/docs/svgs/viv-run-help.svg @@ -1,4 +1,4 @@ - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - viv run --help + viv run --help - + - - usage: viv run [-h] [-s <script>] [-r <path>] [-k] [-b <bin>] [reqs  -...] - -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> - -positional arguments: -reqs                         requirements specifiers - -options: --h--help                   show this help message and exit --s--script <script>        remote script to run --r--requirements <path>    path/to/requirements.txt file --k--keep                   preserve environment --b--bin <bin>              console_script/script to invoke + + usage: viv run [-h] [-s <path>] [-r <path>] [-k] [-b <bin>] [reqs ...] + +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> + +positional arguments: +reqs                         requirements specifiers + +options: +-h--help                   show this help message and exit +-s--script <path>          remote script to run +-r--requirements <path>    path/to/requirements.txt file +-k--keep                   preserve environment +-b--bin <bin>              console_script/script to invoke diff --git a/scripts/generate-svgs.py b/scripts/generate-svgs.py index 107aed0..d6306c7 100755 --- a/scripts/generate-svgs.py +++ b/scripts/generate-svgs.py @@ -16,7 +16,6 @@ CLI_DOC_PATH = DOCS_PATH / "cli.md" ( "list", "exe", - "remove", "manage", "freeze", "shim", @@ -24,7 +23,9 @@ CLI_DOC_PATH = DOCS_PATH / "cli.md" ), [], ) -).update({"manage": ["update", "purge", "show", "install"]}) +).update( + {"manage": ["update", "purge", "show", "install"], "cache": ["info", "remove"]}, +) cli_doc = """