git ssb

8+

cel / sbotc



Tree: cec6448afd2f0c42739c510e602283f56518510c

Files: cec6448afd2f0c42739c510e602283f56518510c / sbotc.1

4516 bytesRaw
1.Dd 2017-06-03
2.Dt SBOTC 1
3.Os SSBC
4.ds REPO ssb://%133ulDgs/oC1DXjoK04vDFy6DgVBB/Zok15YJmuhD5Q=.sha256
5.Sh NAME
6.Nm sbotc
7.Nd Call a scuttlebot/secret-stack RPC method
8.Sh SYNOPSIS
9.Nm
10.Op Fl j
11.Op Fl l
12.Op Fl r
13.Op Fl T
14.Op Fl e
15.Op Fl a
16.
17.Oo
18.Fl n
19|
20.Op Fl c Ar cap
21.Op Fl k Ar key
22.Op Fl K Ar keypair
23.Oc
24.
25.Oo
26.Op Fl s Ar host
27.Op Fl p Ar port
28.Oo
29.Fl 4
30|
31.Fl 6
32.Oc
33.Op Fl d
34|
35.Op Fl u Ar socket_path
36.Oc
37.
38.Oo
39.Fl a
40|
41.Op Fl t Ar type
42.Ar method
43.Op Ar argument ...
44.Oc
45.Sh DESCRIPTION
46Connect to a scuttlebot/secret-stack server, and call a method on it, with
47standard I/O.
48.Sh OPTIONS
49.Bl -tag
50.It Fl j
51Send stdin data as JSON.
52.It Fl l
53Don't output newlines after string or JSON packets.
54.It Fl r
55Raw mode. Disables stdin line buffering/editing and echoing. Implies
56.Fl l .
57.It Fl e
58Encode arguments as strings, rather than expecting them to be JSON-encoded.
59.It Fl T
60Test using shs1-testsuite protocol. Instead of connecting to a peer and calling a RPC method, connect to stdio. On successful handshake, output concatenation of
61the encryption key, encryption nonce, decryption key and decryption nonce.
62.It Fl a
63Passthrough mode. Instead of making a muxrpc call, pass through the box-stream
64to stdio.
65.It Fl n
66Noauth mode. Skip secret-handshake authentication and box-stream encryption.
67This option makes the
68.Fl k ,
69.Fl K ,
70and
71.Fl c
72options have no effect and output a warning if used.
73.It Fl 4
74Connect to server over IPv4 only.
75.It Fl 6
76Connect to server over IPv6 only.
77.It Fl d
78Listen for an incoming connection instead of making an outgoing connection.
79.It Fl c Ar cap
80Capability key for secret-handshake. Default is SSB's capability key,
81.Li 1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s= .
82.It Fl s Ar host
83The hostname to connect to. Default is localhost. If set to localhost and connection to localhost fails,
84.Nm
85may attempt to connect to other local interface addresses.
86.It Fl p Ar port
87The port to connect to. Default is 8008.
88.It Fl u Ar socket_path
89Unix socket path to connect to, instead of TCP socket. Conflicts with
90.Fl p
91and
92.Fl s .
93.It Fl k Ar key
94The key to connect to. Default is your public key, as read from your
95private key file or the
96.Fl K
97option. In listen mode (
98.Fl d
99), if
100.Fl k
101is specified, only a connection from the given key is accepted; otherwise a connection from any key is accepted.
102.It Fl K Ar keypair
103Private key or private key seed to use for secret-handshake. Default is to use the private key
104from your
105.Pa ~/.ssb/secret
106file or other secret file according to the environmental variables described in
107.Sx ENVIRONMENT .
108.It Fl t Ar type
109The type of method:
110.Dq async ,
111.Dq source ,
112.Dq sink ,
113or
114.Dq duplex .
115Default is to look up the method in
116.Pa ~/.ssb/manifest.json .
117.It Ar method
118Method name.
119.It Op Ar argument ...
120Arguments to pass to the method call. Each argument must be JSON-encoded, unless the
121.Fl e
122option is used, in which the arguments are treated as strings.
123.El
124.Sh ENVIRONMENT
125.Bl -tag
126.It Ev ssb_appname
127Name of the app. Default is
128.Dq ssb .
129Used to construct the app's directory if
130.Ev ssb_path
131is not present.
132.It Ev ssb_path
133Path to the app's directory. Default is to use
134.Ev ssb_appname to construct the path as
135.Dq ~/.<ssb_appname>
136.El
137.Sh FILES
138.Bl -tag -width -indent
139.It Pa ~/.ssb/secret
140Your private key, used for authenticating to the server with the
141secret-handshake protocol.
142.It Pa ~/.ssb/manifest.json
143A map of method names to method types.
144.It Pa ~/.ssb/config
145JSON file containing key, host, port, and/or SHS cap key to use if the
146.Fl s ,
147.Fl p
148or
149.Fl c
150options are not given, respectively.
151.It Pa ~/.ssb/socket
152UNIX socket stream file for noauth connections.
153If none of the options
154.Fl s ,
155.Fl p ,
156.Fl u ,
157.Fl c ,
158.Fl k ,
159.Fl K ,
160.Fl c ,
161.Fl 4 ,
162.Fl 6 ,
163or
164.Fl T
165are specified,
166.Nm
167will attempt to connect in noauth mode to this socket file. If the socket file
168is not present or the connection fails,
169.Nm
170will fall back to connecting with TCP and secret-handshake according to the
171config file - unless the
172.Fl n
173option is specified, in which case the command will fail.
174.El
175.Pp
176The base path
177.Dq ~/.ssb/
178of these file names may be changed by setting
179.Ev ssb_appname
180or
181.Ev ssb_path .
182.Sh EXIT STATUS
183.Bl -tag -width Ds
184.It 0
185The command completed successfully.
186.It 1
187An error occurred.
188.It 2
189The command completed with an error.
190.El
191.Sh AUTHORS
192.Nm
193was written by
194.An cel Aq @f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519 .
195.Sh BUGS
196.Pp
197Please report any bugs by making a post on SSB mentioning the repo,
198.Lk \*[REPO]
199

Built with git-ssb-web