Skip to content
/ dwebsh Public

🦕 A command line websh client powered by Deno

License

Notifications You must be signed in to change notification settings

sheepla/dwebsh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦕 dwebsh

A command line websh client powered by deno

Features

  • Run commands on the websh environment
  • Save execution result images
  • Upload local images

Usage

$ dwebsh --help

  Usage:   dwebsh <code:string>
  Version: v0.0.2

  Description:

    A command line websh client powered by Deno

  Options:

    -h, --help               - Show this help.
    -V, --version            - Show the version number for this program.
    -i, --images   <images>  - image files to upload

Run commands

Just specify the command you want to execute in the first argument.

$ dwebsh 'uname -a'
Linux e143d8fdbb59 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Save execution result images

To save images, output the image files to /images/ on the websh environment.

$ dwebsh 'screenfetch | textimg -o /images/out.png'
Image saved: /tmp/dwebsh_76a6b2f5.png

Upload local images

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.

$ dwebsh --images ~/pic/foo.png --images ~/pic/bar.png 'ls -lA /media'
合計 12
-rw-r--r-- 1 root root  828 11月 21 19:21 0
-rw-r--r-- 1 root root 6434 11月 21 19:21 1

Installation

Requires deno, testing on v1.16.1.

deno install --allow-net --allow-write --name dwebsh \
    https://raw.githubusercontent.com/sheepla/dwebsh/master/cli.ts

... or clone this repository then run below.

make build && sudo make install

Contributing

Welcome💕

LICENSE

MIT