2014-09-07 02:20:49 +02:00
|
|
|
json-rpc-shell
|
|
|
|
==============
|
2015-09-27 01:58:45 +02:00
|
|
|
:compact-option:
|
2014-09-07 02:20:49 +02:00
|
|
|
|
2015-09-27 01:58:45 +02:00
|
|
|
'json-rpc-shell' is a simple shell for running JSON-RPC 2.0 queries.
|
2014-09-07 02:20:49 +02:00
|
|
|
|
|
|
|
This software has been created as a replacement for the following shell, which
|
|
|
|
is written in Java: http://software.dzhuvinov.com/json-rpc-2.0-shell.html
|
|
|
|
|
2016-01-21 09:44:39 +01:00
|
|
|
Features
|
|
|
|
--------
|
|
|
|
In addition to most of the features provided by Vladimir Dzhuvinov's shell
|
|
|
|
you get the following niceties:
|
|
|
|
|
|
|
|
- configurable JSON syntax highlight, which with prettyprinting turned on
|
|
|
|
helps you make sense of the results significantly
|
|
|
|
- ability to pipe output through a shell command, so that you can view the
|
|
|
|
results in your favourite editor or redirect them to a file
|
2016-01-21 09:48:22 +01:00
|
|
|
- ability to edit the input line in your favourite editor as well with Alt+E
|
2016-01-21 09:44:39 +01:00
|
|
|
|
2015-03-23 23:23:19 +01:00
|
|
|
Supported transports
|
|
|
|
--------------------
|
|
|
|
- HTTP
|
|
|
|
- HTTPS
|
2015-03-29 00:37:12 +01:00
|
|
|
- WebSocket
|
|
|
|
- WebSocket over TLS
|
|
|
|
|
|
|
|
WebSockets
|
2015-09-27 01:58:45 +02:00
|
|
|
~~~~~~~~~~
|
2015-03-29 00:37:12 +01:00
|
|
|
The WebSocket transport is rather experimental. As the JSON-RPC 2.0 spec
|
|
|
|
doesn't say almost anything about the underlying transports, I'll shortly
|
|
|
|
describe the way it's implemented: every request is sent as a single text
|
|
|
|
message. If it has an "id" field, i.e. it's not just a notification, the
|
|
|
|
client waits for a message from the server in response.
|
|
|
|
|
|
|
|
There's no support so far for any protocol extensions, nor for specifying
|
|
|
|
the higher-level protocol (the "Sec-Ws-Protocol" HTTP field).
|
2015-03-23 23:23:19 +01:00
|
|
|
|
2014-09-07 02:20:49 +02:00
|
|
|
Building and Running
|
|
|
|
--------------------
|
2015-03-29 00:37:12 +01:00
|
|
|
Build dependencies: CMake, pkg-config, help2man,
|
2015-09-27 01:58:45 +02:00
|
|
|
liberty (included), http-parser (included) +
|
2015-12-24 15:45:49 +01:00
|
|
|
Runtime dependencies: libev, Jansson, cURL, openssl,
|
|
|
|
readline or libedit >= 2013-07-12,
|
2014-09-07 02:20:49 +02:00
|
|
|
|
2015-09-27 01:56:26 +02:00
|
|
|
$ git clone --recursive https://github.com/pjanouch/json-rpc-shell.git
|
|
|
|
$ mkdir json-rpc-shell/build
|
|
|
|
$ cd json-rpc-shell/build
|
2015-02-14 01:18:39 +01:00
|
|
|
$ cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
|
2014-09-07 02:20:49 +02:00
|
|
|
$ make
|
|
|
|
|
2015-02-14 01:18:39 +01:00
|
|
|
To install the application, you can do either the usual:
|
2015-09-27 01:58:45 +02:00
|
|
|
|
2015-02-26 22:56:52 +01:00
|
|
|
# make install
|
2015-02-14 01:18:39 +01:00
|
|
|
|
|
|
|
Or you can try telling CMake to make a package for you. For Debian it is:
|
2015-09-27 01:58:45 +02:00
|
|
|
|
2015-02-14 01:18:39 +01:00
|
|
|
$ cpack -G DEB
|
|
|
|
# dpkg -i json-rpc-shell-*.deb
|
|
|
|
|
2015-09-27 01:58:45 +02:00
|
|
|
Note that for versions of CMake before 2.8.9, you need to prefix `cpack` with
|
|
|
|
`fakeroot` or file ownership will end up wrong.
|
2015-02-14 01:18:39 +01:00
|
|
|
|
2015-09-27 01:58:45 +02:00
|
|
|
Run the program with `--help` to obtain usage information.
|
2014-09-07 02:20:49 +02:00
|
|
|
|
2015-05-07 20:27:57 +02:00
|
|
|
Contributing and Support
|
|
|
|
------------------------
|
|
|
|
Use this project's GitHub to report any bugs, request features, or submit pull
|
|
|
|
requests. If you want to discuss this project, or maybe just hang out with
|
|
|
|
the developer, feel free to join me at irc://anathema.irc.so, channel #anathema.
|
|
|
|
|
2014-09-07 02:20:49 +02:00
|
|
|
License
|
|
|
|
-------
|
2015-09-27 01:58:45 +02:00
|
|
|
'json-rpc-shell' is written by Přemysl Janouch <p.janouch@gmail.com>.
|
2014-09-07 02:20:49 +02:00
|
|
|
|
|
|
|
You may use the software under the terms of the ISC license, the text of which
|
|
|
|
is included within the package, or, at your option, you may relicense the work
|
|
|
|
under the MIT or the Modified BSD License, as listed at the following site:
|
|
|
|
|
|
|
|
http://www.gnu.org/licenses/license-list.html
|