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