@contrail/cli 3.6.0-alpha-8-alpha.65a5f6a → 3.6.0-alpha-8-alpha.45c63ad
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.
- package/README.md +1 -50
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,7 +6,6 @@ The Contrail CLI is the best way to manage your instance data through a programm
|
|
|
6
6
|
* [Contrail CLI](#contrail-cli)
|
|
7
7
|
* [Usage](#usage)
|
|
8
8
|
* [Autocomplete](#autocomplete)
|
|
9
|
-
* [Entities](#entities)
|
|
10
9
|
* [Commands](#commands)
|
|
11
10
|
<!-- tocstop -->
|
|
12
11
|
|
|
@@ -18,7 +17,7 @@ $ npm install -g @contrail/cli
|
|
|
18
17
|
$ contrail COMMAND
|
|
19
18
|
running command...
|
|
20
19
|
$ contrail (--version)
|
|
21
|
-
@contrail/cli/3.6.0-alpha-8-alpha.
|
|
20
|
+
@contrail/cli/3.6.0-alpha-8-alpha.45c63ad linux-x64 node-v24.22.1
|
|
22
21
|
$ contrail --help [COMMAND]
|
|
23
22
|
USAGE
|
|
24
23
|
$ contrail COMMAND
|
|
@@ -30,54 +29,6 @@ USAGE
|
|
|
30
29
|
|
|
31
30
|
To get instructions on how to set up autocomplete for your shell, run `contrail autocomplete`.
|
|
32
31
|
|
|
33
|
-
# Entities
|
|
34
|
-
|
|
35
|
-
The `contrail entities` commands create, query, update, and delete platform entities. They are built to be called from scripts. Per-command flags and examples are under [Commands](#commands) below.
|
|
36
|
-
|
|
37
|
-
## stdout is JSON, everything else is stderr
|
|
38
|
-
|
|
39
|
-
Every `entities` command writes JSON and nothing else to stdout. Progress logs, warnings, and prompts go to stderr, so output pipes without filtering:
|
|
40
|
-
|
|
41
|
-
```sh-session
|
|
42
|
-
$ contrail entities get item -e=false -t 3 -p id,name | jq -r '.[].name'
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Redirect the two streams separately to keep the logs:
|
|
46
|
-
|
|
47
|
-
```sh-session
|
|
48
|
-
$ contrail entities get item -e=false > items.json 2> run.log
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
`-o/--outputFile` writes the JSON to a file and leaves stdout empty.
|
|
52
|
-
|
|
53
|
-
## Scripts need `-e=false`
|
|
54
|
-
|
|
55
|
-
`--alwaysConfirmEnv` defaults to true, so the command prints the current environment and waits for you to confirm it. With no terminal attached there is nothing to answer the prompt, and the command exits 130 having written no output. Pass `-e=false` from any script, cron job, or CI step.
|
|
56
|
-
|
|
57
|
-
## Property values go after `--`
|
|
58
|
-
|
|
59
|
-
Values are `slug=value` pairs. Everything before `--` is flags and ids:
|
|
60
|
-
|
|
61
|
-
```sh-session
|
|
62
|
-
$ contrail entities create color -e=false -- name="Electric Blue" hex=0000ff
|
|
63
|
-
$ contrail entities update color abc123 -e=false -- name=obsidian
|
|
64
|
-
$ contrail entities get color -e=false -- createdOn=2025-09-15..2025-09-16
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
Quote any value containing a space. Repeat a key to pass several values to a multi-select property (`-- colors=option colors=family`); a comma inside one value is kept as part of that value.
|
|
68
|
-
|
|
69
|
-
On `update`, `slug=` unsets a property and `slug='""'` sets it to an empty string.
|
|
70
|
-
|
|
71
|
-
## Exit codes
|
|
72
|
-
|
|
73
|
-
| Code | Meaning |
|
|
74
|
-
| --- | --- |
|
|
75
|
-
| 0 | Every row succeeded |
|
|
76
|
-
| 1 | At least one row failed; the JSON summary names which |
|
|
77
|
-
| 130 | The environment prompt could not be answered (see `-e=false`) |
|
|
78
|
-
|
|
79
|
-
Bulk commands run every row to completion. One failure does not stop the rest, and the summary reports each row's outcome.
|
|
80
|
-
|
|
81
32
|
# Commands
|
|
82
33
|
|
|
83
34
|
<!-- commands -->
|
package/oclif.manifest.json
CHANGED