A small command-line websh client written in Python
- Run shell command without huge Docker image
- Save the execution result images
- Open execution result images with your default browser
- Upload local images
usage: pywebsh [-h] [-v] [-o] [-i IMAGES] code
positional arguments:
code code to execute on websh
optional arguments:
-h, --help show this help message and exit
-v, --verbose output verbose information
-o, --open open execution result images with your default browser
-i IMAGES, --images IMAGES
images to upload
Just specify the command you want to execute in the first argument.
$ pywebsh 'uname -a'
Linux efa5b0542de5 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
To save images, output the image files to /images/
on the websh environment. When the -o
/ --open
flag is enabled, the saved image will open in your system's default browser.
$ pywebsh --open 'screenfetch | textimg -o /images/out.png'
You can upload and use local images. If you specify the image path in the -i
/ --images
option and execute it, it will be saved in 0
, 1
, ... files under the /media/
directory on the websh environment.
$ pywebsh --images foo.png --images bar.png 'ls -lA /media'
εθ¨ 176
-rw-r--r-- 1 root root 908 10ζ 20 20:28 0
-rw-r--r-- 1 root root 175821 10ζ 20 20:28 1
Requires Python (testing on v3.9.7
). Clone or this repository or download archive from releases page then run below:
sudo make install
The Unlicense