git ssb

8+

cel / sbotc



Tree: e1e1c56a064cee691025d3117030ea74cc5e8354

Files: e1e1c56a064cee691025d3117030ea74cc5e8354 / sbotc.1

4248 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_seed
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|
34.Op Fl u Ar socket_path
35.Oc
36.
37.Oo
38.Fl a
39|
40.Op Fl t Ar type
41.Ar method
42.Op Ar argument ...
43.Oc
44.Sh DESCRIPTION
45Connect to a scuttlebot/secret-stack server, and call a method on it, with
46standard I/O.
47.Sh OPTIONS
48.Bl -tag
49.It Fl j
50Send stdin data as JSON.
51.It Fl l
52Don't output newlines after string or JSON packets.
53.It Fl r
54Raw mode. Disables stdin line buffering/editing and echoing. Implies
55.Fl l .
56.It Fl e
57Encode arguments as strings, rather than expecting them to be JSON-encoded.
58.It Fl T
59Test using shs1-testsuite protocol. Instead of connecting to a server and running
60a command, 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 c Ar cap
78Capability key for secret-handshake. Default is SSB's capability key,
79.Li 1KHLiKZvAvjbY1ziZEHMXawbCEIM6qwjCDm3VYRan/s= .
80.It Fl s Ar host
81The hostname to connect to. Default is localhost. If set to localhost and connection to localhost fails,
82.Nm
83may attempt to connect to other local interface addresses.
84.It Fl p Ar port
85The port to connect to. Default is 8008.
86.It Fl u Ar socket_path
87Unix socket path to connect to, instead of TCP socket. Conflicts with
88.Fl p
89and
90.Fl s .
91.It Fl k Ar key
92The key to connect to. Default is your public key, as read from your
93private key file.
94.It Fl K Ar keypair_seed
95Private key seed to use for secret-handshake. Default is to use the private key
96from your
97.Pa ~/.ssb/secret
98file or other secret file according to the environmental variables described in
99.Sx ENVIRONMENT .
100.It Fl t Ar type
101The type of method:
102.Dq async ,
103.Dq source ,
104.Dq sink ,
105or
106.Dq duplex .
107Default is to look up the method in
108.Pa ~/.ssb/manifest.json .
109.It Ar method
110Method name.
111.It Op Ar argument ...
112Arguments to pass to the method call. Each argument must be JSON-encoded, unless the
113.Fl e
114option is used, in which the arguments are treated as strings.
115.El
116.Sh ENVIRONMENT
117.Bl -tag
118.It Ev ssb_appname
119Name of the app. Default is
120.Dq ssb .
121Used to construct the app's directory if
122.Ev ssb_path
123is not present.
124.It Ev ssb_path
125Path to the app's directory. Default is to use
126.Ev ssb_appname to construct the path as
127.Dq ~/.<ssb_appname>
128.El
129.Sh FILES
130.Bl -tag -width -indent
131.It Pa ~/.ssb/secret
132Your private key, used for authenticating to the server with the
133secret-handshake protocol.
134.It Pa ~/.ssb/manifest.json
135A map of method names to method types.
136.It Pa ~/.ssb/config
137JSON file containing key, host, port, and/or SHS cap key to use if the
138.Fl s ,
139.Fl p
140or
141.Fl c
142options are not given, respectively.
143.It Pa ~/.ssb/socket
144UNIX socket stream file for noauth connections.
145If none of the options
146.Fl s ,
147.Fl p ,
148.Fl u ,
149.Fl c ,
150.Fl k ,
151.Fl K ,
152.Fl c ,
153.Fl 4 ,
154.Fl 6 ,
155or
156.Fl T
157are specified,
158.Nm
159will attempt to connect in noauth mode to this socket file. If the socket file
160is not present or the connection fails,
161.Nm
162will fall back to connecting with TCP and secret-handshake according to the
163config file - unless the
164.Fl n
165option is specified, in which case the command will fail.
166.El
167.Pp
168The base path
169.Dq ~/.ssb/
170of these file names may be changed by setting
171.Ev ssb_appname
172or
173.Ev ssb_path .
174.Sh EXIT STATUS
175.Bl -tag -width Ds
176.It 0
177The command completed successfully.
178.It 1
179An error occurred.
180.It 2
181The command completed with an error.
182.El
183.Sh AUTHORS
184.Nm
185was written by
186.An cel Aq @f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519 .
187.Sh BUGS
188.Pp
189Please report any bugs by making a post on SSB mentioning the repo,
190.Lk \*[REPO]
191

Built with git-ssb-web