Skip to content

Commit a88fd3a

Browse files
committed
docs(assets): updates readme and command descriptions
1 parent bd220de commit a88fd3a

File tree

3 files changed

+74
-0
lines changed

3 files changed

+74
-0
lines changed

packages/plugin-assets/README.md

+70
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
This plugin adds functionality to the [Twilio CLI](https://github.com/twilio/twilio-cli) to upload and manage assets to a Twilio Assets service. It's a part of the [Serverless Toolkit](https://github.com/twilio-labs/serverless-toolkit) and uses the [Serverless API](https://github.com/twilio-labs/serverless-toolkit/tree/main/packages/serverless-api).
88

9+
The plugin creates a new Runtime Service which it then uses as a bucket to which it upload assets. You can upload new files or list your available assets.
10+
911
<!-- toc -->
1012

1113
<!-- tocstop -->
@@ -40,7 +42,75 @@ USAGE
4042
## Commands
4143

4244
<!-- commands -->
45+
* [`twilio assets:init`](#twilio-assetsinit)
46+
* [`twilio assets:list`](#twilio-assetslist)
47+
* [`twilio assets:upload FILE`](#twilio-assetsupload-file)
48+
49+
## `twilio assets:init`
50+
51+
Create a new assets service to use as a bucket
52+
53+
```
54+
Create a new assets service to use as a bucket
55+
56+
USAGE
57+
$ twilio assets:init
58+
59+
OPTIONS
60+
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
61+
-o=(columns|json|tsv) [default: columns] Format of command output.
62+
-p, --profile=profile Shorthand identifier for your profile.
63+
64+
--properties=properties [default: service_sid, sid, domain_name] The asset service environment properties you
65+
would like to display (JSON output always shows all properties).
66+
```
67+
68+
_See code: [src/commands/assets/init.js](https://github.com/twilio-labs/serverless-toolkit/blob/v0.0.1/src/commands/assets/init.js)_
69+
70+
## `twilio assets:list`
71+
72+
List all the assets in the service
73+
74+
```
75+
List all the assets in the service
76+
77+
USAGE
78+
$ twilio assets:list
79+
80+
OPTIONS
81+
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
82+
-o=(columns|json|tsv) [default: columns] Format of command output.
83+
-p, --profile=profile Shorthand identifier for your profile.
84+
85+
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
86+
(JSON output always shows all properties).
87+
```
88+
89+
_See code: [src/commands/assets/list.js](https://github.com/twilio-labs/serverless-toolkit/blob/v0.0.1/src/commands/assets/list.js)_
90+
91+
## `twilio assets:upload FILE`
92+
93+
Upload a new asset to the Assets service
94+
95+
```
96+
Upload a new asset to the Assets service
97+
98+
USAGE
99+
$ twilio assets:upload FILE
100+
101+
ARGUMENTS
102+
FILE The path to the file you want to upload
103+
104+
OPTIONS
105+
-l=(debug|info|warn|error|none) [default: info] Level of logging messages.
106+
-o=(columns|json|tsv) [default: columns] Format of command output.
107+
-p, --profile=profile Shorthand identifier for your profile.
108+
109+
--properties=properties [default: sid, path, url, visibility] The asset properties you would like to display
110+
(JSON output always shows all properties).
111+
```
43112

113+
_See code: [src/commands/assets/upload.js](https://github.com/twilio-labs/serverless-toolkit/blob/v0.0.1/src/commands/assets/upload.js)_
44114
<!-- commandsstop -->
45115

46116
## Contributing

packages/plugin-assets/src/commands/assets/list.js

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class ListCommand extends TwilioClientCommand {
2323
}
2424
}
2525

26+
ListCommand.description = 'List all the assets in the service';
27+
2628
ListCommand.flags = {
2729
properties: flags.string({
2830
default: 'sid, path, url, visibility',

packages/plugin-assets/src/commands/assets/upload.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class UploadCommand extends TwilioClientCommand {
2525
}
2626
}
2727

28+
UploadCommand.description = 'Upload a new asset to the Assets service';
29+
2830
UploadCommand.args = [
2931
{
3032
name: 'file',

0 commit comments

Comments
 (0)