This is the official bash client implementation of toolsapi.com. It implements the latest toolsapi http protocol.
- Default unix/linux tools: grep, cat, cut, tail and bash
- curl command line tool
Create a toolsapi.properties in either your $HOME
-directory or as /etc/toolsapi.properties
url=http://toolsapi.com/
user=tester
password=password
Just prefix your toolsapi call with curl -sS https://raw.githubusercontent.com/DracoBlue/toolsapi-shell/master/toolsapi | bash -s
.
Example to call dig github.com
$ curl -sS https://raw.githubusercontent.com/DracoBlue/toolsapi-shell/master/toolsapi | bash -s dig github.com
You can make this shorter, if you call once:
$ alias toolsapi='curl -sS https://raw.githubusercontent.com/DracoBlue/toolsapi-shell/master/toolsapi | bash -s'
and afterwards:
$ toolsapi dig github.com
$ curl -sS https://raw.githubusercontent.com/DracoBlue/toolsapi-shell/master/toolsapi > toolsapi
$ chmod +x toolsapi
$ ./toolsapi
Clone the repository and enter the directory
$ git clone git@github.com:DracoBlue/toolsapi-shell.git
$ cd toolsapi-shell
$ ./toolsapi
$ make test
Run dig from the remote machine (execute dig github.com
):
./toolsapi dig github.com
Use an input file (prefix with toolsapi:inputfile=
) on the remote machine (execute pygmentize -l bash tests/test_pygmentize
):
./toolsapi pygmentize -l bash toolsapi:inputfile=tests/test_pygmentize.sh
There is also the possibility to run specific templates provided by the toolsapi server.
For instance:
./toolsapi ffprobe:simple filename.mp4
will query the server for a template of ffprobe
, which is called simple
and convert it into:
./toolsapi ffprobe toolsapi:inputfile=filename.mp4
A full list of templates can be retrieved, by running ./toolsapi without any parameters.
The client is not yet 100% compliant to the toolsapi http protocol.
Implemented:
- arguments (arg0..n)
- input files (file0..n -> must be prefixed with
toolsapi:inputfile=
) - input folders (folder0..n)
Missing:
- output folders
- output files
- stdoutfile
- stderrfile
- stdinfile
- 1.x-dev
- new raw.githubusercontent.com Link in alias and copy+paste one liner
- added input folders
- merged toolsapi-template into toolsapi-script #1
- removed mktemp #2
- initial version
This work is copyright by DracoBlue (http://dracoblue.net) and not licensed under any license, yet.