You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

92 lines
1.9 KiB

.Dd 2017-06-03
.Dt SBOTC 1
.Os SSBC
.ds REPO ssb://%133ulDgs/oC1DXjoK04vDFy6DgVBB/Zok15YJmuhD5Q=.sha256
.Sh NAME
.Nm sbotc
.Nd Call a scuttlebot/secret-stack RPC method
.Sh SYNOPSIS
.Nm
.Op Fl s Ar host
.Op Fl p Ar port
.Op Fl k Ar key
.Op Fl t Ar type
.Ar method
.Op Ar argument ...
.Sh DESCRIPTION
Connect to a scuttlebot/secret-stack server, and call a method on it, with
standard I/O.
.Sh OPTIONS
.Bl -tag
.It Fl s Ar host
The hostname to connect to. Default is localhost.
.It Fl p Ar port
The port to connect to. Default is 8008.
.It Fl k Ar key
The key to connect to. Default is your public key.
.It Fl t Ar type
The type of method:
.Dq async ,
.Dq source ,
.Dq sink ,
or
.Dq duplex .
Default is to look up the method in
.Pa ~/.ssb/manifest.json .
.It Ar method
Method name.
.It Op Ar argument ...
Arguments to pass to the method call. Each argument must be JSON-encoded.
.El
.Sh ENVIRONMENT
.Bl -tag
.It Ev ssb_appname
Name of the app. Default is
.Dq ssb .
Used to construct the app's directory if
.Ev ssb_path
is not present.
.It Ev ssb_path
Path to the app's directory. Default is to use
.Ev ssb_appname to construct the path as
.Dq ~/.<ssb_appname>
.El
.Sh FILES
.Bl -tag -width -indent
.It Pa ~/.ssb/secret
Your private key, used for authenticating to the server with the
secret-handshake protocol.
.It Pa ~/.ssb/manifest.json
A map of method names to method types.
.It Pa ~/.ssb/config
JSON file containing host and port to use if the
.Ar -s
or
.Ar -p
options are not given.
.El
.Pp
The base path
.Dq ~/.ssb/
of these file names may be changed by setting
.Ev ssb_appname
or
.Ev ssb_path .
.Sh EXIT STATUS
.Bl -tag -width Ds
.It 0
The command completed successfully.
.It 1
An error occurred.
.It 2
The command completed with an error.
.El
.Sh AUTHORS
.Nm
was written by
.An cel Aq @f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519 .
.Sh BUGS
.Pp
Please report any bugs by making a post on SSB mentioning the repo,
.Lk \*[REPO]