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
|
2020-10-14 00:00:04 +02:00
|
|
|
- WebSocket (RFC 6455) can also be used as a transport rather than HTTP
|
2020-10-13 04:23:28 +02:00
|
|
|
- support for method name tab completion using OpenRPC discovery
|
2016-01-21 09:44:39 +01:00
|
|
|
|
2020-09-04 23:33:17 +02:00
|
|
|
Documentation
|
|
|
|
-------------
|
|
|
|
See the link:json-rpc-shell.adoc[man page] for information about usage.
|
|
|
|
The rest of this README will concern itself with externalities.
|
2015-03-23 23:23:19 +01:00
|
|
|
|
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
|
|
|
|
2020-09-04 23:33:17 +02:00
|
|
|
Building
|
|
|
|
--------
|
|
|
|
Build dependencies: CMake, pkg-config, asciidoctor,
|
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
|
|
|
|
2020-09-02 01:07:31 +02:00
|
|
|
Avoid libedit if you can, in general it works but at the moment history is
|
2020-09-04 23:33:17 +02:00
|
|
|
acting up and I have no clue about fixing it. Multiline editing is also
|
|
|
|
misbehaving there.
|
2020-09-02 01:07:31 +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
|
|
|
|
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
|
2020-09-04 23:33:17 +02:00
|
|
|
FastCGI, SCGI, and WebSocket interfaces. It responds to `ping` and `date`
|
|
|
|
methods and it can serve static files.
|
2015-03-02 08:49:21 +01:00
|
|
|
|
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
|
2018-04-16 15:53:30 +02:00
|
|
|
|
2014-09-07 02:20:49 +02:00
|
|
|
License
|
|
|
|
-------
|
2018-06-24 04:16:27 +02:00
|
|
|
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.
|