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