@tigrisdata/cli 2.1.1 → 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 (46) hide show
  1. package/README.md +381 -1
  2. package/dist/auth/client.js +1 -1
  3. package/dist/auth/config.js +1 -1
  4. package/dist/auth/s3-client.js +1 -1
  5. package/dist/auth/storage.js +1 -1
  6. package/dist/cli.js +11 -8
  7. package/dist/index.js +11 -8
  8. package/dist/lib/buckets/create.js +2 -2
  9. package/dist/lib/buckets/delete.js +2 -0
  10. package/dist/lib/buckets/get.js +7 -0
  11. package/dist/lib/buckets/list.js +6 -6
  12. package/dist/lib/buckets/set.js +2 -0
  13. package/dist/lib/configure/index.js +2 -2
  14. package/dist/lib/cp.js +1 -1
  15. package/dist/lib/credentials/test.js +2 -0
  16. package/dist/lib/forks/create.js +2 -0
  17. package/dist/lib/forks/list.js +7 -0
  18. package/dist/lib/login/credentials.js +2 -2
  19. package/dist/lib/login/oauth.js +5 -0
  20. package/dist/lib/login/select.js +5 -5
  21. package/dist/lib/logout.js +2 -2
  22. package/dist/lib/ls.js +6 -1
  23. package/dist/lib/mk.js +1 -1
  24. package/dist/lib/mv.js +1 -1
  25. package/dist/lib/objects/delete.js +2 -0
  26. package/dist/lib/objects/get.js +2 -0
  27. package/dist/lib/objects/list.js +7 -0
  28. package/dist/lib/objects/put.js +7 -0
  29. package/dist/lib/organizations/create.js +5 -0
  30. package/dist/lib/organizations/list.js +10 -0
  31. package/dist/lib/organizations/select.js +9 -0
  32. package/dist/lib/rm.js +1 -1
  33. package/dist/lib/snapshots/list.js +7 -0
  34. package/dist/lib/snapshots/take.js +2 -0
  35. package/dist/lib/touch.js +1 -0
  36. package/dist/lib/whoami.js +3 -3
  37. package/dist/specs.yaml +311 -259
  38. package/dist/utils/messages.js +2 -2
  39. package/dist/utils/options.js +1 -1
  40. package/dist/utils/path.js +1 -1
  41. package/package.json +14 -4
  42. package/dist/lib/login/ui.js +0 -5
  43. package/dist/lib/orgs/create.js +0 -2
  44. package/dist/lib/orgs/list.js +0 -7
  45. package/dist/lib/orgs/select.js +0 -6
  46. /package/dist/lib/{stat.js → _stat.js} +0 -0
package/dist/specs.yaml CHANGED
@@ -71,27 +71,139 @@ definitions:
71
71
  value: syd
72
72
  description: Sydney, Australia
73
73
 
74
- access_options: &access_options
75
- [public, private]
74
+ access_options: &access_options [public, private]
76
75
 
77
76
  commands:
77
+ #########################
78
+ # Authentication
79
+ #########################
80
+ # configure
81
+ - name: configure
82
+ description: Save credentials permanently. After running this, all commands work automatically
83
+ alias: c
84
+ messages:
85
+ onStart: 'Saving credentials...'
86
+ onSuccess: 'Credentials saved to ~/.tigris/config.json. You can now use all tigris commands.'
87
+ onFailure: 'Failed to save credentials'
88
+ arguments:
89
+ - name: access-key
90
+ description: Your Tigris access key ID
91
+ alias: key
92
+ required: false
93
+ - name: access-secret
94
+ description: Your Tigris secret access key
95
+ alias: secret
96
+ required: false
97
+ - name: endpoint
98
+ description: 'Tigris API endpoint (default: https://t3.storage.dev)'
99
+ alias: e
100
+ required: false
101
+
102
+ # login
103
+ - name: login
104
+ description: Start a session. Use OAuth (default) or temporary credentials that override your saved config
105
+ messages:
106
+ onStart: ''
107
+ onSuccess: 'Login successful'
108
+ onFailure: 'Login failed'
109
+ alias: l
110
+ arguments:
111
+ - name: access-key
112
+ description: Use temporary credentials instead of OAuth (useful for testing different keys)
113
+ alias: key
114
+ required: false
115
+ - name: access-secret
116
+ description: Secret for temporary credentials
117
+ alias: secret
118
+ required: false
119
+ operations:
120
+ # login (main interactive operation)
121
+ - name: select
122
+ description: Choose how to login - OAuth (browser) or credentials (access key)
123
+ messages:
124
+ onStart: ''
125
+ onSuccess: 'Login successful'
126
+ onFailure: 'Login failed'
127
+ # oauth
128
+ - name: oauth
129
+ description: Login via browser (OAuth2 device flow). Best for interactive use
130
+ alias: o
131
+ messages:
132
+ onStart: 'Opening browser for authentication...'
133
+ onSuccess: "Logged in successfully\nOrganization '{{org}}' selected"
134
+ onFailure: 'Authentication failed'
135
+ onAlreadyDone: "Already logged in.\nRun \"tigris logout\" first to switch accounts."
136
+ hint: "You have {{count}} organizations.\nRun \"tigris orgs list\" to switch."
137
+ # credentials
138
+ - name: credentials
139
+ description: Login with access key + secret. Creates a temporary session (cleared on logout)
140
+ alias: c
141
+ messages:
142
+ onStart: 'Authenticating...'
143
+ onSuccess: 'Logged in with credentials'
144
+ onFailure: 'Authentication failed'
145
+ arguments:
146
+ - name: access-key
147
+ description: Your access key ID (will prompt if not provided)
148
+ alias: key
149
+ required: false
150
+ - name: access-secret
151
+ description: Your secret access key (will prompt if not provided)
152
+ alias: secret
153
+ required: false
154
+ default: select
155
+
156
+ # whoami
157
+ - name: whoami
158
+ description: Show information about the current user
159
+ alias: w
160
+ messages:
161
+ onStart: ''
162
+ onSuccess: ''
163
+ onFailure: 'Failed to get user information'
164
+ onAlreadyDone: "Not authenticated\nRun \"tigris login\" to authenticate"
165
+
166
+ # logout
167
+ - name: logout
168
+ description: End your session. Clears login state but keeps credentials from 'configure'
169
+ messages:
170
+ onStart: 'Logging out...'
171
+ onSuccess: 'Logged out. Your configured credentials are still saved.'
172
+ onFailure: 'Failed to logout'
173
+
174
+ # credentials
175
+ - name: credentials
176
+ description: Manage and test credentials
177
+ alias: creds
178
+ operations:
179
+ - name: test
180
+ description: Test if credentials have access to Tigris (optionally to a specific bucket)
181
+ alias: t
182
+ messages:
183
+ onStart: 'Testing credentials...'
184
+ onSuccess: 'Credentials are valid'
185
+ onFailure: 'Credentials test failed'
186
+ arguments:
187
+ - name: bucket
188
+ description: Bucket name to test access against (optional)
189
+ alias: b
190
+ required: false
191
+
78
192
  #########################
79
193
  # Unix style commands
80
194
  #########################
81
-
82
195
  # ls
83
196
  - name: ls
84
197
  description: List buckets or objects in a bucket or path
85
198
  alias: list
86
199
  arguments:
87
200
  - name: path
88
- required: true
89
- type: noun
90
- description: a bucket or path in a bucket
201
+ type: positional
202
+ description: a bucket or path in a bucket (if not provided, lists all buckets)
91
203
  examples:
92
204
  - my-bucket
93
205
  - my-bucket/my-path
94
-
206
+
95
207
  # mk
96
208
  - name: mk
97
209
  description: Create a bucket or a folder in a bucket
@@ -99,25 +211,36 @@ commands:
99
211
  arguments:
100
212
  - name: path
101
213
  required: true
102
- type: noun
214
+ type: positional
103
215
  description: a bucket or a folder in a bucket
104
216
  examples:
105
217
  - my-bucket
106
218
  - my-bucket/my-path
107
-
219
+
220
+ # touch
221
+ - name: touch
222
+ description: Create an empty object in a bucket
223
+ arguments:
224
+ - name: path
225
+ required: true
226
+ type: positional
227
+ description: path to the object (bucket/key)
228
+ examples:
229
+ - my-bucket/my-file.txt
230
+
108
231
  # stat
109
232
  - name: stat
110
233
  description: Get the details of a bucket or a folder in a bucket or an object in a bucket or path
111
234
  arguments:
112
235
  - name: path
113
236
  required: true
114
- type: noun
237
+ type: positional
115
238
  description: a bucket or a folder in a bucket or an object in a bucket or path
116
239
  examples:
117
240
  - my-bucket
118
241
  - my-bucket/my-path
119
242
  - my-bucket/my-path/my-object.json
120
-
243
+
121
244
  # cp
122
245
  - name: cp
123
246
  description: Copy a folder or an object
@@ -125,7 +248,7 @@ commands:
125
248
  arguments:
126
249
  - name: src
127
250
  required: true
128
- type: noun
251
+ type: positional
129
252
  description: a bucket, a folder in a bucket, an object in a bucket / path. Wildcard is supported.
130
253
  examples:
131
254
  - my-bucket
@@ -133,43 +256,46 @@ commands:
133
256
  - my-bucket/my-path/my-object.json
134
257
  - name: dest
135
258
  required: true
136
- type: noun
259
+ type: positional
137
260
  description: path to copy to
138
261
  examples:
139
262
  - my-bucket
140
263
  - my-bucket/my-path
141
264
  - my-bucket/my-path/*
142
265
  - my-bucket/my-path/my-object.json
143
-
266
+
144
267
  # mv
145
268
  - name: mv
146
269
  description: Move a folder or an object
147
270
  alias: move
148
271
  arguments:
149
272
  - name: src
150
- type: noun
273
+ type: positional
151
274
  required: true
152
275
  description: path to move from
153
276
  examples:
154
- - my-bucket
155
277
  - my-bucket/my-path
156
278
  - my-bucket/my-path/*
157
279
  - my-bucket/my-path/my-object.json
158
280
  - name: dest
159
- type: noun
281
+ type: positional
160
282
  required: true
161
283
  description: path to move to
162
284
  examples:
163
285
  - my-bucket
164
286
  - my-bucket/new-path
165
-
287
+ - name: force
288
+ type: flag
289
+ alias: f
290
+ description: Skip confirmation prompt
291
+
166
292
  # rm
167
293
  - name: rm
168
294
  description: Remove a bucket or a folder in a bucket or an object in a bucket or path
169
- alias: remvoe
295
+ alias: remove
170
296
  arguments:
171
297
  - name: path
172
- type: noun
298
+ type: positional
173
299
  required: true
174
300
  description: a bucket, a folder in a bucket, an object in a bucket / path. Wildcard is supported.
175
301
  examples:
@@ -177,137 +303,16 @@ commands:
177
303
  - my-bucket/my-path
178
304
  - my-bucket/my-path/*
179
305
  - my-bucket/my-path/my-object.json
180
-
181
- #########################
182
- # Authentication
183
- #########################
184
- # logout
185
- - name: logout
186
- description: Logout from Tigris
187
- messages:
188
- onStart: "Logging out..."
189
- onSuccess: "Logged out successfully"
190
- onFailure: "Failed to logout"
191
-
192
- # whoami
193
- - name: whoami
194
- description: Show information about the current user
195
- alias: w
196
- messages:
197
- onStart: ""
198
- onSuccess: ""
199
- onFailure: "Failed to get user information"
200
- onAlreadyDone: "Not authenticated\nRun \"tigris login\" to authenticate"
201
-
202
- # configure
203
- - name: configure
204
- description: Configure Tigris credentials interactively
205
- alias: c
206
- messages:
207
- onStart: "Configuring credentials..."
208
- onSuccess: "Configuration saved"
209
- onFailure: "Failed to configure credentials"
210
- arguments:
211
- - name: access-key
212
- description: Tigris Access key ID
213
- alias: key
214
- required: false
215
- - name: access-secret
216
- description: Tigris Access secret
217
- alias: secret
218
- required: false
219
- - name: endpoint
220
- description: Tigris Endpoint
221
- alias: e
222
- required: false
223
-
224
- # login
225
- - name: login
226
- description: Login to Tigris (interactive selection between user and machine)
227
- messages:
228
- onStart: "Logging in..."
229
- onSuccess: "Login successful"
230
- onFailure: "Login failed"
231
- alias: l
232
- arguments:
233
- - name: access-key
234
- description: Access key (optional, will use credentials flow if provided)
235
- alias: key
236
- required: false
237
- - name: access-secret
238
- description: Access secret (optional, will use credentials flow if provided)
239
- alias: secret
240
- required: false
241
- - name: profile
242
- description: Use saved credentials profile (loads from ~/.tigris/credentials.json)
243
- alias: p
244
- required: false
306
+ - name: force
245
307
  type: flag
246
- - name: oauth
247
- description: Login as a user (OAuth2 flow)
248
- alias: o
249
- required: false
250
- type: flag
251
- operations:
252
- # login (main interactive operation)
253
- - name: select
254
- description: Interactive selection between user and machine login
255
- messages:
256
- onStart: ""
257
- onSuccess: "Login successful"
258
- onFailure: "Login failed"
259
- arguments:
260
- - name: access-key
261
- description: Access key (optional, will use credentials flow if provided)
262
- alias: key
263
- required: false
264
- - name: access-secret
265
- description: Access secret (optional, will use credentials flow if provided)
266
- alias: secret
267
- required: false
268
- - name: profile
269
- description: Use saved credentials profile (loads from ~/.tigris/credentials.json)
270
- alias: p
271
- required: false
272
- type: flag
273
- - name: oauth
274
- description: Login as a user (OAuth2 flow)
275
- alias: o
276
- required: false
277
- type: flag
278
- # ui
279
- - name: ui
280
- description: Login as a user (OAuth2 flow)
281
- alias: u
282
- messages:
283
- onStart: "Initiating authentication..."
284
- onSuccess: "Authentication successful\nOrganization '{{org}}' selected"
285
- onFailure: "Authentication failed"
286
- onAlreadyDone: "You are already logged in.\nRun \"tigris logout\" first if you want to login with a different account."
287
- hint: "You have {{count}} organizations available.\nRun \"tigris orgs list\" to see all and switch if needed."
288
- # credentials
289
- - name: credentials
290
- description: Login as a machine (with access key and secret)
291
- alias: c
292
- messages:
293
- onStart: "Authenticating with credentials..."
294
- onSuccess: "Login successful"
295
- onFailure: "Login failed"
296
- arguments:
297
- - name: access-key
298
- description: Access key (optional, will prompt or use saved credentials if not provided)
299
- alias: key
300
- required: false
301
- - name: access-secret
302
- description: Access secret (optional, will prompt or use saved credentials if not provided)
303
- alias: secret
304
- required: false
305
- default: select
308
+ alias: f
309
+ description: Skip confirmation prompt
306
310
 
307
311
  #########################
308
312
  # Manage organizations
309
313
  #########################
310
- - name: orgs
314
+ - name: organizations
315
+ alias: orgs
311
316
  description: Manage organizations
312
317
  operations:
313
318
  # list
@@ -315,9 +320,9 @@ commands:
315
320
  description: List organizations
316
321
  alias: l
317
322
  messages:
318
- onStart: "Listing organizations..."
323
+ onStart: 'Listing organizations...'
319
324
  onSuccess: "Organization '{{name}}' selected"
320
- onFailure: "Failed to select organization"
325
+ onFailure: 'Failed to select organization'
321
326
  onEmpty: "No organizations found. You may need to re-authenticate.\nRun: tigris login"
322
327
  arguments:
323
328
  - name: format
@@ -333,25 +338,25 @@ commands:
333
338
  description: Create organization
334
339
  alias: c
335
340
  messages:
336
- onStart: "Creating organization..."
341
+ onStart: 'Creating organization...'
337
342
  onSuccess: "Organization '{{name}}' created successfully\nOrganization ID: {{id}}"
338
- onFailure: "Failed to create organization"
343
+ onFailure: 'Failed to create organization'
339
344
  hint: "Next steps:\n - Select this organization: tigris orgs select {{name}}"
340
345
  arguments:
341
346
  - name: name
342
- type: noun
347
+ type: positional
343
348
  required: true
344
349
  description: Name of the organization
345
350
  - name: select
346
351
  description: Select the organization to use
347
352
  alias: s
348
353
  messages:
349
- onStart: ""
354
+ onStart: ''
350
355
  onSuccess: "Organization '{{name}}' selected"
351
- onFailure: "Failed to select organization"
356
+ onFailure: 'Failed to select organization'
352
357
  arguments:
353
358
  - name: name
354
- type: noun
359
+ type: positional
355
360
  required: true
356
361
  description: Name of the organization
357
362
 
@@ -367,10 +372,10 @@ commands:
367
372
  description: List buckets
368
373
  alias: l
369
374
  messages:
370
- onStart: "Listing buckets..."
371
- onSuccess: "Found {{count}} bucket(s)"
372
- onFailure: "Failed to list buckets"
373
- onEmpty: "No buckets found"
375
+ onStart: 'Listing buckets...'
376
+ onSuccess: 'Found {{count}} bucket(s)'
377
+ onFailure: 'Failed to list buckets'
378
+ onEmpty: 'No buckets found'
374
379
  arguments:
375
380
  - name: format
376
381
  description: Format
@@ -382,13 +387,13 @@ commands:
382
387
  description: Create bucket
383
388
  alias: [c]
384
389
  messages:
385
- onStart: "Creating bucket..."
390
+ onStart: 'Creating bucket...'
386
391
  onSuccess: "Bucket '{{name}}' created successfully"
387
- onFailure: "Failed to create bucket"
392
+ onFailure: 'Failed to create bucket'
388
393
  arguments:
389
394
  - name: name
390
395
  description: Name of the bucket
391
- type: noun
396
+ type: positional
392
397
  required: false
393
398
  - name: access
394
399
  description: Access level
@@ -420,29 +425,62 @@ commands:
420
425
  description: Get bucket details
421
426
  alias: g
422
427
  messages:
423
- onStart: "Getting bucket details..."
424
- onSuccess: ""
425
- onFailure: "Failed to get bucket details"
428
+ onStart: 'Getting bucket details...'
429
+ onSuccess: ''
430
+ onFailure: 'Failed to get bucket details'
426
431
  arguments:
427
432
  - name: name
428
433
  description: Name of the bucket
429
- type: noun
434
+ type: positional
430
435
  required: true
431
436
  # delete
432
437
  - name: delete
433
438
  description: Delete bucket
434
439
  alias: d
435
440
  messages:
436
- onStart: "Deleting bucket..."
441
+ onStart: 'Deleting bucket...'
437
442
  onSuccess: "Bucket '{{name}}' deleted successfully"
438
443
  onFailure: "Failed to delete bucket '{{name}}'"
439
444
  arguments:
440
445
  - name: name
441
446
  description: Name of the bucket or comma separated list of buckets
442
- type: noun
447
+ type: positional
443
448
  required: true
444
449
  multiple: true
445
-
450
+ # set
451
+ - name: set
452
+ description: Update bucket settings
453
+ alias: s
454
+ messages:
455
+ onStart: 'Updating bucket...'
456
+ onSuccess: 'Bucket {{name}} updated successfully'
457
+ onFailure: 'Failed to update bucket'
458
+ arguments:
459
+ - name: name
460
+ description: Name of the bucket
461
+ type: positional
462
+ required: true
463
+ - name: access
464
+ description: Bucket access level
465
+ options: *access_options
466
+ - name: region
467
+ description: Allowed regions (can specify multiple)
468
+ options: *region_options
469
+ multiple: true
470
+ - name: allow-object-acl
471
+ description: Enable object-level ACL
472
+ type: boolean
473
+ - name: disable-directory-listing
474
+ description: Disable directory listing
475
+ type: boolean
476
+ - name: cache-control
477
+ description: Default cache-control header value
478
+ - name: custom-domain
479
+ description: Custom domain for the bucket
480
+ - name: enable-delete-protection
481
+ description: Enable delete protection
482
+ type: boolean
483
+
446
484
  #########################
447
485
  # Manage forks
448
486
  #########################
@@ -452,27 +490,44 @@ commands:
452
490
  operations:
453
491
  # list
454
492
  - name: list
455
- description: List forks
493
+ description: List forks of a bucket
456
494
  alias: l
495
+ messages:
496
+ onStart: 'Listing forks...'
497
+ onSuccess: 'Found {{count}} fork(s)'
498
+ onFailure: 'Failed to list forks'
499
+ onEmpty: 'No forks found for this bucket'
457
500
  arguments:
458
501
  - name: name
459
- description: Name of the bucket
460
- type: noun
502
+ description: Name of the source bucket
503
+ type: positional
461
504
  required: true
505
+ - name: format
506
+ description: Output format
507
+ alias: f
508
+ options: [json, table, xml]
509
+ default: table
462
510
  # create
463
511
  - name: create
464
- description: Create fork
512
+ description: Create a fork of a bucket
465
513
  alias: c
514
+ messages:
515
+ onStart: 'Creating fork...'
516
+ onSuccess: "Fork '{{forkName}}' created from '{{name}}'"
517
+ onFailure: 'Failed to create fork'
466
518
  arguments:
467
519
  - name: name
468
- description: Name of the bucket
469
- type: noun
520
+ description: Name of the source bucket
521
+ type: positional
470
522
  required: true
471
523
  - name: fork-name
472
- description: Name of the fork
473
- type: noun
524
+ description: Name for the new fork
525
+ type: positional
474
526
  required: true
475
-
527
+ - name: snapshot
528
+ description: Create fork from a specific snapshot
529
+ alias: s
530
+
476
531
  #########################
477
532
  # Manage snapshots
478
533
  #########################
@@ -480,28 +535,42 @@ commands:
480
535
  description: Manage snapshots
481
536
  alias: s
482
537
  operations:
483
- # list
538
+ # list
484
539
  - name: list
485
- description: List snapshots
540
+ description: List snapshots of a bucket
486
541
  alias: l
542
+ messages:
543
+ onStart: 'Listing snapshots...'
544
+ onSuccess: 'Found {{count}} snapshot(s)'
545
+ onFailure: 'Failed to list snapshots'
546
+ onEmpty: 'No snapshots found for this bucket'
487
547
  arguments:
488
548
  - name: name
489
549
  description: Name of the bucket
490
- type: noun
550
+ type: positional
491
551
  required: true
492
- # create
493
- - name: create
494
- description: Create snapshot
495
- alias: c
552
+ - name: format
553
+ description: Output format
554
+ alias: f
555
+ options: [json, table, xml]
556
+ default: table
557
+ # take
558
+ - name: take
559
+ description: Take a snapshot of a bucket
560
+ alias: t
561
+ messages:
562
+ onStart: 'Taking snapshot...'
563
+ onSuccess: "Snapshot '{{snapshotName}}' taken for bucket '{{name}}'"
564
+ onFailure: 'Failed to take snapshot'
496
565
  arguments:
497
566
  - name: name
498
567
  description: Name of the bucket
499
- type: noun
568
+ type: positional
500
569
  required: true
501
570
  - name: snapshot-name
502
- description: Name of the snapshot
503
- type: noun
504
- required: true
571
+ description: Name of the snapshot (optional)
572
+ type: positional
573
+ required: false
505
574
 
506
575
  #########################
507
576
  # Manage objects
@@ -512,52 +581,70 @@ commands:
512
581
  operations:
513
582
  # list
514
583
  - name: list
515
- description: List objects
584
+ description: List objects in a bucket
516
585
  alias: l
586
+ messages:
587
+ onStart: 'Listing objects...'
588
+ onSuccess: 'Found {{count}} object(s)'
589
+ onFailure: 'Failed to list objects'
590
+ onEmpty: 'No objects found'
517
591
  arguments:
518
592
  - name: bucket
519
593
  description: Name of the bucket
520
- alias: b
594
+ type: positional
521
595
  required: true
596
+ - name: prefix
597
+ description: Filter objects by prefix
598
+ alias: p
522
599
  - name: format
523
- description: Format
600
+ description: Output format
524
601
  alias: f
525
602
  options: [json, table, xml]
526
603
  default: table
527
604
  # get
528
605
  - name: get
529
- description: Get object
606
+ description: Get an object
530
607
  alias: g
608
+ messages:
609
+ onStart: 'Getting object...'
610
+ onSuccess: ''
611
+ onFailure: 'Failed to get object'
531
612
  arguments:
532
613
  - name: bucket
533
614
  description: Name of the bucket
534
- type: noun
615
+ type: positional
535
616
  required: true
536
617
  - name: key
537
- description: Name of the object
538
- type: noun
618
+ description: Key of the object
619
+ type: positional
539
620
  required: true
540
- - name: format
541
- description: Format
542
- alias: f
543
- options: [string, file, stream]
544
- default: string
545
- # create
546
- - name: create
547
- description: Create object
548
- alias: c
621
+ - name: output
622
+ description: Output file path (if not specified, prints to stdout)
623
+ alias: o
624
+ - name: mode
625
+ description: Response mode (auto-detected from extension if not specified)
626
+ alias: m
627
+ options: [string, stream]
628
+ # put
629
+ - name: put
630
+ description: Upload an object
631
+ alias: p
632
+ messages:
633
+ onStart: 'Uploading object...'
634
+ onSuccess: "Object '{{key}}' uploaded successfully"
635
+ onFailure: 'Failed to upload object'
549
636
  arguments:
550
637
  - name: bucket
551
638
  description: Name of the bucket
552
- type: noun
639
+ type: positional
553
640
  required: true
554
- - name: name
555
- description: Name of the object
556
- type: noun
641
+ - name: key
642
+ description: Key for the object
643
+ type: positional
557
644
  required: true
558
- - name: body
559
- description: Body of the object
560
- alias: d
645
+ - name: file
646
+ description: Path to the file to upload
647
+ type: positional
561
648
  required: true
562
649
  - name: access
563
650
  description: Access level
@@ -566,62 +653,27 @@ commands:
566
653
  default: private
567
654
  - name: content-type
568
655
  description: Content type
569
- alias: c
570
- - name: content-disposition
571
- description: Content disposition
572
- alias: d
573
- - name: tier
574
- description: Tier
575
656
  alias: t
576
- options: *tier_options
577
- default: STANDARD
657
+ - name: format
658
+ description: Output format
659
+ alias: f
660
+ options: [json, table, xml]
661
+ default: table
578
662
  # delete
579
663
  - name: delete
580
- description: Delete object
664
+ description: Delete an object
581
665
  alias: d
666
+ messages:
667
+ onStart: 'Deleting object...'
668
+ onSuccess: "Object '{{key}}' deleted successfully"
669
+ onFailure: 'Failed to delete object'
582
670
  arguments:
583
671
  - name: bucket
584
672
  description: Name of the bucket
585
- type: noun
673
+ type: positional
586
674
  required: true
587
675
  - name: key
588
- description: Name of the object (comma separated names for multiple objects)
589
- type: noun
590
- required: true
591
- multiple: true
592
- # copy
593
- - name: copy
594
- description: Copy object
595
- alias: c
596
- arguments:
597
- - name: bucket
598
- description: Name of the bucket
599
- type: noun
600
- required: true
601
- - name: name
602
- description: Name of the object (comma separated names for multiple objects)
603
- type: noun
604
- required: true
605
- multiple: true
606
- - name: destination
607
- description: Destination
608
- type: noun
609
- required: true
610
- # move
611
- - name: move
612
- description: Move object
613
- alias: m
614
- arguments:
615
- - name: bucket
616
- description: Name of the bucket
617
- type: noun
618
- required: true
619
- - name: source
620
- description: Name of the object (comma separated names for multiple objects)
621
- type: noun
676
+ description: Key of the object (comma separated for multiple)
677
+ type: positional
622
678
  required: true
623
679
  multiple: true
624
- - name: destination
625
- description: Destination
626
- type: noun
627
- required: true