vortex-cli 8.0.1__tar.gz → 8.1.0__tar.gz

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 (62) hide show
  1. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/PKG-INFO +237 -56
  2. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/README.md +236 -55
  3. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/pyproject.toml +1 -1
  4. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/cli.py +114 -196
  5. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/app.py +47 -9
  6. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/clone.py +4 -4
  7. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/code.py +19 -3
  8. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/compile.py +61 -17
  9. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/db.py +129 -24
  10. vortex_cli-8.1.0/vortex/commands/diff.py +352 -0
  11. vortex_cli-8.1.0/vortex/commands/execute.py +111 -0
  12. vortex_cli-8.1.0/vortex/commands/fetch.py +462 -0
  13. vortex_cli-8.0.1/vortex/commands/status.py → vortex_cli-8.1.0/vortex/commands/info.py +21 -34
  14. vortex_cli-8.1.0/vortex/commands/libs.py +103 -0
  15. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/log.py +82 -9
  16. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/object_.py +191 -19
  17. vortex_cli-8.1.0/vortex/commands/pull.py +294 -0
  18. vortex_cli-8.1.0/vortex/commands/search.py +332 -0
  19. vortex_cli-8.1.0/vortex/commands/servers.py +362 -0
  20. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/use.py +2 -2
  21. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/watch.py +91 -12
  22. vortex_cli-8.1.0/vortex/git.py +188 -0
  23. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/main.py +302 -107
  24. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/models.py +34 -9
  25. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/output.py +2 -2
  26. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/registry.py +31 -7
  27. vortex_cli-8.1.0/vortex/server_options.py +116 -0
  28. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/soap.py +1 -1
  29. vortex_cli-8.1.0/vortex/sync.py +441 -0
  30. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/util.py +0 -35
  31. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/webdesign.py +122 -23
  32. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/workspace.py +200 -67
  33. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/PKG-INFO +237 -56
  34. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/SOURCES.txt +9 -4
  35. vortex_cli-8.0.1/vortex/commands/config.py +0 -67
  36. vortex_cli-8.0.1/vortex/commands/execute.py +0 -103
  37. vortex_cli-8.0.1/vortex/commands/find.py +0 -47
  38. vortex_cli-8.0.1/vortex/commands/grep.py +0 -99
  39. vortex_cli-8.0.1/vortex/commands/libs.py +0 -71
  40. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/LICENSE +0 -0
  41. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/setup.cfg +0 -0
  42. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/__init__.py +0 -0
  43. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/__main__.py +0 -0
  44. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/colour.py +0 -0
  45. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/__init__.py +0 -0
  46. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/clean.py +0 -0
  47. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/docs.py +0 -0
  48. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/commands/keyword.py +0 -0
  49. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/constants.py +0 -0
  50. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/docs/Blackbook v2.md +0 -0
  51. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/docs/Blackbook.pdf +0 -0
  52. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/docs/index.html +0 -0
  53. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/docs/marked.min.js +0 -0
  54. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/lib/puakma-6.0.40.jar +0 -0
  55. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/libs.py +0 -0
  56. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/logging.py +0 -0
  57. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/schedule.py +0 -0
  58. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex/spinner.py +0 -0
  59. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/dependency_links.txt +0 -0
  60. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/entry_points.txt +0 -0
  61. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/requires.txt +0 -0
  62. {vortex_cli-8.0.1 → vortex_cli-8.1.0}/vortex_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vortex_cli
3
- Version: 8.0.1
3
+ Version: 8.1.0
4
4
  Summary: Vortex CLI
5
5
  Author-email: Jordan Amos <jordan.amos@gmail.com>
6
6
  License: MIT License
@@ -100,12 +100,88 @@ While it is possible to use without it, this software has been purposefully desi
100
100
  ; Optional
101
101
  gateway_path = vortex/gateway.pma ; the default: through the vortex gateway. Blank = webdesign's vortex API directly - see Backend: gateway or webdesign
102
102
  clone_with_resources = html,css,js ; resources with these extensions are always cloned - 'clone --get-resources' still clones ALL resources
103
- lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex libs')
103
+ lib_path = ; optional extra jars to add to the classpath (the server's own jars are downloaded automatically - see 'vortex server libs')
104
104
  workspace_folders = ~/dev/shared,notes ; extra folders to mount in the generated .code-workspace files. Relative paths resolve against the workspace root. Under [DEFAULT] they are added to every workspace; here they apply to this server's workspace (and the global one)
105
105
  java_home = /usr/lib/jvm/java-17-openjdk-amd64/ ; The local path to the JRE to use. Should be the same version running on your server
106
106
  java_environment_name = JavaSE-17 ; Java Execution Environment name https://docs.osgi.org/reference/eenames.html
107
107
  ```
108
108
 
109
+ ## Upgrading to 8.1
110
+
111
+ 8.1 does two things. It replaces `vortex config` with plain top-level commands that read
112
+ `servers.ini`, which you edit by hand. And it stops a stale clone from silently overwriting
113
+ someone else's upload - another agent, in another workspace or on another machine - all
114
+ client side, with no gateway or webdesign change (see
115
+ [Working alongside other agents](#working-alongside-other-agents)). `vortex config` and the `execute` flags are **removed**: `config` is a stub
116
+ that runs nothing, prints the replacements and exits 1; the old `execute` flags are usage
117
+ errors (exit 2).
118
+
119
+ | 8.0 | 8.1 |
120
+ |---|---|
121
+ | `config --list-servers` | `server list` |
122
+ | `config --output-server-config` | `server get [NAME]` |
123
+ | `config --output-config-path` | the last line of `server list` |
124
+ | `config --output-workspace-path` | `vortex --path` |
125
+ | `config --update-vscode-settings` / `--reset-vscode-settings` | automatic on a `servers.ini` save, or `code --refresh [--reset]` |
126
+ | `config --set S O V` | edit `servers.ini` |
127
+ | `config --set-password` | `keyring set vortex-cli:<server> <username>` |
128
+ | `config --sample` | `server get` (every option it reads) |
129
+ | `execute --show-schedule` / `--refresh-agenda` / `--flush-cache` | `execute schedule` / `refresh-agenda` / `flush-cache` |
130
+ | `execute --refresh-design N` | `app refresh-design N` |
131
+ | `execute --run PATH` | `object run ID --app-id N` |
132
+ | `status [--show-permissions] [--json]` | `vortex [-s NAME] [--show-permissions] [--json]` (no command) - plus the CLI version and the workspace |
133
+ | `vortex` with no command (the workspace path) | the live status of the default server: `vortex-cli` and `workspace` first, then the server (`vortex --path` prints just the path) |
134
+ | `use NAME` | `server use NAME` (`use NAME` still works) |
135
+ | `libs [--refresh] [-s NAME]` | `server libs [NAME] [--refresh]` |
136
+ | - | `fetch` - which cloned elements are out of step with the server, content and metadata (renames too); `fetch --pull` brings them in without losing local edits (3-way merges what it can) |
137
+ | - | `object diff` - server vs local (`--mine`: your edits, `--theirs`: the server's) |
138
+ | `compile --upload` sends every class | only those whose `.java` was edited since the clone synced it (`--all`: every one) |
139
+ | `find QUERY [--app-id ID]` (clones only) | `object list [QUERY] [--app-id ID [--local]] [--json]` - with `--app-id` it asks the server, so no clone is needed; QUERY is optional (every object) |
140
+ | `grep PATTERN` | `object grep PATTERN [--json]` - still the clones only |
141
+ | `db list --app-id ID` (required) | `db list [--app-id ID]` - without it, every application's connections; each row names its application (with `--app-id`, from its clone - the name is blank when it isn't cloned) |
142
+
143
+ - **Server commands are one noun, `vortex server`.** **`vortex server list`** lists every
144
+ server definition: host, backend, protected, the number of cloned apps, and `*` on the
145
+ default. **`vortex server get [NAME]`** (the default server without one) lists every option vortex reads with its value and where it comes from - the
146
+ server's own section, `[DEFAULT]`, the built-in default, or unset - plus where the
147
+ credentials come from and any option vortex ignores (typos, renamed and removed options).
148
+ Neither sends a request or prints a password. Both say when `default` names a server that
149
+ isn't defined.
150
+ - **`execute` joins its words**, so `vortex ex tell agenda schedule -s dev` needs no quotes.
151
+ - **A protected server must be named.** A command that writes to a server or sends a console
152
+ command (`execute`, `compile --upload`, every `app`/`object`/`keyword`/`db` write, and a
153
+ `db query` that is not a `SELECT`) refuses a protected server that was only picked up as
154
+ the `vortex use` default (`PROTECTED_DEFAULT` in `--json`, nothing sent): pass `-s NAME`.
155
+ Reads are unaffected.
156
+ - **Saving `servers.ini` updates the VS Code workspace files.** A running `vortex watch`
157
+ rebuilds them on save (and says when a watched server's connection settings changed, which
158
+ needs a restart); otherwise the next `vortex` command does. Unchanged files are no longer
159
+ rewritten, so VS Code doesn't reload for nothing.
160
+ - **Uploads are refused on a conflict.** `watch`, `compile --upload` and `object update
161
+ --source/--data` (on a cloned app) compare the server's current row with the copy the clone
162
+ last synced - before anything is sent. If someone else wrote it since, the upload is refused
163
+ (`CONFLICT`, exit 1) and names who and when: `vortex fetch ID --app-id N --pull`, merge,
164
+ upload again.
165
+ `--force` (`compile --upload`, `object update`) overrides it, and needs a terminal
166
+ (`FORCE_NEEDS_TERMINAL` without one) so an agent can't.
167
+ - **`vortex find` and `vortex grep` are stubs** naming `vortex object list` and `vortex object
168
+ grep`, and exit 1.
169
+ - **`vortex status` is a stub** that names `vortex` (the server's status, as `status` was
170
+ in 8.0) and `vortex fetch` (the clone against the server), and exits 1. **`vortex libs`**
171
+ is a stub naming `vortex server libs`.
172
+ - **Manifests from before 8.1 still work.** They lack the server's `updated` stamp, so the
173
+ check compares content until the next `clone` or `fetch --pull` stores it. An older
174
+ `watch` kept a failed upload's content as the clone's copy of the server, so an edit that
175
+ never reached the server can look unedited: `fetch --pull` keeps any file it replaces or
176
+ removes under such a copy in `<app>/.pull-backup/<time>/`, and `compile --upload` says
177
+ when it skipped one. Run `vortex fetch --app-id ID --pull` once per clone after upgrading
178
+ (it also brings in metadata an older clone stored differently).
179
+ - **The upgrade is one-way.** An 8.1 manifest stores a field 8.0 doesn't know, so an 8.0 CLI
180
+ treats an 8.1 clone as unreadable - keep every machine and tool sharing a workspace on
181
+ 8.1 (or reclone after going back).
182
+ - **`fetch --pull --force` needs a terminal**, like the upload `--force`, and keeps every file
183
+ it replaces or removes under `<app>/.pull-backup/<time>/`.
184
+
109
185
  ## Upgrading to 8.0
110
186
 
111
187
  8.0 reorganises the server commands into `vortex <noun> <verb>` over four entities - `app`,
@@ -127,7 +203,7 @@ exists for one release as a stub that **runs nothing**, prints its 8.0 replaceme
127
203
  | `db NAME --list` / `--schema T` | `db list-tables` / `db get-table` |
128
204
  | `schema --add-table` ... `--delete-column` | `db create-table` ... `db delete-column` |
129
205
  | `schema --ddl` | removed |
130
- | `config --check-gateway` | `status` |
206
+ | `config --check-gateway` | `status` (`vortex` with no command since 8.1) |
131
207
 
132
208
  - **Numeric IDs, no guessing.** `--app-id` and `APP_ID` are numeric everywhere (only
133
209
  `clone APP...` still takes a TemplateName, group or `group/name`), and `--app-id` is
@@ -137,7 +213,7 @@ exists for one release as a stub that **runs nothing**, prints its 8.0 replaceme
137
213
  - **No clone needed for server work.** When the app *is* cloned, every change is written
138
214
  into the clone too (see [Local clones stay in sync](#local-clones-stay-in-sync)).
139
215
  - **Output for scripts and agents.** Readable by default; `--json` on every entity command
140
- and `status` prints one envelope with a machine-readable error code. Exit codes are 0/1
216
+ and `fetch` prints one envelope with a machine-readable error code. Exit codes are 0/1
141
217
  (2 for bad arguments). See [Output, errors and exit codes](#output-errors-and-exit-codes).
142
218
  - **`gateway_path` alone picks the route.** Set (the default `vortex/gateway.pma`) means the
143
219
  gateway, required - no probe, no fallback; blank means webdesign's `vortex` API directly.
@@ -195,6 +271,7 @@ vortex app update APP_ID [--name --group --description --inherit-from --templa
195
271
  [--param NAME=VALUE ...] [--remove-param NAME ...]
196
272
  vortex app export APP_ID... [--out-dir --exclude-source --timeout]
197
273
  vortex app import FILE.pmx --name N --group G
274
+ vortex app refresh-design APP_ID
198
275
 
199
276
  ── object ───────────────────────────────────────────────────────────────────
200
277
  vortex object get ID --app-id ID [--show-source --show-data] [--json]
@@ -205,7 +282,14 @@ vortex object update ID... --app-id ID [--source FILE --data FILE] [metadata opt
205
282
  [schedule options]
206
283
  schedule options (SCHEDULED_ACTION only): --schedule N|S|I|H|D|W|M|Y --interval N
207
284
  --days SMTWHFA --start-time HH:mm --finish-time HH:mm --date N --month N
285
+ vortex object diff [ID...] --app-id ID [--mine|--theirs] [--stat --word-diff -U N] [--json]
286
+ [-- GIT-DIFF-OPTIONS... | --write DIR]
208
287
  vortex object copy ID... --app-id SRC --to-app-id TGT [--copy-params]
288
+ vortex object list [QUERY] [--app-id ID [--local]] [--strict --inherits-from|--parent-page
289
+ --ids-only --show-params --type T...] [--json]
290
+ vortex object grep PATTERN [--app-id ID] [--output-paths|--output-apps]
291
+ [--include-resources|--type T...] [--json]
292
+ vortex object run ID --app-id ID
209
293
  vortex object delete ID... --app-id ID [--yes]
210
294
 
211
295
  ── keyword ──────────────────────────────────────────────────────────────────
@@ -215,7 +299,7 @@ vortex keyword set NAME [VALUE...] --app-id ID
215
299
  vortex keyword delete NAME --app-id ID [--yes]
216
300
 
217
301
  ── db ───────────────────────────────────────────────────────────────────────
218
- vortex db list --app-id ID [--local] [--json]
302
+ vortex db list [--app-id ID] [--local] [--json]
219
303
  vortex db get DB --app-id ID [--json]
220
304
  vortex db query DB --app-id ID [SQL | --file F | -] [--limit N] [--all-cols] [--json]
221
305
  vortex db list-tables DB --app-id ID [--json]
@@ -232,31 +316,30 @@ vortex db update-column DB TABLE COLUMN --app-id ID [--name --type --size --desc
232
316
  vortex db delete-column DB TABLE COLUMN --app-id ID [--yes]
233
317
 
234
318
  ── Workspace ────────────────────────────────────────────────────────────────
235
- vortex ls [app list filters] = app list --local
319
+ vortex ls [app list filters] [--json] = app list --local
236
320
  vortex clone APP... [--group --reclone --all --get-resources --open-urls --timeout]
237
- vortex compile --app-id ID [--object ID...] [--upload [--include-source]] [--show-warnings]
321
+ vortex compile --app-id ID [--object ID...] [--upload [--include-source --all --force]]
322
+ [--show-warnings]
323
+ vortex fetch [ID...] [--app-id ID] [--all] [--pull [--force --no-merge]] [--json]
238
324
  vortex watch [--include-protected]
239
325
  vortex clean [--app-id ID] [--all --include-libs]
240
- vortex grep PATTERN [--app-id ID] [--output-paths|--output-apps]
241
- [--include-resources|--type]
242
- vortex find QUERY [--app-id ID] [--strict --inherits-from|--parent-page --ids-only
243
- --show-params --type]
244
- vortex code
245
- vortex libs [--refresh]
326
+ vortex code [--refresh [--reset]] [-s]
246
327
 
247
328
  ── Server and setup ─────────────────────────────────────────────────────────
248
- vortex status [--show-permissions] [--json]
249
- vortex log [-n --source -m --errors-only|--debug-only|--info-only -k -d]
250
- vortex execute CMD | --refresh-design APP_ID | --run PATH | --show-schedule
251
- | --refresh-agenda | --flush-cache
252
- vortex config --sample | --list-servers | --set S O V | --set-password
253
- | --output-config-path | --output-workspace-path | --output-server-config
254
- | --update-vscode-settings | --reset-vscode-settings
255
- vortex use SERVER_NAME
329
+ vortex [-s NAME] [--show-permissions] [--json] (the server's live status)
330
+ vortex --path (the workspace path)
331
+ vortex log [-n --source -m --errors-only|--debug-only|--info-only -k -d] [--json]
332
+ vortex execute CMD... | flush-cache | refresh-agenda | schedule [--json] (alias: ex)
333
+ vortex server list [--json]
334
+ vortex server get [NAME] [--json]
335
+ vortex server use NAME (or: vortex use NAME)
336
+ vortex server libs [NAME] [--refresh] [--json]
256
337
  vortex docs [--serve --port]
257
338
  ```
258
339
 
259
- Every server command takes `-s/--server NAME` (default: the server set with `vortex use`).
340
+ Every server command takes `-s/--server NAME`, after the command or before it (default: the
341
+ server set with `vortex use`;
342
+ a protected default must be named with `-s` to write or run a console command).
260
343
  `--show-X` adds X to what is **printed**; `--include-X` adds X to what is **sent**.
261
344
 
262
345
  Each entity command makes at most three small requests (three per ID for multi-ID
@@ -265,8 +348,11 @@ commands); only `clone` downloads a whole application.
265
348
  ### Output, errors and exit codes
266
349
 
267
350
  Output is readable by default - tables for `list`, key/value for `get`. `--json` (every
268
- `app`, `object`, `keyword` and `db` command, and `status`) prints exactly one JSON envelope
269
- on stdout; logs, progress and prompts always go to stderr:
351
+ `app`, `object`, `keyword` and `db` command, `fetch`, `server list|get|libs`, `execute`, `log`,
352
+ `ls` and a bare `vortex`) prints
353
+ exactly one JSON envelope
354
+ on stdout; logs, progress and prompts always go to stderr. `log --keep-alive --json` never
355
+ ends, so it prints one envelope per line instead - one per log entry, as it arrives:
270
356
 
271
357
  ```json
272
358
  {"ok": true, "server": "dev", "data": {"appid": 9, "appname": "app", "appgroup": "bettrackr"}}
@@ -277,7 +363,9 @@ on stdout; logs, progress and prompts always go to stderr:
277
363
  the gateway's refusal code as sent (`FORBIDDEN` with the missing `role`, `NOT_FOUND`,
278
364
  `SYSTEM_DB`, `SQL_NOT_ALLOWED`, `WEBDESIGN_UNAVAILABLE`, ...), or one the CLI sets:
279
365
  `NOT_FOUND` (404), `FORBIDDEN` (a login page, 401/403), `UNAVAILABLE` (network, timeout, a
280
- missing route), `CONFIRMATION_REQUIRED` and `ERROR`. A `hint` says what to do next when
366
+ missing route), `CONFIRMATION_REQUIRED`, `CONFLICT` (an upload over someone else's newer
367
+ copy, or a pull that left something to merge), `OUT_OF_SYNC` (`fetch`: something needs a
368
+ pull), `NOT_CLONED`, `FORCE_NEEDS_TERMINAL` and `ERROR`. A `hint` says what to do next when
281
369
  there is something to do.
282
370
 
283
371
  Exit codes: `0` success, `1` failure (including a partly failed multi-ID command, whose
@@ -288,7 +376,7 @@ Nothing ever prompts without a terminal. The only wizards are `app create` and
288
376
  ask; `--yes` confirms, and without a terminal and without `--yes` they fail with
289
377
  `CONFIRMATION_REQUIRED` and send nothing.
290
378
 
291
- `vortex status --show-permissions` lists every server command, whether this identity may run
379
+ `vortex --show-permissions` lists every server command, whether this identity may run
292
380
  it and the gateway role it is missing - read from the gateway's own route table (`whoami`),
293
381
  so it is always the server's current rules.
294
382
 
@@ -316,22 +404,29 @@ and application write, so a manual cache flush is never required after one.
316
404
 
317
405
  ### Console shortcuts
318
406
 
319
- `vortex execute CMD` sends any console command (the gateway's `POST console`, which needs
320
- `GatewaySystem`, or the SOAP console without the gateway). The shortcuts send the exact
321
- strings the server's addins match:
407
+ `vortex execute CMD...` (or `ex`) sends any console command - the gateway's `POST console`,
408
+ which needs `GatewaySystem`, or the SOAP console without the gateway. The words are joined,
409
+ so no quoting is needed. Three names are shortcuts that send the exact strings the server's
410
+ addins match:
322
411
 
323
412
  | Shortcut | Sends | Effect |
324
413
  |---|---|---|
325
- | `--show-schedule` | `tell agenda schedule` | lists every scheduled action and its next run (was `--schedule`) |
326
- | `--refresh-agenda` | `tell agenda refresh` | AGENDA rereads every schedule now |
327
- | `--flush-cache` | `tell http cache flush` | clears the design cache and all action class loaders |
328
- | `--refresh-design APP_ID` | `tell agenda run .../RefreshDesign?&AppID=N` | rebuilds the application's design from its template |
329
- | `--run PATH` | `tell agenda run /group/app.pma/action` | runs the action at that local path now |
414
+ | `schedule` | `tell agenda schedule` | lists every scheduled action and its next run |
415
+ | `refresh-agenda` | `tell agenda refresh` | AGENDA rereads every schedule now |
416
+ | `flush-cache` | `tell http cache flush` | clears the design cache and all action class loaders |
330
417
 
331
418
  `tell http flush cache` is **not** a valid command: the HTTP addin only matches
332
- `cache flush`, and anything else does nothing, silently. Use `--flush-cache`.
333
- `execute --schedule` was renamed to `--show-schedule` (`object update --schedule` now sets
334
- a schedule); the old flag runs nothing and prints the new one.
419
+ `cache flush`, and anything else does nothing, silently. Use `flush-cache`.
420
+
421
+ Two console operations act on one application or object, so they live with those nouns:
422
+
423
+ | Command | Sends |
424
+ |---|---|
425
+ | `vortex app refresh-design APP_ID` | `tell agenda run /<webdesign_path>/RefreshDesign?&AppID=N` - rebuilds the design from its template (a clone is then out of date) |
426
+ | `vortex object run ID --app-id N` | `tell agenda run /group/app.pma/name` - runs an ACTION or SCHEDULED_ACTION now |
427
+
428
+ The 8.0 flags (`--show-schedule`, `--refresh-agenda`, `--flush-cache`, `--refresh-design`,
429
+ `--run`) were removed in 8.1.
335
430
 
336
431
  ### Local clones stay in sync
337
432
 
@@ -349,6 +444,7 @@ prints the command to re-sync (`vortex clone APP_ID -s SERVER`).
349
444
  | Command | Local effect |
350
445
  |---|---|
351
446
  | `app update` | details and params; a name or group change moves the folder |
447
+ | `fetch --pull` | the objects' files (renamed with the server), `zbin/` classes and manifest entries (local edits kept - see [Working alongside other agents](#working-alongside-other-agents)) |
352
448
  | `object create` / `update` / `delete` | the object's file and manifest entry (a metadata-only change moves the file but never overwrites its content; an uploaded class also lands in `zbin/`) |
353
449
  | `object copy` | the target application's clone |
354
450
  | `keyword set` / `delete` | the clone's stored keywords |
@@ -360,6 +456,74 @@ A clone stores the design objects, the application's details (with its descripti
360
456
  params, its keywords and its DB connections (id, name, database). `keyword list --local` and
361
457
  `db list --local` read them with no request. Dictionary tables and columns are not stored.
362
458
 
459
+ ### Working alongside other agents
460
+
461
+ Several agents (or people) may edit one application from different sessions, workspaces or
462
+ machines. The server has no locking, so the CLI protects uploads itself, from the clone's
463
+ manifest: it holds the server's copy of every element as the clone last synced it - its
464
+ **base** - and every upload compares three things first:
465
+
466
+ | Server now vs base | Upload |
467
+ |---|---|
468
+ | the same: nobody else wrote it | sent; the base becomes what was sent |
469
+ | already exactly what you are sending | sent (nothing is lost) |
470
+ | anything else | **refused** (`CONFLICT`, nothing sent), naming who changed it and when |
471
+
472
+ Both blobs count: a class uploaded on top of someone else's newer source is refused too.
473
+
474
+ ```
475
+ vortex fetch --app-id 9 # before working: anything outdated?
476
+ vortex object diff --app-id 9 --theirs # what did the server get?
477
+ vortex fetch --app-id 9 --pull [ID...] # bring the clone up to date
478
+ ...edit...
479
+ vortex compile --app-id 9 --object 396 --upload --include-source
480
+ ```
481
+
482
+ **`vortex fetch`** lists the elements that are not in sync - `edited` (yours, ok to
483
+ upload), `outdated` (the server changed the content), `metadata` (the server renamed or
484
+ retyped it, or changed its comment, params, content type or inherit-from - the Server column
485
+ says what, e.g. `renamed home -> landing`), `conflict` (both changed), `unresolved` (a pull
486
+ conflict not merged yet), `new` / `deleted` on the server - and exits 1 when anything needs
487
+ a pull. It writes nothing. Without `--app-id` it checks the cloned application the current
488
+ directory is in, else every clone of the server. A whole application is one request as
489
+ heavy as a clone; IDs are one small request each.
490
+
491
+ **`vortex object diff`** shows the difference between two of the three versions: server ->
492
+ local by default (what an upload would change), `--mine` base -> local (your edits; no
493
+ request) or `--theirs` base -> server (what changed there). Without IDs it shows every
494
+ element that differs. With git installed it runs `git diff --no-index` on temporary files -
495
+ colour, `--stat`, `--word-diff` - otherwise Python's difflib. Everything after `--` goes to
496
+ `git diff` as-is, after vortex's own options so it wins: options only, values attached
497
+ (`-- --ignore-all-space --diff-algorithm=histogram -U10`). `--write DIR` runs no diff and
498
+ writes the versions as files instead - `DIR/base`, `DIR/local`, `DIR/server`, each
499
+ `<TYPE>/<file>` - for any other tool (`git diff --no-index DIR/base DIR/server`,
500
+ `git merge-file`, an IDE).
501
+
502
+ **`vortex fetch --pull`** brings the server's changes in from the same request. Metadata is
503
+ always the server's: a rename moves your file - edits and all - to the new name, and the
504
+ comment, params and the rest are updated in the clone. Content: it takes the server's copy
505
+ wherever that loses nothing (outdated, new, deleted, missing locally) and keeps local edits
506
+ when the server is unchanged. When both
507
+ changed it runs git's 3-way merge (`git merge-file` on base, local and server - temporary
508
+ files, never a repository): edits that don't overlap are **merged** into your file, the
509
+ server's copy becomes the base, and the element is an ordinary edit to review and upload.
510
+ Overlapping edits - or binary content, no git, or `--no-merge` - keep your file, write the
511
+ server's copy to `<app>/.conflicts/<TYPE>/<file>` and make the server's copy the base. While that copy
512
+ exists the element is `unresolved` and every upload of it is refused: merge it into your
513
+ file, delete it, then upload. `--force` takes the server's copy over local edits; it only
514
+ ever changes the clone. A file already where a new element goes is never overwritten - it
515
+ becomes the element's local copy, with the server's under `.conflicts/`; a rename onto such
516
+ a file leaves the element where it is until the file is moved. `--pull` is
517
+ refused for an application while `vortex watch` runs on it.
518
+
519
+ `compile --upload` without `--object` sends only the classes whose `.java` was edited since
520
+ the clone synced it, so it can't re-send an untouched, older class over someone else's.
521
+ `--force` overrides a refusal and discards the server's newer copy; it needs a terminal.
522
+
523
+ The check is a read then a write, not atomic: two uploads of one element within
524
+ milliseconds can still race. Keywords, app params and design params are not covered - each
525
+ write replaces the whole set.
526
+
363
527
  ### Scheduled actions
364
528
 
365
529
  A scheduled action's schedule lives in its `Options` (a comma-separated `name=value` string
@@ -463,7 +627,8 @@ sections). Cloned apps remember which server they came from:
463
627
 
464
628
  - `vortex watch` watches **every** cloned app and uploads each change to the
465
629
  server it was cloned from. Use `--server` to watch a single server only.
466
- - `find`, `grep` and `ls` search across all cloned apps unless `--server` is given.
630
+ - `object grep`, `ls` and `object list` without `--app-id` search across all cloned apps
631
+ unless `--server` is given.
467
632
  - `watch`, `clone` and `clean` take a workspace-wide lock: only one watch at a
468
633
  time, and cloning or cleaning is refused while a watch is running. Commands
469
634
  that write into one cloned application (every mirrored server write,
@@ -476,17 +641,20 @@ sections). Cloned apps remember which server they came from:
476
641
  Every server command targets `-s <server>`, else the `vortex use` default:
477
642
 
478
643
  ```
479
- vortex use dev
644
+ vortex server list # what is defined, and which is the default
645
+ vortex server get dev # every option of one server and where it comes from
646
+ vortex use dev # = vortex server use dev
480
647
  vortex app list
481
648
  ```
482
649
 
483
650
  #### Credentials
484
651
 
485
- `username`/`password` can be left out of `servers.ini`. Each server's
486
- credentials resolve in this order and are only requested when a command
487
- actually connects to that server:
652
+ `username`/`password` can be left out of `servers.ini` (when set there, they win).
653
+ Each server's credentials otherwise resolve in this order and are only requested
654
+ when a command actually connects to that server - `vortex server get NAME` says which
655
+ one applies:
488
656
 
489
- 1. The system keyring - store with `vortex config --set-password -s <server>`
657
+ 1. The system keyring - store with `keyring set vortex-cli:<server> <username>`
490
658
  (requires `pip install keyring`)
491
659
  2. Per-server environment variables `VORTEX_USERNAME_<SERVER>` /
492
660
  `VORTEX_PASSWORD_<SERVER>` (e.g. `VORTEX_PASSWORD_DEV`)
@@ -495,10 +663,15 @@ actually connects to that server:
495
663
 
496
664
  #### Protected Servers
497
665
 
498
- `protected = true` means one thing: `vortex watch` skips the server unless
499
- `--include-protected` is given, so saving a file can never hot-deploy to it by
500
- accident. There are no write confirmations - the gateway's roles are the protection, so run
501
- agents against production with an identity whose roles fit the job.
666
+ `protected = true` means two things:
667
+
668
+ - `vortex watch` skips the server unless `--include-protected` is given, so saving a file
669
+ can never hot-deploy to it by accident.
670
+ - A write or console command never reaches it by default: when a protected server is only
671
+ the `vortex use` default, those commands refuse to run until it is named with `-s`.
672
+
673
+ There are no write confirmations - the gateway's roles are the protection, so run agents
674
+ against production with an identity whose roles fit the job.
502
675
 
503
676
  ### Backend: gateway or webdesign
504
677
 
@@ -516,22 +689,22 @@ webdesign's `/system/webdesign.pma/vortex/<path>` - with three things in front o
516
689
  - **Role checks.** Every route needs a role, checked on the server: `GatewayDesignRead`,
517
690
  `GatewayDesignWrite`, `GatewayDBRead`, `GatewayDBWrite`, `GatewaySystem` and `Admin`
518
691
  (every route). Write implies read. A route the gateway does not map is refused.
519
- `vortex status --show-permissions` shows which commands your identity may run.
692
+ `vortex --show-permissions` shows which commands your identity may run.
520
693
  - **Guards.** The gateway never addresses the Puakma system database (`SYSTEM_DB`), never
521
694
  lets an id from one application be used under another (`NOT_FOUND`), and runs exactly one
522
695
  `SELECT`/`INSERT`/`UPDATE`/`DELETE` per SQL request (`SQL_NOT_ALLOWED`: DDL, `WITH`, and
523
696
  any `;`).
524
- - **Its own routes:** `whoami` (`status`), the server log (`log`), the console (`execute`),
697
+ - **Its own routes:** `whoami` (a bare `vortex`), the server log (`log`), the console (`execute`),
525
698
  `.pmx` export and import.
526
699
 
527
700
  On a server with a blank `gateway_path`:
528
701
 
529
702
  | Command | Behaviour |
530
703
  |---|---|
531
- | `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `libs` | the same routes, sent to webdesign's `/vortex` |
704
+ | `app`, `object`, `keyword`, `db`, `clone`, `compile`, `watch`, `server libs` | the same routes, sent to webdesign's `/vortex` |
532
705
  | `db query` | a CLI-side guard replaces the gateway's: one `SELECT`/`INSERT`/`UPDATE`/`DELETE` statement, refused otherwise with `SQL_NOT_ALLOWED` before anything is sent |
533
706
  | `app export` | webdesign's `ExportPMX` |
534
- | `status` | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
707
+ | `vortex` (no command) | the console `status` command over SOAP (`soap_path`); `--show-permissions` says "no gateway: webdesign direct, no role checks" |
535
708
  | `log` | a `PMALOG` query through webdesign's SQL route, on the system-database connection owned by the ungrouped `puakma` application (found once per run) |
536
709
  | `execute` | the console command over SOAP |
537
710
  | `app import` | unavailable (`UNAVAILABLE`) |
@@ -557,8 +730,11 @@ The server runs compiled classes, not source. There are three ways to get a clas
557
730
  server's `java_home` against the server's own jars, for the server's
558
731
  `java_environment_name` (`JavaSE-17` -> `--release 17`; unset is an error naming the
559
732
  setting). `--upload` sends each compiled class to its existing design element, one at a
560
- time (`--include-source` adds the `.java`); it refuses when anything failed to compile and
561
- never creates elements (`object create` does). ecj is downloaded once from Maven Central;
733
+ time (`--include-source` adds the `.java`): the `--object` ones, else those whose `.java`
734
+ was edited since the clone synced it (`--all`: every one). It refuses when anything failed
735
+ to compile, refuses each element whose server copy changed since (see
736
+ [Working alongside other agents](#working-alongside-other-agents)), and never creates
737
+ elements (`object create` does). ecj is downloaded once from Maven Central;
562
738
  the server's libraries are fetched on first use.
563
739
  - **`vortex object update ID --app-id APP --data Foo.class [--source Foo.java]`** uploads a
564
740
  class you built yourself.
@@ -583,10 +759,10 @@ webdesign `vortex` API (`systemjar` and `libraries`, through the gateway when
583
759
  `gateway_path` is set - `GatewayDesignRead`) and caches them per server under
584
760
  `<workspace>/<host>/.lib/`:
585
761
 
586
- - `clone` does **not** download them; it prints a one-line `vortex libs --refresh -s SERVER`
762
+ - `clone` does **not** download them; it prints a one-line `vortex server libs SERVER --refresh`
587
763
  hint when they are not cached. `compile` and `watch` fetch them on first use.
588
- - `vortex libs` shows what's cached for each server; `vortex libs --refresh` re-downloads
589
- (add `-s <server>` for one server), e.g. after a server upgrade.
764
+ - `vortex server libs` shows what's cached for each server; `vortex server libs --refresh`
765
+ re-downloads (name a server for just that one), e.g. after a server upgrade.
590
766
  - Each server's VS Code workspace (`vortex code -s <server>`) uses that server's own cached
591
767
  jars, so identical class names on different servers/versions never cross-contaminate.
592
768
  - `vortex clean` keeps each host's `.lib` cache; pass `--include-libs` to remove it as well.
@@ -595,8 +771,13 @@ webdesign `vortex` API (`systemjar` and `libraries`, through the gateway when
595
771
 
596
772
  Every `db` command takes `--app-id` (every database route is app-scoped) and a `DB`: the
597
773
  connection name, the database name or the connection ID, resolved within that application.
774
+ `db list` is the exception: without `--app-id` it lists every application's connections on
775
+ the server (one request per application), and every row names its application (id, group
776
+ and name). `--local` reads the clones instead - the `--app-id` one, else every clone of the
777
+ server.
598
778
 
599
779
  ```
780
+ vortex db list # every application on the server
600
781
  vortex db list --app-id 9
601
782
  vortex db query bettrackr --app-id 9 "SELECT * FROM account" --limit 5
602
783
  vortex db query 3 --app-id 9 --file report.sql --json