@smartkomm/plexus-cli 0.1.31 → 0.1.33

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.
Files changed (30) hide show
  1. package/README.md +50 -24
  2. package/dist/cli.mjs +1320 -997
  3. package/dist/skill/.managed-by-plexus-cli +1 -1
  4. package/dist/skill/SKILL.md +24 -15
  5. package/dist/skill/references/audit/answer-access-request.md +2 -2
  6. package/dist/skill/references/commands.md +1051 -737
  7. package/dist/skill/references/config/init-tenant.md +4 -4
  8. package/dist/skill/references/config/platform-setup-export.md +2 -2
  9. package/dist/skill/references/notifications/debug-mail-delivery.md +8 -8
  10. package/dist/skill/references/notifications/reword-a-letter.md +2 -2
  11. package/dist/skill/references/notifications/trace-a-login.md +2 -2
  12. package/dist/skill/references/offer/assignment-rule.md +2 -2
  13. package/dist/skill/references/offer/task-result-files.md +1 -1
  14. package/dist/skill/references/persons/purge-deleted-person.md +2 -2
  15. package/dist/skill/references/resolver/register-input-keys.md +7 -7
  16. package/dist/skill/references/retention/erase-due-parties.md +3 -3
  17. package/dist/skill/references/signing/connect-a-school.md +3 -3
  18. package/dist/skill/references/signing/rotate-the-key.md +3 -3
  19. package/dist/skill/references/users/add-platform-admin.md +8 -8
  20. package/dist/skill/references/users/add-platform-user.md +2 -2
  21. package/dist/skill/references/users/add-tenant-admin.md +6 -6
  22. package/dist/skill/references/users/change-login-email.md +6 -6
  23. package/dist/skill/references/users/cli-access-for-tenant-admin.md +2 -2
  24. package/dist/skill/references/users/delete-permission-group.md +1 -1
  25. package/dist/skill/references/users/grant-cross-tenant-access.md +6 -6
  26. package/dist/skill/references/users/grant-feedback-assignable.md +4 -4
  27. package/dist/skill/references/users/set-password.md +10 -10
  28. package/dist/skill/references/users/use-test-account.md +2 -2
  29. package/dist/skill/references/worker-ops/debug-worker-jobs.md +7 -7
  30. package/package.json +1 -1
@@ -19,7 +19,7 @@ scaffold.
19
19
  ([CLI access for a tenant admin](../users/cli-access-for-tenant-admin.md)).
20
20
  - **Tooling:** an installed, current `plexus-cli` (`plexus-cli --help`).
21
21
  - **Prod:** every writing run against prod needs `--allow-prod` (`config apply`,
22
- `users provision`); without it the CLI refuses.
22
+ `platform users provision`); without it the CLI refuses.
23
23
 
24
24
  ## Decide before you apply
25
25
 
@@ -60,7 +60,7 @@ plexus-cli --env <env> config apply --tenant <slug> \
60
60
  # 5. Provision the generic admin login (separate auth plane — see related playbook).
61
61
  # Convention: admin@<short>.plexus.swop.schule, name "<Short> Administration",
62
62
  # so a platform operator always has one login per school that belongs to no person.
63
- plexus-cli --env <env> --tenant <slug> users provision admin@<short>.plexus.swop.schule \
63
+ plexus-cli --env <env> --tenant <slug> platform users provision admin@<short>.plexus.swop.schule \
64
64
  --name "<Short> Administration" --group tenant_admin --out creds.csv --quiet
65
65
  ```
66
66
 
@@ -72,7 +72,7 @@ Staff of the school get their own accounts the same way (their address, their na
72
72
  the generic admin is not shared with them.
73
73
 
74
74
  **Created for you, not by you:** the apply also provisions the tenant's test applicant
75
- `test@example.com` („Test Bewerber"), which then shows up in `users list` with the new
75
+ `test@example.com` („Test Bewerber"), which then shows up in `platform users list` with the new
76
76
  slug. That is intended — see [Use a tenant's test account](../users/use-test-account.md).
77
77
 
78
78
  The scaffold emits the smallest config `apply` accepts: the tenant block (all
@@ -112,7 +112,7 @@ offers on the pedagogy unit: `offer init --unit <unit key> --title … --title-e
112
112
  by design (`tenants` is excluded from every wipe target). The CLI prints a note when
113
113
  you wipe a non-`all` target so this is never a surprise.
114
114
  - Staff accounts are a **separate plane** (Better Auth) — the config never creates
115
- logins; provision them with `users provision` (step 5).
115
+ logins; provision them with `platform users provision` (step 5).
116
116
 
117
117
  ## Related
118
118
  - [Onboard / establish a tenant](./onboard-tenant.md) — establish from an existing
@@ -29,7 +29,7 @@ plexus-cli setup apply --env <env> --platform --dir ~/setup-exports/platform-<da
29
29
 
30
30
  ```bash
31
31
  plexus-cli setup plan --env <env> --platform --dir <dir> # no create, no update left
32
- plexus-cli generator input-key list --env <env> # the restored registry
32
+ plexus-cli platform generator input-key list --env <env> # the restored registry
33
33
  ```
34
34
 
35
35
  ## Idempotency / gotchas
@@ -40,7 +40,7 @@ plexus-cli generator input-key list --env <env> # the restored regist
40
40
  - A deprecation travels one way: an entry deprecated in the export is deprecated on the target;
41
41
  an entry the target already deprecated stays deprecated, so an older export restores cleanly.
42
42
  - `--prune` is refused for the registry: sealed revisions name its keys. Deprecate an entry
43
- instead (`generator input-key deprecate`).
43
+ instead (`platform generator input-key deprecate`).
44
44
  - A tenant's `setup.json` lists the platform keys it names (`platformRefs`). `setup plan` of a
45
45
  tenant shows a key the target lacks as "missing platform key", and `setup apply` refuses until
46
46
  the platform export is applied — restore the platform first, then the tenants.
@@ -6,8 +6,8 @@ console, or a `backend:convex` GlitchTip issue tagged `area=notifications`.
6
6
  ## 1. Is the sweeper alive, and is anything dead?
7
7
 
8
8
  ```bash
9
- plexus-cli --env staging notifications sweeper-status
10
- plexus-cli --env staging notifications list --status dead
9
+ plexus-cli --env staging platform notifications sweeper-status
10
+ plexus-cli --env staging platform notifications list --status dead
11
11
  ```
12
12
 
13
13
  `ranAt` older than a few minutes ⇒ the cron is not firing (deploy broke?).
@@ -16,11 +16,11 @@ plexus-cli --env staging notifications list --status dead
16
16
  ## 2. Find the delivery for a person
17
17
 
18
18
  ```bash
19
- plexus-cli --env staging notifications list --to parent@example.org --since 2d
20
- plexus-cli --env staging notifications list --template account.loginLink --since 24h
19
+ plexus-cli --env staging platform notifications list --to parent@example.org --since 2d
20
+ plexus-cli --env staging platform notifications list --template account.loginLink --since 24h
21
21
  ```
22
22
 
23
- For a sign-in problem start with `users login-trail` instead — see
23
+ For a sign-in problem start with `platform users login-trail` instead — see
24
24
  [Trace why someone could not sign in](./trace-a-login.md).
25
25
 
26
26
  Statuses: `queued` (waiting / backoff), `sending` (in flight), `sent` (relay
@@ -31,7 +31,7 @@ address, in `redirect` only `.invalid`), `dead` (gave up).
31
31
  ## 3. Read the evidence
32
32
 
33
33
  ```bash
34
- plexus-cli --env staging notifications show <deliveryId>
34
+ plexus-cli --env staging platform notifications show <deliveryId>
35
35
  ```
36
36
 
37
37
  | `errorCode` | Means | Do |
@@ -51,7 +51,7 @@ relay line. `possibleDuplicate: true` means attempt N may already have landed.
51
51
  ## 4. Prove the configuration end to end
52
52
 
53
53
  ```bash
54
- plexus-cli --env staging notifications self-test --to <your-address>
54
+ plexus-cli --env staging platform notifications self-test --to <your-address>
55
55
  ```
56
56
 
57
57
  Verifies the connection + credentials, sends one mail, returns the SMTP
@@ -61,7 +61,7 @@ really goes to `--to`.
61
61
  ## 5. Retry
62
62
 
63
63
  ```bash
64
- plexus-cli --env staging notifications retry <deliveryId>
64
+ plexus-cli --env staging platform notifications retry <deliveryId>
65
65
  ```
66
66
 
67
67
  Only `dead` rows. It is a fresh attempt through the normal claim path — the
@@ -64,8 +64,8 @@ plexus-cli --env local --tenant test notifications letters show applicant.tasksO
64
64
  # b) Trigger the letter (for applicant.tasksOpen: open an external task on an
65
65
  # application — e.g. a workflow task addressed to the family), then find its
66
66
  # delivery and read the body that was actually rendered:
67
- plexus-cli --env local notifications list --limit 20
68
- plexus-cli --env local notifications show <deliveryId> --json | grep -A12 '"letter"'
67
+ plexus-cli --env local platform notifications list --limit 20
68
+ plexus-cli --env local platform notifications show <deliveryId> --json | grep -A12 '"letter"'
69
69
  ```
70
70
 
71
71
  `letter.text` (and `letter.html`) carry the reworded sentence, and
@@ -12,10 +12,10 @@ A platform token with `_platform.users.manage` (sessions name IP addresses) and
12
12
 
13
13
  ```bash
14
14
  # Everything the platform still knows about the address, oldest first.
15
- plexus-cli --env prod users login-trail ada@example.com --since 24h
15
+ plexus-cli --env prod platform users login-trail ada@example.com --since 24h
16
16
 
17
17
  # Only the login page's letters to that address, with the relay's answer.
18
- plexus-cli --env prod notifications list --template account.loginLink --to ada@example.com --since 24h
18
+ plexus-cli --env prod platform notifications list --template account.loginLink --to ada@example.com --since 24h
19
19
  ```
20
20
 
21
21
  `login-trail` prints one time-ordered list:
@@ -131,8 +131,8 @@ a fixed person.
131
131
 
132
132
  ## A staff member leaves
133
133
 
134
- A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`users revoke`, `users unset-group`,
135
- `users archive`), leave a team whose slot names them, and a team a rule has a slot
134
+ A person a rule names — as a row's person or in a „Reihum" pool — cannot leave the staff (`platform users revoke`, `users unset-group`,
135
+ `platform users archive`), leave a team whose slot names them, and a team a rule has a slot
136
136
  for cannot be deleted — refused (`[CONFLICT] [assignment/ruleReferences] …`), naming offer
137
137
  (label + status), slot and row. The check reads every `wip` and published offer
138
138
  version (archived ones only run pinned test starts, which fail loud instead). Order:
@@ -22,7 +22,7 @@ teacher's trial-day feedback with an English and a maths placement sheet, as PDF
22
22
  `team:<group>` chat that means the members of that group plus platform admins. A
23
23
  `tenant_admin` who is in no such group sees neither the text nor the files. Before
24
24
  choosing `team:principals`, check that the readers really hold that group (`plexus-cli
25
- users show <email>`).
25
+ platform users show <email>`).
26
26
 
27
27
  ## CLI
28
28
 
@@ -22,14 +22,14 @@ exists only here.
22
22
  ## Steps
23
23
  1. **Plan** (no write — the default):
24
24
  ```bash
25
- plexus-cli --env <env> --tenant <slug> persons purge <partyId>
25
+ plexus-cli --env <env> --tenant <slug> platform persons purge <partyId>
26
26
  ```
27
27
  Prints the person, when staff deleted it, the rows per table (the party, its
28
28
  persons row, roles, values and their links, placements, enrollments, search
29
29
  entries, `value_history`, …) and every receipt that refuses the commit.
30
30
  2. **Commit** once the plan shows no `Refused` block:
31
31
  ```bash
32
- plexus-cli --env <env> --tenant <slug> persons purge <partyId> --confirm [--allow-prod]
32
+ plexus-cli --env <env> --tenant <slug> platform persons purge <partyId> --confirm [--allow-prod]
33
33
  ```
34
34
 
35
35
  ## Verify
@@ -12,26 +12,26 @@ platform-wide input registry — sealing refuses it until the key is registered.
12
12
  ## Steps
13
13
  ```bash
14
14
  # One key.
15
- plexus-cli --env <env> generator input-key create --key childBirthDate \
15
+ plexus-cli --env <env> platform generator input-key create --key childBirthDate \
16
16
  --label "Geburtsdatum" --label-en "Date of birth" \
17
17
  --description "Geburtsdatum des Kindes" --description-en "The child's date of birth" --scalar date
18
- plexus-cli --env <env> generator input-key create --key payerPartyId \
18
+ plexus-cli --env <env> platform generator input-key create --key payerPartyId \
19
19
  --label "Zahler" --label-en "Payer" --description "Wer zahlt" --description-en "Who pays" --entity party
20
20
 
21
21
  # Many keys from a file — a JSON array of
22
22
  # { "key", "label": {de,en}, "description": {de,en},
23
23
  # "value": { "valueKind": "scalar", "scalarType": "date" } | { "valueKind": "entity", "entityKind": "party" } }
24
- plexus-cli --env <env> generator input-key plan --file <scratch>/input-keys.json # create | same | differs | deprecated
25
- plexus-cli --env <env> generator input-key apply --file <scratch>/input-keys.json # registers the missing ones
24
+ plexus-cli --env <env> platform generator input-key plan --file <scratch>/input-keys.json # create | same | differs | deprecated
25
+ plexus-cli --env <env> platform generator input-key apply --file <scratch>/input-keys.json # registers the missing ones
26
26
 
27
27
  # A key that should no longer be used in new drafts.
28
- plexus-cli --env <env> generator input-key deprecate --key childBirthDate
28
+ plexus-cli --env <env> platform generator input-key deprecate --key childBirthDate
29
29
  ```
30
30
 
31
31
  ## Verify
32
32
  ```bash
33
- plexus-cli --env <env> generator input-key list
34
- plexus-cli --env <env> generator input-key plan --file <scratch>/input-keys.json # every row: same
33
+ plexus-cli --env <env> platform generator input-key list
34
+ plexus-cli --env <env> platform generator input-key plan --file <scratch>/input-keys.json # every row: same
35
35
  ```
36
36
 
37
37
  ## Idempotency / gotchas
@@ -14,7 +14,7 @@ rule reaches stays, with all its data, until someone runs this recipe.
14
14
  >
15
15
  > - **Who:** the Plexus platform operator (whoever holds a
16
16
  > `_platform.config.manage` token for prod — the right of the other person
17
- > hard delete, `persons purge`).
17
+ > hard delete, `platform persons purge`).
18
18
  > - **How often:** **monthly**, on the first working day, for every tenant with a
19
19
  > rule; additionally within a week whenever the weekly warning appears.
20
20
  > - **Record:** keep the `--json` output of each `apply` run in
@@ -89,11 +89,11 @@ names stays).
89
89
  above the relation engine's budget (`MAX_PLAN_ROWS` rows or the index-read cap) is
90
90
  a bug-class error, not a block — `plan` aborts with `[relations] deletion plan
91
91
  exceeds …` naming the person, and the weekly report marks the tenant `scanFailed`.
92
- Review that person by hand (`persons purge` after a soft delete, or
92
+ Review that person by hand (`platform persons purge` after a soft delete, or
93
93
  split its data) before the rest can run.
94
94
  - **Soft-deleted persons („gelöscht")** are due like any other and marked so.
95
95
  - **One person now** (staff deleted someone and the family asks for erasure) is
96
- not this recipe: [`persons purge`](../persons/purge-deleted-person.md).
96
+ not this recipe: [`platform persons purge`](../persons/purge-deleted-person.md).
97
97
  - **Writes need `--env` named; prod needs `--allow-prod`.**
98
98
 
99
99
  ## Related
@@ -32,13 +32,13 @@ commands: [README.md](./README.md).
32
32
  plexus-cli signing connection show --env staging --tenant <slug>
33
33
 
34
34
  # 2a. inSign. The password comes from stdin — NEVER as an argument.
35
- printf %s "$INSIGN_PASSWORD" | plexus-cli signing connection set --provider insign \
35
+ printf %s "$INSIGN_PASSWORD" | plexus-cli platform signing connection set --provider insign \
36
36
  --base-url https://insign.<anbieter>.de --username <api-user> --owner-id <owner> \
37
37
  --secret-stdin --env staging --tenant <slug>
38
38
 
39
39
  # 2b. DocuSign. The HMAC key from a file (or stdin); without one, no callback is
40
40
  # registered and the 15-minute poll is the only return path.
41
- plexus-cli signing connection set --provider docusign --user-id <GUID> \
41
+ plexus-cli platform signing connection set --provider docusign --user-id <GUID> \
42
42
  --redirect-to admin@plexus.swop.schule --secret-file ./hmac.txt \
43
43
  --env staging --tenant <slug>
44
44
 
@@ -47,7 +47,7 @@ plexus-cli signing connection set --provider docusign --user-id <GUID> \
47
47
  plexus-cli signing connection test --provider insign --env staging --tenant <slug>
48
48
 
49
49
  # 4. Make it the provider the school's contracts go out through.
50
- plexus-cli signing connection activate --provider insign --env staging --tenant <slug>
50
+ plexus-cli platform signing connection activate --provider insign --env staging --tenant <slug>
51
51
 
52
52
  # 5. Prove it.
53
53
  plexus-cli signing connection show --env staging --tenant <slug>
@@ -15,15 +15,15 @@ sealed under) must change — routine rotation or a suspected leak.
15
15
  envelopes under the old key open through the previous slot.
16
16
  2. Re-seal every connection under the new key:
17
17
  ```bash
18
- plexus-cli signing connection reseal --env <env>
18
+ plexus-cli platform signing connection reseal --env <env>
19
19
  ```
20
20
  3. Check the slots:
21
21
  ```bash
22
- plexus-cli signing status --env <env>
22
+ plexus-cli platform signing status --env <env>
23
23
  ```
24
24
 
25
25
  ## Verify
26
- `signing status` shows `sealedPrevious: 0`, `sealedUnknown: 0` and
26
+ `platform signing status` shows `sealedPrevious: 0`, `sealedUnknown: 0` and
27
27
  `previousSlot: nothing sealed under it — can be removed`. Then the platform
28
28
  operator clears the previous slot from the deployment's environment and deploys.
29
29
 
@@ -17,7 +17,7 @@ agent.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> users provision <email> \
20
+ plexus-cli --env <env> platform users provision <email> \
21
21
  --name "Vorname Nachname" --platform-admin \
22
22
  --out creds.csv --quiet
23
23
  ```
@@ -30,11 +30,11 @@ plexus-cli --env <env> users provision <email> \
30
30
 
31
31
  ## Verify
32
32
  ```bash
33
- plexus-cli --env <env> users show <email>
33
+ plexus-cli --env <env> platform users show <email>
34
34
  ```
35
35
 
36
36
  Success: a `platform: …` line lists the full `_platform.*` permission set and the
37
- user has **no** tenant rows. `plexus-cli --env <env> platform users` lists them too.
37
+ user has **no** tenant rows. `plexus-cli --env <env> platform users list` lists them too.
38
38
 
39
39
  ## Hand the credentials over
40
40
 
@@ -47,15 +47,15 @@ bare, one block per account. See
47
47
  - **Refuses an email that already has tenant access** (the `_platform.* XOR
48
48
  tenant-access` invariant). For a per-tenant account use
49
49
  [Add a tenant admin](./add-tenant-admin.md) instead.
50
- - Contrast `users create <email> --platform-admin`, which also mints a credential
50
+ - Contrast `platform users create <email> --platform-admin`, which also mints a credential
51
51
  (no verb leaves an identity that cannot log in) but takes **no display
52
- name** and never rotates an existing password. `users provision --platform-admin`
52
+ name** and never rotates an existing password. `platform users provision --platform-admin`
53
53
  is the named path, and re-running it deliberately resets the login.
54
54
  - Runtime-only account — **not** part of the demo seed (real personal passwords
55
55
  never are); a destructive reseed won't recreate it. Re-run if ever reseeded.
56
56
 
57
57
  ## Related
58
- - [Add a tenant admin](./add-tenant-admin.md) — the per-tenant twin (`users provision`).
59
- - Command reference: `plexus-cli users provision --help` and
60
- `plexus-cli users create --help` (the create-vs-provision distinction above).
58
+ - [Add a tenant admin](./add-tenant-admin.md) — the per-tenant twin (`platform users provision`).
59
+ - Command reference: `plexus-cli platform users provision --help` and
60
+ `plexus-cli platform users create --help` (the create-vs-provision distinction above).
61
61
  - Connection and token: `plexus-cli config show`, `plexus-cli whoami`.
@@ -17,7 +17,7 @@ explicit `_platform.*` permission set and a working login.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> users provision <email> \
20
+ plexus-cli --env <env> platform users provision <email> \
21
21
  --name "Vorname Nachname" \
22
22
  --permission _platform.schema.read \
23
23
  --out creds.csv --quiet
@@ -32,7 +32,7 @@ plexus-cli --env <env> users provision <email> \
32
32
 
33
33
  ## Verify
34
34
  ```bash
35
- plexus-cli --env <env> users show <email>
35
+ plexus-cli --env <env> platform users show <email>
36
36
  ```
37
37
 
38
38
  Success: a `platform: ...` line lists exactly the requested `_platform.*`
@@ -17,7 +17,7 @@ permission grant.
17
17
 
18
18
  ## Steps
19
19
  ```bash
20
- plexus-cli --env <env> --tenant <slug> users provision <email> \
20
+ plexus-cli --env <env> --tenant <slug> platform users provision <email> \
21
21
  --name "Vorname Nachname" --group tenant_admin \
22
22
  --out creds.csv --quiet
23
23
  ```
@@ -33,11 +33,11 @@ plexus-cli --env <env> --tenant <slug> users provision <email> \
33
33
 
34
34
  ## Verify
35
35
  ```bash
36
- plexus-cli --env <env> users show <email>
36
+ plexus-cli --env <env> platform users show <email>
37
37
  ```
38
38
 
39
39
  Success: the user lists the `<slug>` tenant with groups `tenant_admin, applicant`.
40
- (`users show` is a global lookup across every tenant the user belongs to — no
40
+ (`platform users show` is a global lookup across every tenant the user belongs to — no
41
41
  `--tenant` needed; the email match is case-insensitive.)
42
42
 
43
43
  ## Hand the credentials over — always this format
@@ -61,8 +61,8 @@ sequence, and the address never reaches the visible text.
61
61
  - The password is shown **once**; if you didn't capture it, re-run with `--out …`
62
62
  to mint a fresh one.
63
63
  - This both **grants tenant access and creates a login credential** — contrast
64
- `users grant` / `users set-group`, which only adjust access and group membership for
65
- a user who already exists. `users grant` REFUSES an unknown address (it
64
+ `platform users grant` / `users set-group`, which only adjust access and group membership for
65
+ a user who already exists. `platform users grant` REFUSES an unknown address (it
66
66
  has no name or password channel, so any identity it created could never log in);
67
67
  provision the account first, here.
68
68
  - The backend lowercases the email; the login address is the lowercased form.
@@ -71,6 +71,6 @@ sequence, and the address never reaches the visible text.
71
71
 
72
72
  ## Related
73
73
  - [Add a platform admin](./add-platform-admin.md) — the tenant-less platform twin
74
- (`users provision --platform-admin`).
74
+ (`platform users provision --platform-admin`).
75
75
  - Command reference: `plexus-cli users --help`.
76
76
  - Connection and token: `plexus-cli config show`, `plexus-cli whoami`.
@@ -6,17 +6,17 @@ reserved one (`test100@<domain>.test`) so no mail can ever reach a stranger.
6
6
 
7
7
  ## Prerequisites
8
8
  - A platform token with `_platform.users.manage` for the target env.
9
- - The account exists (`plexus-cli --env <env> users show <email>`).
9
+ - The account exists (`plexus-cli --env <env> platform users show <email>`).
10
10
  - The new address is free: the verb refuses one held by another account, in the
11
11
  plan already.
12
12
 
13
13
  ## Steps
14
14
  ```bash
15
15
  # 1. Plan — runs every check, writes nothing
16
- plexus-cli --env <env> users set-email <old@domain> --to <new@domain>
16
+ plexus-cli --env <env> platform users set-email <old@domain> --to <new@domain>
17
17
 
18
18
  # 2. Apply
19
- plexus-cli --env <env> users set-email <old@domain> --to <new@domain> --confirm
19
+ plexus-cli --env <env> platform users set-email <old@domain> --to <new@domain> --confirm
20
20
  ```
21
21
 
22
22
  For a test account, keep the local part and replace the domain's TLD with
@@ -25,8 +25,8 @@ For a test account, keep the local part and replace the domain's TLD with
25
25
 
26
26
  ## Verify
27
27
  ```bash
28
- plexus-cli --env <env> users show <new@domain> # same userId, same tenants
29
- plexus-cli --env <env> users show <old@domain> # → No user with email …
28
+ plexus-cli --env <env> platform users show <new@domain> # same userId, same tenants
29
+ plexus-cli --env <env> platform users show <old@domain> # → No user with email …
30
30
  ```
31
31
 
32
32
  ## Idempotency / gotchas
@@ -34,7 +34,7 @@ plexus-cli --env <env> users show <old@domain> # → No user with email …
34
34
  - One identity, every tenant: an account shared by several tenants moves in all
35
35
  of them at once. (Staff editing the party's E-Mail field cannot do this — that
36
36
  path refuses a shared identity and points here.)
37
- - The password is untouched; set one afterwards with `users set-password` if needed.
37
+ - The password is untouched; set one afterwards with `platform users set-password` if needed.
38
38
  - **Mailbox proof** is reset (the holder re-confirms via a mailed link before
39
39
  they can move a process again) — except for a reserved test address (`.test`,
40
40
  `.example`, `.invalid`, `.localhost`, `example.com/.net/.org`): no mailbox
@@ -32,7 +32,7 @@ change that takes the right away revokes the person's tokens.
32
32
  **0 — check the person is a `tenant_admin`:**
33
33
 
34
34
  ```bash
35
- plexus-cli --env <env> users show <email> # groups: tenant_admin, …
35
+ plexus-cli --env <env> platform users show <email> # groups: tenant_admin, …
36
36
  ```
37
37
 
38
38
  **A — the administrator mints it themselves:** in the app, *Einstellungen →
@@ -107,7 +107,7 @@ platform`, setup mode (Load N / wipe), `offer delete` (the hard delete).
107
107
  „Das API-Token „…“ wurde am <Datum> widerrufen: <Grund>“. A right that lapses without a
108
108
  write is still caught: every CLI call asks it and refuses with 403 „Ihr Konto hat
109
109
  das Recht „API-Tokens: Verwalten“ nicht mehr …“.
110
- - A tenant member cannot be made platform admin (`users set-platform-admin`):
110
+ - A tenant member cannot be made platform admin (`platform users set-platform-admin`):
111
111
  platform rights and tenant access exclude each other — an inactive access row
112
112
  counts too.
113
113
  - A unit-scoped membership does not count for config: the right must be held
@@ -10,7 +10,7 @@ create and rename but **not** delete.
10
10
  - A team that was retired and whose work has been re-pointed elsewhere.
11
11
 
12
12
  Not for: taking someone's access away — that is `users unset-group` (leave the
13
- group, keep the tenant) or `users revoke` (revoke tenant access).
13
+ group, keep the tenant) or `platform users revoke` (revoke tenant access).
14
14
 
15
15
  ## Prerequisites
16
16
 
@@ -15,14 +15,14 @@ so they can dogfood the product. One-time + manual: it grants the users that exi
15
15
  no `--tenant` needed). `plexus-cli --env <env> tenants` lists the reachable slugs.
16
16
  - **Auth:** a platform-admin token with `_platform.users.manage`. Confirm with
17
17
  `plexus-cli --env <env> whoami`.
18
- - **Tooling:** an installed `plexus-cli` (`plexus-cli users grant-all --help`).
18
+ - **Tooling:** an installed `plexus-cli` (`plexus-cli platform users grant-all --help`).
19
19
 
20
20
  ## Steps
21
21
  Run once per **source** tenant, pointing every one at the target (`test`):
22
22
  ```bash
23
23
  # Repeat for each non-test tenant slug. Without --confirm it only prints the plan:
24
- plexus-cli --env <env> users grant-all --from <sourceSlug> --to test --group tenant_admin
25
- plexus-cli --env <env> users grant-all --from <sourceSlug> --to test --group tenant_admin --confirm
24
+ plexus-cli --env <env> platform users grant-all --from <sourceSlug> --to test --group tenant_admin
25
+ plexus-cli --env <env> platform users grant-all --from <sourceSlug> --to test --group tenant_admin --confirm
26
26
  ```
27
27
 
28
28
  To enumerate the source slugs to loop over:
@@ -41,7 +41,7 @@ plexus-cli --env <env> tenants # list slugs; run grant-all for each b
41
41
 
42
42
  ## Verify
43
43
  ```bash
44
- plexus-cli --env <env> users show <someEmailFromSource>
44
+ plexus-cli --env <env> platform users show <someEmailFromSource>
45
45
  ```
46
46
 
47
47
  Success: the user now lists the `test` tenant with group `tenant_admin, applicant`.
@@ -51,10 +51,10 @@ The command output also prints `Granted N/M users …` plus any `skipped` rows.
51
51
  - **Current users only** — there is no standing auto-grant; re-run to enroll users
52
52
  added after the last run.
53
53
  - Re-running is safe (idempotent per user); it neither rotates passwords nor creates
54
- logins (contrast `users provision`).
54
+ logins (contrast `platform users provision`).
55
55
  - Runtime-only grants — a destructive reseed of the source/target tenant drops them;
56
56
  re-run this playbook afterwards.
57
57
 
58
58
  ## Related
59
59
  - [Add a tenant admin](./add-tenant-admin.md) — single ready-to-log-in account.
60
- - Command reference: `plexus-cli users grant-all --help`.
60
+ - Command reference: `plexus-cli platform users grant-all --help`.
@@ -8,16 +8,16 @@ explicitly to the platform's real triage admins only.
8
8
  ## Prerequisites
9
9
  - `--env staging|prod` configured with a platform-operator token (the grant is gated
10
10
  `_platform.users.manage`).
11
- - The target already exists as a platform admin (`plexus-cli --env <env> platform users`).
11
+ - The target already exists as a platform admin (`plexus-cli --env <env> platform users list`).
12
12
 
13
13
  ## Steps
14
14
  ```bash
15
- plexus-cli --env <env> users set-platform-permission <email> \
15
+ plexus-cli --env <env> platform users set-platform-permission <email> \
16
16
  --permission _platform.feedback.assign --on
17
17
  ```
18
18
  Example — grant one triage admin on prod:
19
19
  ```bash
20
- plexus-cli --env prod users set-platform-permission --allow-prod ada@example.com \
20
+ plexus-cli --env prod platform users set-platform-permission --allow-prod ada@example.com \
21
21
  --permission _platform.feedback.assign --on
22
22
  ```
23
23
 
@@ -29,7 +29,7 @@ plexus-cli --env <env> feedback admins
29
29
 
30
30
  ## Idempotency / gotchas
31
31
  - **Opt-in, not part of the full-admin grant.** Making someone a full platform admin
32
- (`users set-platform-admin … --on`) does **not** grant assignability; this perm is
32
+ (`platform users set-platform-admin … --on`) does **not** grant assignability; this perm is
33
33
  excluded from the default set on purpose. Re-affirming full-admin status *preserves*
34
34
  an already-granted assign perm (it is never silently stripped).
35
35
  - Revoke with `--off`. Removing the last permission from a row deletes the
@@ -12,17 +12,17 @@ password; it grants nothing and creates nothing.
12
12
  - **Inputs:** the user's email. The identity **must already exist** (provision it
13
13
  first with [add-tenant-admin](./add-tenant-admin.md) /
14
14
  [add-platform-admin](./add-platform-admin.md)).
15
- - **Tooling:** an installed `plexus-cli` (`plexus-cli users set-password --help`).
15
+ - **Tooling:** an installed `plexus-cli` (`plexus-cli platform users set-password --help`).
16
16
 
17
17
  ## Steps
18
18
  ```bash
19
19
  # Set a known password (piped in, never as an argument):
20
- printf %s "$PW" | plexus-cli --env <env> users set-password <email> --password-stdin
20
+ printf %s "$PW" | plexus-cli --env <env> platform users set-password <email> --password-stdin
21
21
  # …or from a file:
22
- plexus-cli --env <env> users set-password <email> --password-file <path>
22
+ plexus-cli --env <env> platform users set-password <email> --password-file <path>
23
23
 
24
24
  # …or let the server generate a strong one (returned once; capture without echoing):
25
- plexus-cli --env <env> users set-password <email> --out creds.csv --quiet
25
+ plexus-cli --env <env> platform users set-password <email> --out creds.csv --quiet
26
26
  ```
27
27
 
28
28
  The server owns hashing + generation and returns the plaintext **once** (only the
@@ -31,7 +31,7 @@ keeps it off stdout.
31
31
 
32
32
  ## Verify
33
33
  ```bash
34
- plexus-cli --env <env> users show <email> # identity unchanged (sanity)
34
+ plexus-cli --env <env> platform users show <email> # identity unchanged (sanity)
35
35
  ```
36
36
  Then confirm the new password actually logs in at the env's `/login`.
37
37
 
@@ -43,17 +43,17 @@ bare, one block per account. See
43
43
 
44
44
  ## Idempotency / gotchas
45
45
  - **Pure credential write** — it creates no identity, tenant access, person, or
46
- permission, and changes no groups. Use `users provision` /
47
- `users provision --platform-admin` to *create* a ready-to-log-in user;
46
+ permission, and changes no groups. Use `platform users provision` /
47
+ `platform users provision --platform-admin` to *create* a ready-to-log-in user;
48
48
  `set-password` only rotates an **existing** one.
49
49
  - **Fails loud, never repairs by creating:** throws if no Plexus identity exists for
50
50
  the email, if the email has no live Better Auth account, or if that account
51
- doesn't match the identity (an orphan → run `users relink-auth` first, then retry).
51
+ doesn't match the identity (an orphan → run `platform users relink-auth` first, then retry).
52
52
  - The password is shown **once**; re-run to mint a fresh one if you lose it.
53
53
  - Email match is case-insensitive (the backend lowercases it).
54
54
 
55
55
  ## Related
56
56
  - [Add a tenant admin](./add-tenant-admin.md) · [Add a platform admin](./add-platform-admin.md)
57
57
  — both also accept `--password-stdin` / `--password-file` at creation time.
58
- - `users relink-auth <email>` — repair an orphaned identity before setting a password.
59
- - Command reference: `plexus-cli users set-password --help`.
58
+ - `platform users relink-auth <email>` — repair an orphaned identity before setting a password.
59
+ - Command reference: `plexus-cli platform users set-password --help`.
@@ -18,7 +18,7 @@ applicant — on local, staging or prod — without registering a new address fi
18
18
  ### 1. Check the account in the target tenant
19
19
 
20
20
  ```bash
21
- plexus-cli --env <local|staging|prod> users show test@example.com
21
+ plexus-cli --env <local|staging|prod> platform users show test@example.com
22
22
  ```
23
23
 
24
24
  Expect one access row per tenant with an applicant portal, each in the
@@ -29,7 +29,7 @@ Expect one access row per tenant with an applicant portal, each in the
29
29
  A deploy provisions the account with a random password nobody holds. Set one:
30
30
 
31
31
  ```bash
32
- plexus-cli --env <staging|prod> --tenant <slug> users set-password test@example.com
32
+ plexus-cli --env <staging|prod> --tenant <slug> platform users set-password test@example.com
33
33
  ```
34
34
 
35
35
  The identity is global, so this one password opens the account in **every**
@@ -35,7 +35,7 @@ glitchtip-cli issues list
35
35
  # (the CLI `issues list` has no tag filter).
36
36
 
37
37
  # 5. Is the reaper (the only authority that frees stuck leases) actually firing?
38
- plexus-cli --env prod workers reaper-status --json # ranAt should be < ~1 min old
38
+ plexus-cli --env prod platform workers reaper-status --json # ranAt should be < ~1 min old
39
39
  ```
40
40
 
41
41
  ### The decision rule (why did the worker die?)
@@ -52,13 +52,13 @@ A job reaper-failed / vanished, **and**:
52
52
 
53
53
  ```bash
54
54
  # Force a reaper pass now instead of waiting for the 1-min cron.
55
- plexus-cli --env prod workers reap --allow-prod --json
55
+ plexus-cli --env prod platform workers reap --allow-prod --json
56
56
 
57
57
  # Clear import runs stuck 'running' with no active job (the orphan class).
58
58
  # DRY-RUN first (no --confirm), then confirm. Marks failed, never deletes.
59
- plexus-cli --env prod imports cleanup-orphaned --tenant <slug>
60
- plexus-cli --env prod imports cleanup-orphaned --allow-prod --tenant <slug> --confirm
61
- plexus-cli --env prod imports cleanup-orphaned --all-tenants # dry-run sweep
59
+ plexus-cli --env prod platform imports cleanup-orphaned --tenant <slug>
60
+ plexus-cli --env prod platform imports cleanup-orphaned --allow-prod --tenant <slug> --confirm
61
+ plexus-cli --env prod platform imports cleanup-orphaned --all-tenants # dry-run sweep
62
62
 
63
63
  # Cancel a job that should not be running (plan first; --confirm cancels).
64
64
  plexus-cli --env prod jobs cancel --allow-prod <jobId>
@@ -86,5 +86,5 @@ plexus-cli --env prod jobs list --status running # nothing unexpectedly in
86
86
  past the row you want.
87
87
 
88
88
  ## Related
89
- - Command reference: `plexus-cli jobs list --help`, `plexus-cli workers reap --help`,
90
- `plexus-cli imports cleanup-orphaned --help`.
89
+ - Command reference: `plexus-cli jobs list --help`, `plexus-cli platform workers reap --help`,
90
+ `plexus-cli platform imports cleanup-orphaned --help`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartkomm/plexus-cli",
3
- "version": "0.1.31",
3
+ "version": "0.1.33",
4
4
  "description": "Unified Plexus admin + admission-offer config CLI (Convex backend).",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",