Skip to content

Fix error in CLI machine API key creation doc #4392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 10, 2025
20 changes: 10 additions & 10 deletions docs/dev/tools/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,14 +669,14 @@ This includes:

```sh {class="command-line" data-prompt="$"}
viam machines list
viam machines status --organization=<org id> --location=<location id> --machine=<machine id>
viam machines logs --organization=<org id> --location=<location id> --machine=<machine id> [...named args]
viam machines api-key create --machine=<machine id> [...named args]
viam machines part list --machine=<machine-id>
viam machines status --machine=<machine id>
viam machines logs --machine=<machine id> [...named args]
viam machines api-key create --machine-id=<machine id> --org-id=<org id> --name=<key name>
viam machines part list --machine=<machine id>
viam machines part logs --machine=<machine id> --part=<part id> [...named args]
viam machines part status --organization=<org id> --location=<location id> --machine=<machine id>
viam machines part run --organization=<org id> --location=<location id> --machine=<machine id> [--stream] --data <meth>
viam machines part shell --organization=<org id> --location=<location id> --machine=<machine id> --part=<part id>
viam machines part status --machine=<machine id>
viam machines part run --machine=<machine id> [--stream] --data <method>
viam machines part shell --machine=<machine id> --part=<part id>
viam machines part restart --machine=<machine id> --part=<part id>
viam machines part cp --part=<part id> <file name> machine:/path/to/file
```
Expand All @@ -691,7 +691,7 @@ viam machines list
viam machines status --machine=123

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

# stream logs from a machine
viam machines logs --machine=123
Expand Down Expand Up @@ -773,9 +773,9 @@ viam machine part cp --part=123 -r -p machine:my_dir machine:my_file ~/some/exis
| Argument | Description | Applicable commands | Required? |
| -------- | ----------- | ------------------- | --------- |
| `--part` | Part ID for which the command is being issued. | `part` | **Required** |
| `--machine` | Machine ID for which the command is being issued. If machine name is used instead of ID, `--org` and `--location` are required. | `status`, `logs` | **Required** |
| `--machine` | Machine ID or name for which the command is being issued. If machine name is used instead of ID, `--organization` and `--location` are required. | `status`, `logs` | **Required** |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do call it --org in the line below, but i realize we don't in the examples. Could dig back through the old discussion about this one too but don't remember off hand...maybe should change line 778 to match this though?

| `--location` | ID of the location that the machine belongs to or to list machines in. | `list`, `status`, `logs`, `part` | Optional |
| `--org` | ID of the organization that the machine belongs to or to list machines in. | `list`, `status`, `logs`, `part` | Optional |
| `--organization` | ID of the organization that the machine belongs to or to list machines in. | `list`, `status`, `logs`, `part` | Optional |
| `--errors` | Boolean, return only errors (default: false). | `logs` | Optional |
| `--levels` | Filter logs by levels (debug, info, warn, error). Accepts multiple inputs in comma-separated list. | `logs` | Optional |
| `--tail` | Tail (stream) logs, boolean(default false). | `part logs` | Optional |
Expand Down
Loading