json-rpc-shell/README.adoc

88 lines
3.0 KiB
Plaintext
Raw Normal View History

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
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
~~~~~~~~~~
The JSON-RPC 2.0 spec doesn't say almost anything about underlying transports.
The way it's implemented here is that every request is sent as a single text
2015-03-29 00:37:12 +01:00
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).
2016-03-10 21:32:33 +01:00
Packages
--------
Regular releases are sporadic. git master should be stable enough. You can get
2018-06-24 04:17:04 +02:00
a package with the latest development version from Archlinux's AUR.
2016-03-10 21:32:33 +01:00
Building and Usage
------------------
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) +
Runtime dependencies: libev, Jansson, cURL, openssl,
readline or libedit >= 2013-07-12,
2014-09-07 02:20:49 +02:00
2018-06-24 04:17:04 +02:00
$ git clone --recursive https://git.janouch.name/p/json-rpc-shell.git
2015-09-27 01:56:26 +02:00
$ 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
2018-10-18 07:44:09 +02:00
Test server
-----------
If you install development packages for libmagic, an included test server will
be built but not installed which provides a trivial JSON-RPC 2.0 service with
FastCGI, SCGI, and WebSocket interfaces. It responds to the `ping` method.
2015-05-07 20:27:57 +02:00
Contributing and Support
------------------------
2018-06-24 04:17:04 +02:00
Use https://git.janouch.name/p/json-rpc-shell to report bugs, request features,
or submit pull requests. `git send-email` is tolerated. If you want to discuss
the project, feel free to join me at ircs://irc.janouch.name, channel #dev.
2015-05-07 20:27:57 +02:00
2018-06-24 04:17:04 +02:00
Bitcoin donations are accepted at: 12r5uEWEgcHC46xd64tt3hHt9EUvYYDHe9
2014-09-07 02:20:49 +02:00
License
-------
This software is released under the terms of the 0BSD license, the text of which
is included within the package along with the list of authors.