CLI reference

rachuba gui

rachuba gui [--port PORT]

The importer of rachuba sources in a browser, for a machine with no Rachuba application. It listens on 127.0.0.1, on --port or on any free port when none is given, prints one line and serves until it is stopped:

http://127.0.0.1:<port>/?token=<token>

The page at that address lists what rachuba sources answers and runs the words you type after sources as this same program, with the --config and --ledger the gui was started with, and shows its answer. A click does what the command does and nothing else: an import still needs --commit.

Who may ask

The token in the printed URL is made for this run and is needed by every request for data. A request must name this session's host, and a run must also come from this session's origin, so another page open in the browser can neither read nor run anything.

AnswerWhen
421the host is not this rachuba gui session's
403the session token is missing or wrong; open the URL the gui printed
403the origin is not this rachuba gui session's
400the run is not JSON, or is not {"words": ["<word>", …]}, the words after sources
404the path is no route of this gui

Refusals

Exit 1:

serving the gui on 127.0.0.1:<port> failed; name a free port with --port, or leave it out for any free one