opal-security 2.1.3 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +233 -157
  2. package/bin/dev +6 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +4 -4
  5. package/lib/commands/aws/identity.d.ts +2 -2
  6. package/lib/commands/aws/identity.js +5 -5
  7. package/lib/commands/curl-example.d.ts +2 -2
  8. package/lib/commands/curl-example.js +7 -6
  9. package/lib/commands/iam-roles/start.d.ts +6 -6
  10. package/lib/commands/iam-roles/start.js +16 -16
  11. package/lib/commands/kube-roles/start.d.ts +6 -6
  12. package/lib/commands/kube-roles/start.js +13 -13
  13. package/lib/commands/login.d.ts +4 -4
  14. package/lib/commands/login.js +28 -27
  15. package/lib/commands/logout.d.ts +3 -3
  16. package/lib/commands/logout.js +5 -5
  17. package/lib/commands/migrate-creds.d.ts +8 -0
  18. package/lib/commands/migrate-creds.js +48 -0
  19. package/lib/commands/postgres-instances/start.d.ts +7 -7
  20. package/lib/commands/postgres-instances/start.js +14 -14
  21. package/lib/commands/resources/get.d.ts +3 -3
  22. package/lib/commands/resources/get.js +8 -8
  23. package/lib/commands/set-custom-header.d.ts +4 -4
  24. package/lib/commands/set-custom-header.js +9 -9
  25. package/lib/commands/set-token.d.ts +3 -3
  26. package/lib/commands/set-token.js +10 -17
  27. package/lib/commands/set-url.d.ts +10 -12
  28. package/lib/commands/set-url.js +19 -20
  29. package/lib/commands/ssh/copyFrom.d.ts +7 -7
  30. package/lib/commands/ssh/copyFrom.js +13 -13
  31. package/lib/commands/ssh/copyTo.d.ts +7 -7
  32. package/lib/commands/ssh/copyTo.js +13 -13
  33. package/lib/commands/ssh/start.d.ts +5 -5
  34. package/lib/commands/ssh/start.js +16 -16
  35. package/lib/handler.d.ts +6 -5
  36. package/lib/handler.js +8 -6
  37. package/lib/index.d.ts +1 -1
  38. package/lib/index.js +3 -2
  39. package/lib/lib/apollo.d.ts +1 -1
  40. package/lib/lib/apollo.js +26 -19
  41. package/lib/lib/aws.js +4 -2
  42. package/lib/lib/cmd.d.ts +5 -4
  43. package/lib/lib/cmd.js +10 -5
  44. package/lib/lib/config.js +8 -5
  45. package/lib/lib/credentials/index.d.ts +11 -0
  46. package/lib/lib/credentials/index.js +52 -0
  47. package/lib/lib/credentials/keychain.d.ts +3 -0
  48. package/lib/lib/credentials/keychain.js +41 -0
  49. package/lib/lib/credentials/localEncryption.d.ts +3 -0
  50. package/lib/lib/credentials/localEncryption.js +75 -0
  51. package/lib/lib/flags.d.ts +5 -6
  52. package/lib/lib/flags.js +6 -6
  53. package/lib/lib/resources.d.ts +4 -4
  54. package/lib/lib/resources.js +14 -11
  55. package/lib/lib/sessions.d.ts +2 -2
  56. package/lib/lib/sessions.js +13 -11
  57. package/lib/lib/ssh.d.ts +1 -1
  58. package/lib/lib/ssh.js +6 -4
  59. package/lib/lib/util.js +8 -5
  60. package/lib/types.d.ts +1204 -1204
  61. package/lib/types.js +49 -49
  62. package/oclif.manifest.json +756 -1
  63. package/package.json +29 -24
  64. package/lib/lib/credentials.d.ts +0 -9
  65. package/lib/lib/credentials.js +0 -76
package/README.md CHANGED
@@ -21,8 +21,8 @@ Opal allows you to centrally manage access to all of your sensitive systems.
21
21
  $ npm install -g opal-security
22
22
  $ opal COMMAND
23
23
  running command...
24
- $ opal (-v|--version|version)
25
- opal-security/2.1.3 darwin-x64 node-v14.16.1
24
+ $ opal (--version)
25
+ opal-security/2.3.0 darwin-arm64 node-v18.19.0
26
26
  $ opal --help [COMMAND]
27
27
  USAGE
28
28
  $ opal COMMAND
@@ -36,11 +36,12 @@ USAGE
36
36
  * [`opal autocomplete [SHELL]`](#opal-autocomplete-shell)
37
37
  * [`opal aws:identity`](#opal-awsidentity)
38
38
  * [`opal curl-example`](#opal-curl-example)
39
- * [`opal help [COMMAND]`](#opal-help-command)
39
+ * [`opal help [COMMANDS]`](#opal-help-commands)
40
40
  * [`opal iam-roles:start`](#opal-iam-rolesstart)
41
41
  * [`opal kube-roles:start`](#opal-kube-rolesstart)
42
42
  * [`opal login`](#opal-login)
43
43
  * [`opal logout`](#opal-logout)
44
+ * [`opal migrate-creds`](#opal-migrate-creds)
44
45
  * [`opal postgres-instances:start`](#opal-postgres-instancesstart)
45
46
  * [`opal resources:get`](#opal-resourcesget)
46
47
  * [`opal set-custom-header`](#opal-set-custom-header)
@@ -49,6 +50,7 @@ USAGE
49
50
  * [`opal ssh:copyFrom`](#opal-sshcopyfrom)
50
51
  * [`opal ssh:copyTo`](#opal-sshcopyto)
51
52
  * [`opal ssh:start`](#opal-sshstart)
53
+ * [`opal version`](#opal-version)
52
54
 
53
55
  ## `opal autocomplete [SHELL]`
54
56
 
@@ -56,22 +58,28 @@ display autocomplete installation instructions
56
58
 
57
59
  ```
58
60
  USAGE
59
- $ opal autocomplete [SHELL]
61
+ $ opal autocomplete [SHELL] [-r]
60
62
 
61
63
  ARGUMENTS
62
64
  SHELL shell type
63
65
 
64
- OPTIONS
66
+ FLAGS
65
67
  -r, --refresh-cache Refresh cache (ignores displaying instructions)
66
68
 
69
+ DESCRIPTION
70
+ display autocomplete installation instructions
71
+
67
72
  EXAMPLES
68
73
  $ opal autocomplete
74
+
69
75
  $ opal autocomplete bash
76
+
70
77
  $ opal autocomplete zsh
78
+
71
79
  $ opal autocomplete --refresh-cache
72
80
  ```
73
81
 
74
- _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v0.3.0/src/commands/autocomplete/index.ts)_
82
+ _See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v1.4.6/src/commands/autocomplete/index.ts)_
75
83
 
76
84
  ## `opal aws:identity`
77
85
 
@@ -79,16 +87,19 @@ Gets the current caller identity for the "opal" AWS profile.
79
87
 
80
88
  ```
81
89
  USAGE
82
- $ opal aws:identity
90
+ $ opal aws:identity [-h]
83
91
 
84
- OPTIONS
85
- -h, --help show CLI help
92
+ FLAGS
93
+ -h, --help Show CLI help.
86
94
 
87
- EXAMPLE
88
- opal aws:identity
95
+ DESCRIPTION
96
+ Gets the current caller identity for the "opal" AWS profile.
97
+
98
+ EXAMPLES
99
+ $ opal aws:identity
89
100
  ```
90
101
 
91
- _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/aws/identity.ts)_
102
+ _See code: [src/commands/aws/identity.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/aws/identity.ts)_
92
103
 
93
104
  ## `opal curl-example`
94
105
 
@@ -96,30 +107,36 @@ Prints out an example cURL command containing the parameters the CLI uses to que
96
107
 
97
108
  ```
98
109
  USAGE
99
- $ opal curl-example
110
+ $ opal curl-example [-h]
100
111
 
101
- OPTIONS
102
- -h, --help show CLI help
112
+ FLAGS
113
+ -h, --help Show CLI help.
114
+
115
+ DESCRIPTION
116
+ Prints out an example cURL command containing the parameters the CLI uses to query the Opal server.
103
117
  ```
104
118
 
105
- _See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/curl-example.ts)_
119
+ _See code: [src/commands/curl-example.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/curl-example.ts)_
106
120
 
107
- ## `opal help [COMMAND]`
121
+ ## `opal help [COMMANDS]`
108
122
 
109
123
  Display help for opal.
110
124
 
111
125
  ```
112
126
  USAGE
113
- $ opal help [COMMAND]
127
+ $ opal help [COMMANDS] [-n]
114
128
 
115
129
  ARGUMENTS
116
- COMMAND Command to show help for.
130
+ COMMANDS Command to show help for.
117
131
 
118
- OPTIONS
132
+ FLAGS
119
133
  -n, --nested-commands Include all nested commands in the output.
134
+
135
+ DESCRIPTION
136
+ Display help for opal.
120
137
  ```
121
138
 
122
- _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_
139
+ _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.2.20/src/commands/help.ts)_
123
140
 
124
141
  ## `opal iam-roles:start`
125
142
 
@@ -127,28 +144,29 @@ Starts a session to assume an IAM role.
127
144
 
128
145
  ```
129
146
  USAGE
130
- $ opal iam-roles:start
131
-
132
- OPTIONS
133
- -h, --help show CLI help
147
+ $ opal iam-roles:start [-h] [-i <value>] [-s <value>] [-r] [--profileName <value>]
134
148
 
135
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
149
+ FLAGS
150
+ -h, --help Show CLI help.
151
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
136
152
  https://opal.dev/resources/[ID]
137
-
138
153
  -r, --refresh Starts a new session even if one already exists. Useful if a session is about to expire.
139
-
140
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
154
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
141
155
  web flow.
156
+ --profileName=<value> Uses a custom AWS profile name for the IAM role. Default value is the role's name.
142
157
 
143
- --profileName=profileName Uses a custom AWS profile name for the IAM role. Default value is the role's name.
158
+ DESCRIPTION
159
+ Starts a session to assume an IAM role.
144
160
 
145
161
  EXAMPLES
146
- opal iam-roles:start
147
- opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
148
- opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
162
+ $ opal iam-roles:start
163
+
164
+ $ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
165
+
166
+ $ opal iam-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --profileName "custom-profile"
149
167
  ```
150
168
 
151
- _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/iam-roles/start.ts)_
169
+ _See code: [src/commands/iam-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/iam-roles/start.ts)_
152
170
 
153
171
  ## `opal kube-roles:start`
154
172
 
@@ -156,29 +174,30 @@ Starts a session to assume a Kubernetes cluster IAM role.
156
174
 
157
175
  ```
158
176
  USAGE
159
- $ opal kube-roles:start
177
+ $ opal kube-roles:start [-h] [-i <value>] [-a <value>] [-s <value>] [-r]
160
178
 
161
- OPTIONS
162
- -a, --accessLevelRemoteId=accessLevelRemoteId The remote ID of the access level with which to access the resource.
163
- -h, --help show CLI help
179
+ FLAGS
180
+ -a, --accessLevelRemoteId=<value> The remote ID of the access level with which to access the resource.
181
+ -h, --help Show CLI help.
182
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
183
+ https://opal.dev/resources/[ID]
184
+ -r, --refresh Starts a new session even if one already exists. Useful if a session is about to
185
+ expire.
186
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created
187
+ via the web flow.
164
188
 
165
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
166
- https://opal.dev/resources/[ID]
189
+ DESCRIPTION
190
+ Starts a session to assume a Kubernetes cluster IAM role.
167
191
 
168
- -r, --refresh Starts a new session even if one already exists. Useful if a session is
169
- about to expire.
192
+ EXAMPLES
193
+ $ opal kube-roles:start
170
194
 
171
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that
172
- was created via the web flow.
195
+ $ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
173
196
 
174
- EXAMPLES
175
- opal kube-roles:start
176
- opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398
177
- opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId
178
- "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
197
+ $ opal kube-roles:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId "arn:aws:iam::712234975475:role/acme-eks-cluster-admin-role"
179
198
  ```
180
199
 
181
- _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/kube-roles/start.ts)_
200
+ _See code: [src/commands/kube-roles/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/kube-roles/start.ts)_
182
201
 
183
202
  ## `opal login`
184
203
 
@@ -186,17 +205,20 @@ Authenticates you with the Opal server.
186
205
 
187
206
  ```
188
207
  USAGE
189
- $ opal login
208
+ $ opal login [-h] [--email <value>]
209
+
210
+ FLAGS
211
+ -h, --help Show CLI help.
212
+ --email=<value> Email address to login with.
190
213
 
191
- OPTIONS
192
- -h, --help show CLI help
193
- --email=email Email address to login with.
214
+ DESCRIPTION
215
+ Authenticates you with the Opal server.
194
216
 
195
- EXAMPLE
217
+ EXAMPLES
196
218
  $ opal login
197
219
  ```
198
220
 
199
- _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/login.ts)_
221
+ _See code: [src/commands/login.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/login.ts)_
200
222
 
201
223
  ## `opal logout`
202
224
 
@@ -204,51 +226,74 @@ Clears locally stored Opal server authentication credentials.
204
226
 
205
227
  ```
206
228
  USAGE
207
- $ opal logout
229
+ $ opal logout [-h]
208
230
 
209
- OPTIONS
210
- -h, --help show CLI help
231
+ FLAGS
232
+ -h, --help Show CLI help.
211
233
 
212
- EXAMPLE
234
+ DESCRIPTION
235
+ Clears locally stored Opal server authentication credentials.
236
+
237
+ EXAMPLES
213
238
  $ opal logout
214
239
  ```
215
240
 
216
- _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/logout.ts)_
241
+ _See code: [src/commands/logout.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/logout.ts)_
217
242
 
218
- ## `opal postgres-instances:start`
243
+ ## `opal migrate-creds`
219
244
 
220
- Starts a session to connect to a Postgres database.
245
+ Migrates credentials from old keystore to new store. Should only need to be run once
221
246
 
222
247
  ```
223
248
  USAGE
224
- $ opal postgres-instances:start
249
+ $ opal migrate-creds [-h]
225
250
 
226
- OPTIONS
227
- -a, --accessLevelRemoteId=accessLevelRemoteId The remote ID of the access level with which to access the resource.
228
- -h, --help show CLI help
251
+ FLAGS
252
+ -h, --help Show CLI help.
229
253
 
230
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
231
- https://opal.dev/resources/[ID]
254
+ DESCRIPTION
255
+ Migrates credentials from old keystore to new store. Should only need to be run once
256
+ ```
232
257
 
233
- -r, --refresh Starts a new session even if one already exists. Useful if a session is
234
- about to expire.
258
+ _See code: [src/commands/migrate-creds.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/migrate-creds.ts)_
235
259
 
236
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that
237
- was created via the web flow.
260
+ ## `opal postgres-instances:start`
238
261
 
239
- --action=open|psql|view Method of connecting to the database.
240
- - open: Open external database app
241
- - psql: Start psql session in shell
242
- - view: View connection configuration details
262
+ Starts a session to connect to a Postgres database.
263
+
264
+ ```
265
+ USAGE
266
+ $ opal postgres-instances:start [-h] [-i <value>] [-a <value>] [-s <value>] [-r] [--action open|psql|view]
267
+
268
+ FLAGS
269
+ -a, --accessLevelRemoteId=<value> The remote ID of the access level with which to access the resource.
270
+ -h, --help Show CLI help.
271
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
272
+ https://opal.dev/resources/[ID]
273
+ -r, --refresh Starts a new session even if one already exists. Useful if a session is about to
274
+ expire.
275
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created
276
+ via the web flow.
277
+ --action=<option> Method of connecting to the database.
278
+ - open: Open external database app
279
+ - psql: Start psql session in shell
280
+ - view: View connection configuration details
281
+ <options: open|psql|view>
282
+
283
+ DESCRIPTION
284
+ Starts a session to connect to a Postgres database.
243
285
 
244
286
  EXAMPLES
245
- opal postgres-instances:start
246
- opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398
247
- opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess
248
- opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
287
+ $ opal postgres-instances:start
288
+
289
+ $ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398
290
+
291
+ $ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess
292
+
293
+ $ opal postgres-instances:start --id 51f7176b-0464-4a6f-8369-e951e187b398 --accessLevelRemoteId fullaccess --action view
249
294
  ```
250
295
 
251
- _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/postgres-instances/start.ts)_
296
+ _See code: [src/commands/postgres-instances/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/postgres-instances/start.ts)_
252
297
 
253
298
  ## `opal resources:get`
254
299
 
@@ -256,17 +301,20 @@ Get resource info for a particular resource.
256
301
 
257
302
  ```
258
303
  USAGE
259
- $ opal resources:get
304
+ $ opal resources:get [-h] [-i <value>]
260
305
 
261
- OPTIONS
262
- -h, --help show CLI help
263
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]
306
+ FLAGS
307
+ -h, --help Show CLI help.
308
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g. https://opal.dev/resources/[ID]
264
309
 
265
- EXAMPLE
266
- opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
310
+ DESCRIPTION
311
+ Get resource info for a particular resource.
312
+
313
+ EXAMPLES
314
+ $ opal resources:get --id 54052a3e-5375-4392-aeaf-0c6c44c131d4
267
315
  ```
268
316
 
269
- _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/resources/get.ts)_
317
+ _See code: [src/commands/resources/get.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/resources/get.ts)_
270
318
 
271
319
  ## `opal set-custom-header`
272
320
 
@@ -274,17 +322,20 @@ Sets a custom HTTP header to connect to the Opal server.
274
322
 
275
323
  ```
276
324
  USAGE
277
- $ opal set-custom-header
325
+ $ opal set-custom-header [-h] [--header <value>]
326
+
327
+ FLAGS
328
+ -h, --help Show CLI help.
329
+ --header=<value>
278
330
 
279
- OPTIONS
280
- -h, --help show CLI help
281
- --header=header
331
+ DESCRIPTION
332
+ Sets a custom HTTP header to connect to the Opal server.
282
333
 
283
- EXAMPLE
334
+ EXAMPLES
284
335
  $ opal set-custom-header --header 'cf-access-token: $TOKEN'
285
336
  ```
286
337
 
287
- _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/set-custom-header.ts)_
338
+ _See code: [src/commands/set-custom-header.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/set-custom-header.ts)_
288
339
 
289
340
  ## `opal set-token`
290
341
 
@@ -292,16 +343,19 @@ Sets an API token to authenticate with the Opal server - alternative auth flow f
292
343
 
293
344
  ```
294
345
  USAGE
295
- $ opal set-token
346
+ $ opal set-token [-h]
296
347
 
297
- OPTIONS
298
- -h, --help show CLI help
348
+ FLAGS
349
+ -h, --help Show CLI help.
299
350
 
300
- EXAMPLE
351
+ DESCRIPTION
352
+ Sets an API token to authenticate with the Opal server - alternative auth flow for headless environments.
353
+
354
+ EXAMPLES
301
355
  $ opal set-token
302
356
  ```
303
357
 
304
- _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/set-token.ts)_
358
+ _See code: [src/commands/set-token.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/set-token.ts)_
305
359
 
306
360
  ## `opal set-url [URL]`
307
361
 
@@ -309,20 +363,23 @@ Sets the url of the Opal server. Defaults to https://app.opal.dev.
309
363
 
310
364
  ```
311
365
  USAGE
312
- $ opal set-url [URL]
366
+ $ opal set-url [URL] [-h] [--allowSelfSignedCerts]
313
367
 
314
368
  ARGUMENTS
315
369
  URL URL of the Opal server to use. If unspecified, defaults to https://app.opal.dev
316
370
 
317
- OPTIONS
318
- -h, --help show CLI help
371
+ FLAGS
372
+ -h, --help Show CLI help.
319
373
  --allowSelfSignedCerts
320
374
 
321
- EXAMPLE
375
+ DESCRIPTION
376
+ Sets the url of the Opal server. Defaults to https://app.opal.dev.
377
+
378
+ EXAMPLES
322
379
  $ opal set-url
323
380
  ```
324
381
 
325
- _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/set-url.ts)_
382
+ _See code: [src/commands/set-url.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/set-url.ts)_
326
383
 
327
384
  ## `opal ssh:copyFrom`
328
385
 
@@ -330,31 +387,30 @@ Use SCP to copy files from a compute instance.
330
387
 
331
388
  ```
332
389
  USAGE
333
- $ opal ssh:copyFrom
334
-
335
- OPTIONS
336
- -h, --help show CLI help
337
-
338
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
339
- https://opal.dev/resources/[ID]
340
-
341
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
342
- web flow.
343
-
344
- --dest=dest [default: .] The directory you want your files to be copied to.
345
-
346
- --src=src (required) The directory or file you would like to copy over SCP. Note we only support one
347
- file or directory at a time.
348
-
349
- --user=user [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
350
- access to each other's home directory.
390
+ $ opal ssh:copyFrom --src <value> [-h] [--dest <value>] [--user <value>] [-i <value>] [-s <value>]
391
+
392
+ FLAGS
393
+ -h, --help Show CLI help.
394
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
395
+ https://opal.dev/resources/[ID]
396
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
397
+ web flow.
398
+ --dest=<value> [default: .] The directory you want your files to be copied to.
399
+ --src=<value> (required) The directory or file you would like to copy over SCP. Note we only support one
400
+ file or directory at a time.
401
+ --user=<value> [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
402
+ access to each other's home directory.
403
+
404
+ DESCRIPTION
405
+ Use SCP to copy files from a compute instance.
351
406
 
352
407
  EXAMPLES
353
- opal ssh:copyFrom --src instance/dir --dest my/dir
354
- opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
408
+ $ opal ssh:copyFrom --src instance/dir --dest my/dir
409
+
410
+ $ opal ssh:copyFrom --src instance/dir --dest my/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
355
411
  ```
356
412
 
357
- _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/ssh/copyFrom.ts)_
413
+ _See code: [src/commands/ssh/copyFrom.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/ssh/copyFrom.ts)_
358
414
 
359
415
  ## `opal ssh:copyTo`
360
416
 
@@ -362,55 +418,75 @@ Use SCP to copy files to a compute instance.
362
418
 
363
419
  ```
364
420
  USAGE
365
- $ opal ssh:copyTo
421
+ $ opal ssh:copyTo --src <value> [-h] [--dest <value>] [--user <value>] [-i <value>] [-s <value>]
422
+
423
+ FLAGS
424
+ -h, --help Show CLI help.
425
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
426
+ https://opal.dev/resources/[ID]
427
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
428
+ web flow.
429
+ --dest=<value> [default: .] The directory you want your files to be copied to.
430
+ --src=<value> (required) The directory or file you would like to copy over SCP. Note we only support one
431
+ file or directory at a time.
432
+ --user=<value> [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
433
+ access to each other's home directory.
434
+
435
+ DESCRIPTION
436
+ Use SCP to copy files to a compute instance.
366
437
 
367
- OPTIONS
368
- -h, --help show CLI help
438
+ EXAMPLES
439
+ $ opal ssh:copyTo --src my/dir --dest instance/dir
369
440
 
370
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
371
- https://opal.dev/resources/[ID]
441
+ $ opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
442
+ ```
372
443
 
373
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
374
- web flow.
444
+ _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/ssh/copyTo.ts)_
445
+
446
+ ## `opal ssh:start`
447
+
448
+ Starts an SSH session to access a compute instance.
375
449
 
376
- --dest=dest [default: .] The directory you want your files to be copied to.
450
+ ```
451
+ USAGE
452
+ $ opal ssh:start [-h] [-i <value>] [-s <value>] [-r]
377
453
 
378
- --src=src (required) The directory or file you would like to copy over SCP. Note we only support one
379
- file or directory at a time.
454
+ FLAGS
455
+ -h, --help Show CLI help.
456
+ -i, --id=<value> The Opal ID of the resource. You can find this from the URL, e.g.
457
+ https://opal.dev/resources/[ID]
458
+ -r, --refresh Starts a new session even if one already exists. Useful if a session is about to expire.
459
+ -s, --sessionId=<value> The Opal ID of the session to connect to. Uses an existing session that was created via the
460
+ web flow.
380
461
 
381
- --user=user [default: ssm-user] The user you want to run SCP over. Keep in mind not all users will have
382
- access to each other's home directory.
462
+ DESCRIPTION
463
+ Starts an SSH session to access a compute instance.
383
464
 
384
465
  EXAMPLES
385
- opal ssh:copyTo --src my/dir --dest instance/dir
386
- opal ssh:copyTo --src my/dir --dest instance/dir --id 51f7176b-0464-4a6f-8369-e951e187b398
387
- ```
466
+ $ opal ssh:start
388
467
 
389
- _See code: [src/commands/ssh/copyTo.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/ssh/copyTo.ts)_
468
+ $ opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
469
+ ```
390
470
 
391
- ## `opal ssh:start`
471
+ _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.3.0/src/commands/ssh/start.ts)_
392
472
 
393
- Starts an SSH session to access a compute instance.
473
+ ## `opal version`
394
474
 
395
475
  ```
396
476
  USAGE
397
- $ opal ssh:start
477
+ $ opal version [--json] [--verbose]
398
478
 
399
- OPTIONS
400
- -h, --help show CLI help
479
+ FLAGS
480
+ --verbose Show additional information about the CLI.
401
481
 
402
- -i, --id=id The Opal ID of the resource. You can find this from the URL, e.g.
403
- https://opal.dev/resources/[ID]
482
+ GLOBAL FLAGS
483
+ --json Format output as json.
404
484
 
405
- -r, --refresh Starts a new session even if one already exists. Useful if a session is about to expire.
406
-
407
- -s, --sessionId=sessionId The Opal ID of the session to connect to. Uses an existing session that was created via the
408
- web flow.
485
+ FLAG DESCRIPTIONS
486
+ --verbose Show additional information about the CLI.
409
487
 
410
- EXAMPLES
411
- opal ssh:start
412
- opal ssh:start --id 51f7176b-0464-4a6f-8369-e951e187b398
488
+ Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
413
489
  ```
414
490
 
415
- _See code: [src/commands/ssh/start.ts](https://github.com/opalsecurity/opal-cli/blob/v2.1.3/src/commands/ssh/start.ts)_
491
+ _See code: [@oclif/plugin-version](https://github.com/oclif/plugin-version/blob/v2.0.11/src/commands/version.ts)_
416
492
  <!-- commandsstop -->
package/bin/dev ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+
3
+ require("@oclif/core")
4
+ .execute({ development: true, dir: __dirname })
5
+ .then(require("@oclif/core/flush"))
6
+ .catch(require("@oclif/core/handle"));
package/bin/dev.cmd ADDED
@@ -0,0 +1,3 @@
1
+ @echo off
2
+
3
+ node "%~dp0\dev" %*
package/bin/run CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- require("@oclif/command")
4
- .run()
5
- .then(require("@oclif/command/flush"))
6
- .catch(require("@oclif/errors/handle"));
3
+ require("@oclif/core")
4
+ .execute({ development: false, dir: __dirname })
5
+ .then(require("@oclif/core/flush"))
6
+ .catch(require("@oclif/core/handle"));
@@ -1,9 +1,9 @@
1
- import { Command } from '@oclif/command';
1
+ import { Command } from '@oclif/core';
2
2
  export default class Identity extends Command {
3
3
  static description: string;
4
4
  static examples: string[];
5
5
  static flags: {
6
- help: import("@oclif/parser/lib/flags").IBooleanFlag<void>;
6
+ help: import("@oclif/core/lib/interfaces").BooleanFlag<void>;
7
7
  };
8
8
  run(): Promise<void>;
9
9
  }