@smartkomm/plexus-cli 0.1.82 → 0.1.83
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c5ab79e0044b2eb38a8fdac4f306654e4edea3bc97bd1983a9deb989ab01f142
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# plexus-cli command reference
|
|
2
2
|
|
|
3
3
|
Generated from the commands the CLI registers — do not edit; `plexus-cli <command> --help` prints the same.
|
|
4
|
-
|
|
4
|
+
293 commands. Every network command also takes `--env <local|staging|prod>`, `--tenant <slug>`,
|
|
5
5
|
`--json` (raw JSON instead of a table) and `--allow-prod` (required for a writing run against production).
|
|
6
6
|
|
|
7
7
|
- [Admission (offline)](#admission-offline) (1)
|
|
@@ -31,7 +31,7 @@ Generated from the commands the CLI registers — do not edit; `plexus-cli <comm
|
|
|
31
31
|
- [Organisation (school token)](#organisation-school-token) (8)
|
|
32
32
|
- [Persons (platform operator)](#persons-platform-operator) (1)
|
|
33
33
|
- [Persons (school token)](#persons-school-token) (2)
|
|
34
|
-
- [Platform (platform operator)](#platform-platform-operator) (
|
|
34
|
+
- [Platform (platform operator)](#platform-platform-operator) (11)
|
|
35
35
|
- [Setup (platform operator)](#setup-platform-operator) (5)
|
|
36
36
|
- [Signing (platform operator)](#signing-platform-operator) (5)
|
|
37
37
|
- [Signing (school token)](#signing-school-token) (8)
|
|
@@ -3119,7 +3119,7 @@ Read-only: per real tenant (not test, not _platform) the applications (all, test
|
|
|
3119
3119
|
|
|
3120
3120
|
### `platform storage orphans apply`
|
|
3121
3121
|
|
|
3122
|
-
Delete the stored objects that are BOTH in --list and orphaned in a fresh run (each asked once more before its delete); both differences are reported, never deleted. Dry run unless --confirm.
|
|
3122
|
+
Delete the stored objects that are BOTH in --list and orphaned in a fresh run (each asked once more before its delete); both differences are reported, never deleted. Runs server-side as a run (its id is printed at once; every deleted id is on record). Dry run unless --confirm.
|
|
3123
3123
|
|
|
3124
3124
|
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3125
3125
|
- **Effect:** plan by default — writes only with `--confirm` (and `--env`; on production also `--allow-prod`)
|
|
@@ -3131,7 +3131,7 @@ Delete the stored objects that are BOTH in --list and orphaned in a fresh run (e
|
|
|
3131
3131
|
|
|
3132
3132
|
### `platform storage orphans plan`
|
|
3133
3133
|
|
|
3134
|
-
Read-only: every stored object no row names, at least 7 days old and not pinned by a setup export — count, volume, type, month, copy or single. --out writes the list `apply --list` takes.
|
|
3134
|
+
Read-only: every stored object no row names, at least 7 days old and not pinned by a setup export — count, volume, type, month, copy or single. Runs server-side as a run (its id is printed at once); --out writes the list `apply --list` takes.
|
|
3135
3135
|
|
|
3136
3136
|
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3137
3137
|
- **Effect:** read — changes nothing on the deployment
|
|
@@ -3141,6 +3141,19 @@ Read-only: every stored object no row names, at least 7 days old and not pinned
|
|
|
3141
3141
|
| `--out <value>` | Write the full plan (with every orphan's id) as JSON (refused when it exists, unless --force) |
|
|
3142
3142
|
| `--force` | Overwrite an existing --out file. |
|
|
3143
3143
|
|
|
3144
|
+
### `platform storage orphans status [runId]`
|
|
3145
|
+
|
|
3146
|
+
Read-only: attach to a plan or apply run by its id — its state, every object it deleted so far, and (once done) its result; --wait asks until it is done or failed. Without an id: the latest runs. Exits 1 for a failed run.
|
|
3147
|
+
|
|
3148
|
+
- **Right:** platform operator — needs a `_platform.*` right; a school's token is refused
|
|
3149
|
+
- **Effect:** read — changes nothing on the deployment
|
|
3150
|
+
|
|
3151
|
+
| Option | Description |
|
|
3152
|
+
|---|---|
|
|
3153
|
+
| `--wait` | Ask every few seconds until the run is done or failed |
|
|
3154
|
+
| `--out <value>` | Write the run's result (a done run) as JSON (refused when it exists, unless --force) |
|
|
3155
|
+
| `--force` | Overwrite an existing --out file. |
|
|
3156
|
+
|
|
3144
3157
|
### `platform tenant rename`
|
|
3145
3158
|
|
|
3146
3159
|
Change a tenant's slug and name in place (plan unless --confirm)
|
|
@@ -35,6 +35,27 @@ plexus-cli --env <env> platform storage orphans apply --list <scratch>/orphans.j
|
|
|
35
35
|
plexus-cli --env <env> platform storage orphans apply --list <scratch>/orphans.json --confirm --allow-prod
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
Every plan and apply is a **run** on the server: the command prints its run id
|
|
39
|
+
at once (`plan run <id> started`), then asks the run's state every few seconds
|
|
40
|
+
and prints the result when the run is done. No HTTP call waits on the sweep, so
|
|
41
|
+
a sweep of any length never hits a connection timeout. If the command is cut off
|
|
42
|
+
(lost terminal, its own 20-minute wait), the run goes on — attach again:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
plexus-cli --env <env> platform storage orphans status <runId> --wait
|
|
46
|
+
plexus-cli --env <env> platform storage orphans status <runId> --out <scratch>/orphans.json # a done plan's file
|
|
47
|
+
plexus-cli --env <env> platform storage orphans status <runId> --json # every id an apply deleted
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`status` without an id lists the latest runs — the way back to a run whose
|
|
51
|
+
start answer was lost. One run at a time: a start is refused while another
|
|
52
|
+
run is open (the refusal names it).
|
|
53
|
+
|
|
54
|
+
An apply writes the ids it deleted batch by batch, in the delete's own
|
|
55
|
+
transaction: `status` lists them even when the run failed half-way. A run that
|
|
56
|
+
fails, never starts (10 min) or is still running 12 min after its start ends
|
|
57
|
+
`failed` with its error, which also goes to GlitchTip; `status` then exits 1.
|
|
58
|
+
|
|
38
59
|
The apply deletes only objects that are **both** in the list **and** orphaned in
|
|
39
60
|
a fresh run, and asks each object once more right before its delete. Ids only in
|
|
40
61
|
the list (held again, gone) and ids only in the run (orphaned since the plan)
|
|
@@ -52,7 +73,10 @@ plexus-cli --env <env> platform storage orphans plan # orphaned: 0 (or only w
|
|
|
52
73
|
- Re-running the apply with the same list deletes nothing more: the deleted ids
|
|
53
74
|
are now "only in the list".
|
|
54
75
|
- The plan reads every row that can carry a file reference in free text; on a
|
|
55
|
-
large deployment it takes minutes
|
|
76
|
+
large deployment it takes minutes (prod, Nov 2026: ≈ 275 s) — the command
|
|
77
|
+
waits on the run, not on one HTTP call.
|
|
78
|
+
- A run's result file and record stay; the sweep counts the file as held by its
|
|
79
|
+
run, never as an orphan.
|
|
56
80
|
- The nightly report never deletes.
|
|
57
81
|
|
|
58
82
|
## Related
|