- websh(https://websh.jiro4989.com/) on Bash
- Run shell commands on shellgeibot-image without Docker and other special setup
- Inspired by sheepla/websh-cli
# On Ubuntu
$ sudo apt install jq curl # and GNU sed, if not exists
$ wget -nv https://raw.githubusercontent.com/eggplants/websh.sh/master/websh
$ sudo install -m 0755 echo-sd /usr/local/bin/websh
$ rm websh
websh
Description:
websh(https://websh.jiro4989.com) on Bash
Usage:
$ websh [-d IMG_SAVEDIR ] [ -i INPUT_IMAGE ] [-h|-p] cmd ...
$ echo cmd ... | websh
Option:
cmd Shell Commands wanted to run
-d IMG_SAVEDIR Set a dir saving output image(s) (default: $TMPDIR)
-i INPUT_IMAGE Specify the input image path (max: 4)
-h Print help and exit
-p Print stdout only
Requirement:
jq, curl, GNU sed
$ websh 'echo text'
$ websh 'echo text | textimg -o images/a.png;cp images/a.png images/b.png;unko.king'
$ echo 'echo-sd 💩' | websh
# Upload images as input and save output images to spesific dir
$ mkdir a
$ websh -i demo1.png -i demo2.png -d a 'ls media;echo test >&2;cp media/* images'
# Plain output
$ websh -p 'echo test'
test
MIT
haruna (eggplants)