Skip to content

Commit 093225d

Browse files
committed
Unify flags for machine part
1 parent dfee792 commit 093225d

File tree

1 file changed

+30
-30
lines changed

1 file changed

+30
-30
lines changed

docs/dev/tools/cli.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -280,29 +280,29 @@ The `dataset` command allows you to manage machine data in datasets.
280280
With it, you can add or remove images from a dataset, export data from a dataset, or filter a dataset by tags.
281281

282282
```sh {class="command-line" data-prompt="$"}
283-
viam dataset create --org-id=<org-id> --name=<name>
283+
viam dataset create --org=<org-id> --name=<name>
284284
viam dataset rename --dataset-id=<dataset-id> --name=<name>
285-
viam dataset list --org-id=<org-id>
285+
viam dataset list --org=<org-id>
286286
viam dataset list --dataset-ids=<dataset-ids>
287287
viam dataset delete --dataset-id=<dataset-id>
288288
viam dataset export --destination=<output-directory> --dataset-id=<dataset-id>
289289
viam dataset data add filter --dataset-id=<dataset-id> [...named args]
290290
viam dataset data remove filter --dataset-id=<dataset-id> [...named args]
291-
viam dataset data add ids --dataset-id=<dataset-id> --org-id=<org-id> --location-id=<location-id> --file-ids=<file-ids>
292-
viam dataset data remove ids --dataset-id=<dataset-id> --org-id=<org-id> --location-id=<location-id> --file-ids=<file-ids>
291+
viam dataset data add ids --dataset-id=<dataset-id> --org=<org-id> --location-id=<location-id> --file-ids=<file-ids>
292+
viam dataset data remove ids --dataset-id=<dataset-id> --org=<org-id> --location-id=<location-id> --file-ids=<file-ids>
293293
```
294294

295295
Examples:
296296

297297
```sh {class="command-line" data-prompt="$"}
298298
# create a new dataset
299-
viam dataset create --org-id=123 --name=MyDataset
299+
viam dataset create --org=123 --name=MyDataset
300300

301301
# rename dataset 123 from MyDataset to MyCoolDataset
302302
viam dataset rename --dataset-id=123 --name=MyCoolDataset
303303

304304
# list dataset information from the specified org
305-
viam dataset list --org-id=123
305+
viam dataset list --org=123
306306

307307
# list dataset information from the specified dataset ids
308308
viam dataset list --dataset-ids=123,456
@@ -354,8 +354,8 @@ viam dataset data remove ids --dataset-id= abc --org-id=123 --location-id=456 --
354354
<!-- prettier-ignore -->
355355
| Argument | Description | Applicable commands | Required? |
356356
| -------- | ----------- | ------------------- | --------- |
357-
| `--dataset-id` | Dataset to perform an operation on. To retrieve the ID, navigate to your datasets page in the [Viam app](https://app.viam.com), click **** in the left-hand menu, and click **Copy dataset ID** | `rename`, `delete`, `data add`, `data remove`, `export` | **Required** |
358-
| `--dataset-ids` | Dataset IDs of datasets to be listed. To retrieve these IDs, navigate to your datasets page in the [Viam app](https://app.viam.com), click **** in the left-hand menu, and click **Copy dataset ID** | `list` | Optional |
357+
| `--dataset-id` | Dataset to perform an operation on. To retrieve the ID, navigate to your dataset's page in the [Viam app](https://app.viam.com), click **** in the left-hand menu, and click **Copy dataset ID** | `rename`, `delete`, `data add`, `data remove`, `export` | **Required** |
358+
| `--dataset-ids` | Dataset IDs of datasets to be listed. To retrieve these IDs, navigate to your dataset's page in the [Viam app](https://app.viam.com), click **** in the left-hand menu, and click **Copy dataset ID** | `list` | Optional |
359359
| `--destination` | Output directory for downloaded data | `export` | **Required** |
360360
| `--end` | ISO-8601 timestamp indicating the end of the interval | `data add`, `data remove` | Optional |
361361
| `--file-ids` | The file-ids of the files to perform an operation on | `data add`, `data remove`, `export` | **Required** |
@@ -437,10 +437,10 @@ With it, you can export data in a variety of formats, delete specified data, add
437437
viam data export binary --destination=<output path> [...named args]
438438
viam data export tabular --destination=<destination> --part-id=<part-id> --resource-name=<resource-name> --resource-subtype=<resource-subtype> --method=<method> [other options]
439439
viam data delete --org-ids=<org-ids> --start=<timestamp> --end=<timestamp> [...named args]
440-
viam data database configure --org-id=<org-id> --password=<db-user-password>
441-
viam data database hostname --org-id=<org-id>
442-
viam data tag ids add --tags=<tags> --org-id=<org_id> --location-id=<location_id> --file-ids=<file_ids>
443-
viam data tag ids remove --tags=<tags> --org-id=<org_id> --location-id=<location_id> --file-ids=<file_ids>
440+
viam data database configure --org=<org-id> --password=<db-user-password>
441+
viam data database hostname --org=<org-id>
442+
viam data tag ids add --tags=<tags> --org=<org_id> --location-id=<location_id> --file-ids=<file_ids>
443+
viam data tag ids remove --tags=<tags> --org=<org_id> --location-id=<location_id> --file-ids=<file_ids>
444444
viam data tag filter add --tags=<tags> [...named args from filter]
445445
viam data tag filter remove --tags=<tags> [...named args from filter]
446446
```
@@ -459,16 +459,16 @@ viam data delete binary --org-ids=123 --mime-types=image/jpeg --start 2024-08-20
459459

460460
# configure a database user for the Viam organization's MongoDB Atlas Data
461461
# Federation instance, in order to query tabular data
462-
viam data database configure --org-id=abc --password=my_password123
462+
viam data database configure --org=<org-id> --password=my_password123
463463

464464
# get the hostname to access a MongoDB Atlas Data Federation instance
465-
viam data database hostname --org-id=abc
465+
viam data database hostname --org=<org-id>
466466

467467
# add tags to all data that matches the given ids
468-
viam data tag ids add --tags=new_tag_1,new_tag_2,new_tag_3 --org-id=123 --location-id=123 --file-ids=123,456
468+
viam data tag ids add --tags=new_tag_1,new_tag_2,new_tag_3 --org=123 --location-id=123 --file-ids=123,456
469469

470470
# remove tags from all data that matches the given ids
471-
viam data tag ids remove --tags=new_tag_1,new_tag_2,new_tag_3 --org-id=123 --location-id=123 --file-ids=123,456
471+
viam data tag ids remove --tags=new_tag_1,new_tag_2,new_tag_3 --org=123 --location-id=123 --file-ids=123,456
472472

473473
# add tags to all data that matches a given filter
474474
viam data tag filter add --tags=new_tag_1,new_tag_2 --location-ids=012 --machine-name=cool-machine --org-ids=84842 --mime-types=image/jpeg,image/png
@@ -1229,15 +1229,15 @@ This includes:
12291229

12301230
```sh {class="command-line" data-prompt="$"}
12311231
viam machines list
1232-
viam machines status --organization=<org name> --location=<location name> --machine=<machine id>
1233-
viam machines logs --organization=<org name> --location=<location name> --machine=<machine id> [...named args]
1234-
viam machines api-key create --machine-id=<machine-id> [...named args]
1232+
viam machines status --org=<org name> --location=<location name> --machine=<machine id>
1233+
viam machines logs --org=<org name> --location=<location name> --machine=<machine id> [...named args]
1234+
viam machines api-key create --machine=<machine-id> [...named args]
12351235
viam machines part logs --machine=<machine> --part=<part> [...named args]
1236-
viam machines part status --organization=<org name> --location=<location name> --machine=<machine id>
1237-
viam machines part run --organization=<org name> --location=<location name> --machine=<machine id> [--stream] --data <meth>
1238-
viam machines part shell --organization=<org name> --location=<location name> --machine=<machine id> --part=<part id>
1236+
viam machines part status --org=<org name> --location=<location name> --machine=<machine id>
1237+
viam machines part run --org=<org name> --location=<location name> --machine=<machine id> [--stream] --data <meth>
1238+
viam machines part shell --org=<org name> --location=<location name> --machine=<machine id> --part=<part id>
12391239
viam machines part restart --machine=<machine id> --part=<part id>
1240-
viam machines part cp --organization=<org name> --location=<location name> --machine=<machine id> --part=<part name> <file name> machine:/path/to/file
1240+
viam machines part cp --org=<org name> --location=<location name> --machine=<machine id> --part=<part name> <file name> machine:/path/to/file
12411241
```
12421242

12431243
Examples:
@@ -1250,7 +1250,7 @@ viam machines list
12501250
viam machines status --machine=123
12511251

12521252
# create an api key for a machine
1253-
viam machines api-key create --machine-id=123 --name=MyKey
1253+
viam machines api-key create --machine=123 --name=MyKey
12541254

12551255
# stream logs from a machine
12561256
viam machines logs --machine=123
@@ -1323,9 +1323,9 @@ viam machine part cp --part=123 -r -p machine:my_dir machine:my_file ~/some/exis
13231323
<!-- prettier-ignore -->
13241324
| Argument | Description | Applicable commands | Required? |
13251325
| -------- | ----------- | ------------------- | --------- |
1326-
| `--organization` | Organization name or ID that the machine belongs to | `list`, `status`, `logs`, `part` | Optional |
1326+
| `--org` | Organization name or ID that the machine belongs to | `list`, `status`, `logs`, `part` | Optional |
13271327
| `--location` | Location name or ID that the machine belongs to or to list machines in | `list`, `status`, `logs`, `part` | Optional |
1328-
| `--machine` | Machine name or ID for which the command is being issued. If machine name is used instead of ID, `--organization` and `--location` are required. | `status`, `logs`, `part` | Optional |
1328+
| `--machine` | Machine name or ID for which the command is being issued. If machine name is used instead of ID, `--org` and `--location` are required. | `status`, `logs`, `part` | Optional |
13291329
| `--errors` | Boolean, return only errors (default: false) | `logs` | Optional |
13301330
| `--levels` | Filter logs by levels (debug, info, warn, error). Accepts multiple inputs in comma-separated list. | `logs` | Optional |
13311331
| `--part` | Part name or ID for which the command is being issued | `logs`, `part` | Optional |
@@ -1375,18 +1375,18 @@ The `--stream` argument, when included in the CLI command prior to the `--data`
13751375
Manage training scripts for [custom ML training](/data-ai/ai/train/).
13761376

13771377
```sh {class="command-line" data-prompt="$"}
1378-
viam training-script upload --framework=<framework> --org-id=<org-id> --path=<path-to-script> --script-name=<script-name> --type=<type>
1379-
viam training-script update --org-id=<org-id> --script-name=<script-name> --visibility=<visibility>
1378+
viam training-script upload --framework=<framework> --org=<org-id> --path=<path-to-script> --script-name=<script-name> --type=<type>
1379+
viam training-script update --org=<org-id> --script-name=<script-name> --visibility=<visibility>
13801380
```
13811381

13821382
Examples:
13831383

13841384
```sh {class="command-line" data-prompt="$"}
13851385
# upload a single label classification script in the tflite framework to organization 123
1386-
viam training-script upload --framework=tflite --org-id=123 --path=. --script-name=MyCustomTrainingScript --type=single_label_classification
1386+
viam training-script upload --framework=tflite --org=123 --path=. --script-name=MyCustomTrainingScript --type=single_label_classification
13871387

13881388
# update MyCustomTrainingScript with public visibility
1389-
viam training-script update --org-id=123 --script-name=MyCustomTrainingScript --visibility=public --description="A single label classification training script"
1389+
viam training-script update --org=123 --script-name=MyCustomTrainingScript --visibility=public --description="A single label classification training script"
13901390
```
13911391

13921392
#### Command options

0 commit comments

Comments
 (0)