@quatronic/qore 0.5.0-rc.4 → 0.5.0-rc.5
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 +34 -753
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,758 +33,30 @@ qore traces --env stag --slower-than 1s # slow requests
|
|
|
33
33
|
qore logs --env stag --level error # error logs
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
###
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
qore login
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`qore
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
matched against your local checkouts); else an interactive pick. `qore dev`
|
|
61
|
-
and `qore db erd` take the reference as an argument (`qore dev <app>`); `qore
|
|
62
|
-
dev`, `qore db erd`, `qore env pull`, `qore run` and `qore status` take
|
|
63
|
-
`--project`. `qore run --project`
|
|
64
|
-
only chooses which module's secrets are used; the command still runs in the
|
|
65
|
-
current directory. `qore env pull --project` writes into the located module,
|
|
66
|
-
and a relative `--target` then resolves against that project directory, not
|
|
67
|
-
the directory you ran it from.
|
|
68
|
-
|
|
69
|
-
A repository that is no module counts as outside one: standing in some other
|
|
70
|
-
codebase, `qore dev` asks the portal about its remotes and, when they match no
|
|
71
|
-
module (or it has no remote Qore can match), offers your projects just the
|
|
72
|
-
same. A repository inside a known project is never asked about, and a portal
|
|
73
|
-
that cannot answer keeps today's error.
|
|
74
|
-
|
|
75
|
-
Logged out with a projects folder set, the local lookup still runs first: a
|
|
76
|
-
folder that holds no projects gives `QORE_PROJECT_NOT_FOUND`; otherwise the
|
|
77
|
-
project is located exactly as when logged in (a match, a picker, or
|
|
78
|
-
`QORE_CONTEXT_REQUIRED` without a terminal), and the login error comes from
|
|
79
|
-
the portal lookup that follows. Only without a projects folder does a logged-out
|
|
80
|
-
command outside a project go straight to the login error.
|
|
81
|
-
|
|
82
|
-
Pass `--module <slug|id>` to pick a module explicitly (it keeps its meaning and,
|
|
83
|
-
like `--app`, still uses the portal lookup when you are not in a project); the flag always wins
|
|
84
|
-
over the git remote. Inside a repository, `qore` still looks up the remote's
|
|
85
|
-
own module (from the cache, or with one extra request) only so the context
|
|
86
|
-
line can tell you when the flag overrides it. If a module is linked to more
|
|
87
|
-
than one app you can read, add `--app <slug|id>` to disambiguate.
|
|
88
|
-
|
|
89
|
-
Every context-aware command prints a context line to stderr (never stdout,
|
|
90
|
-
so it's safe to pipe `--json` output):
|
|
91
|
-
|
|
92
|
-
```
|
|
93
|
-
→ <Tenant> / <App> / <module> (<source>)
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
`<source>` is the remote name that resolved it (`origin`, `upstream`, …),
|
|
97
|
-
or `--module` when you passed the flag. If `--module` resolves to a
|
|
98
|
-
different module than the repository's own remote would have, it reads
|
|
99
|
-
`--module, overrides <remote>`. With `--json`, this same information is
|
|
100
|
-
under `data.context` instead, and nothing about it goes to stderr.
|
|
101
|
-
|
|
102
|
-
#### `qore status`
|
|
103
|
-
|
|
104
|
-
Shows deployment and health per environment for the current module:
|
|
105
|
-
|
|
106
|
-
```sh
|
|
107
|
-
qore status
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
| Column | Meaning |
|
|
111
|
-
|--------|---------|
|
|
112
|
-
| ENV | Environment name |
|
|
113
|
-
| DEPLOY | Deployment status, or `paused` |
|
|
114
|
-
| COMMIT | Deployed commit SHA |
|
|
115
|
-
| DEPLOYED | How long ago that commit was deployed |
|
|
116
|
-
| APP HEALTH | The app's public health check (not the module's) |
|
|
117
|
-
|
|
118
|
-
#### `qore env pull`
|
|
119
|
-
|
|
120
|
-
Writes this module's local secrets into an env file in the current
|
|
121
|
-
repository:
|
|
122
|
-
|
|
123
|
-
```sh
|
|
124
|
-
qore env pull
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- The target file defaults to the module type's own convention (e.g.
|
|
128
|
-
`.env.local`), or `.qore.json`'s `envFile`, or `--target <path>` — always
|
|
129
|
-
required to stay inside the repository. `envFile` resolves against the
|
|
130
|
-
repository root; `--target` against the current directory, or with
|
|
131
|
-
`--project` against the located project directory.
|
|
132
|
-
- If the file doesn't exist yet, it's seeded from `.env.example` when one is
|
|
133
|
-
present.
|
|
134
|
-
- Existing values you've hand-edited are kept by default. A key the portal
|
|
135
|
-
manages (e.g. `CONN_*`, `DATABASE_URL`) is always taken from the portal.
|
|
136
|
-
For any other key that differs between your file and the portal, pass
|
|
137
|
-
`--use-portal` to take the portal's value, or answer the interactive
|
|
138
|
-
prompt per key (which shows only the **length** of each value, never its
|
|
139
|
-
content — see "Values are never printed" below).
|
|
140
|
-
- The file is written with mode `0600` via a temp file in the same
|
|
141
|
-
directory, then renamed over the target — it's never truncated in place.
|
|
142
|
-
(On Windows, POSIX file modes don't apply — setting `0600` there is a
|
|
143
|
-
no-op; there's no equivalent file-permission hardening on that platform.)
|
|
144
|
-
- When the repository has a `mobile/` directory (an Expo app), the pull also
|
|
145
|
-
writes `mobile/.env.local` with the app's **public** staging config:
|
|
146
|
-
`EXPO_PUBLIC_SERVER_URL`, `EXPO_PUBLIC_SENTRY_DSN` and
|
|
147
|
-
`EXPO_PUBLIC_QORE_ENV=staging`. qore owns those three keys and overwrites
|
|
148
|
-
them; every other line in the file is kept. A value the portal does not have
|
|
149
|
-
yet is left out rather than written empty, because an empty `EXPO_PUBLIC_*`
|
|
150
|
-
value would override the one baked into `app.config.ts`. Until staging is
|
|
151
|
-
deployed there is no server URL; the pull says so, and running it again
|
|
152
|
-
after the deploy fills it in. A portal too old to serve this config is
|
|
153
|
-
skipped with a note, and a failed fetch warns without failing the pull.
|
|
154
|
-
`--json` reports it as
|
|
155
|
-
`mobile: { target, environment, serverUrl, sentryDsn: <set?>, written }`
|
|
156
|
-
(`null` without a `mobile/` directory). `qore dev` does not write this file.
|
|
157
|
-
|
|
158
|
-
**First use of a repository** requires confirmation — see "Trust on first
|
|
159
|
-
use" below. **Values are never printed**: not in `qore env pull`'s output,
|
|
160
|
-
not in the interactive conflict prompt, not in `--verbose` logs, and not in
|
|
161
|
-
the portal's own audit trail, which records key names only (see
|
|
162
|
-
`app.local_env.fetched`).
|
|
163
|
-
|
|
164
|
-
#### `qore roles`
|
|
165
|
-
|
|
166
|
-
Run in the app's frontend module. `qore roles sync` does the announcing alone:
|
|
167
|
-
local learns every role in `permissions.ts` and your own roles stay as they are.
|
|
168
|
-
`qore roles use inspector` reads the roles in
|
|
169
|
-
`src/lib/permissions.ts`, tells the portal they exist on `local` (only there —
|
|
170
|
-
staging and production learn roles from the code that environment deploys:
|
|
171
|
-
`main` for staging, the `production` branch for production), and makes exactly
|
|
172
|
-
the named roles yours on `local`. Sign out and back in to the local app
|
|
173
|
-
afterwards. `qore roles list` shows the roles in your code, the ones `local`
|
|
174
|
-
knows, and yours. Needs write on the module, like `qore env pull`. An announced
|
|
175
|
-
role stays on `local`; nothing removes it automatically.
|
|
176
|
-
|
|
177
|
-
#### `qore run`
|
|
178
|
-
|
|
179
|
-
Runs a command with this module's local secrets injected into its
|
|
180
|
-
environment, without ever writing them to disk:
|
|
181
|
-
|
|
182
|
-
```sh
|
|
183
|
-
qore run -- node server.js
|
|
184
|
-
qore run -- pnpm dev
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
- Secrets are fetched fresh on every `run` — never cached — merged with
|
|
188
|
-
your current environment, and passed only to the child process.
|
|
189
|
-
- The command runs without a shell (`shell: false`); everything after `--`
|
|
190
|
-
is passed to it verbatim, including its own flags (a `--json` or
|
|
191
|
-
`--no-input` after `--` is the child's, never `qore`'s own). On Windows,
|
|
192
|
-
this is true in spirit but not literally for `.cmd` shims (e.g. `pnpm`,
|
|
193
|
-
`npm`, or anything installed as a `.cmd` wrapper): `cross-spawn` runs
|
|
194
|
-
those through `cmd.exe /d /s /c` under the hood, with its own escaping.
|
|
195
|
-
Pressing Ctrl+C there can also surface cmd's own
|
|
196
|
-
`Terminate batch job (Y/N)?` prompt.
|
|
197
|
-
- The child's exit code, or the signal it was killed with (e.g. Ctrl+C →
|
|
198
|
-
128+signal), becomes `qore run`'s own exit code.
|
|
199
|
-
- **Secrets live in the child's environment**, which is inherited by any
|
|
200
|
-
process the child spawns (its grandchildren) and is readable by other
|
|
201
|
-
processes running as the same user (`/proc/<pid>/environ`, `ps eww`) —
|
|
202
|
-
no worse than a `.env.local` on disk, but worth knowing before running an
|
|
203
|
-
untrusted command this way.
|
|
204
|
-
|
|
205
|
-
#### `qore dev`
|
|
206
|
-
|
|
207
|
-
Starts this module's dev server, from a trusted repository:
|
|
208
|
-
|
|
209
|
-
```sh
|
|
210
|
-
qore dev
|
|
211
|
-
```
|
|
212
|
-
|
|
213
|
-
- **Context + trust**, like `qore run`/`qore env pull` — the same
|
|
214
|
-
`--module`/`--app` resolution, the same trust-on-first-use prompt
|
|
215
|
-
(`--yes` to skip it non-interactively).
|
|
216
|
-
- **Install**, if needed: the package manager comes from package.json's
|
|
217
|
-
`"packageManager": "<pnpm|npm|yarn>@<version>"` field, or (absent that)
|
|
218
|
-
whichever lockfile is present. `node_modules` missing, or older than the
|
|
219
|
-
lockfile, triggers an install; `--no-install` skips this step entirely.
|
|
220
|
-
- **Env merge**: this module's local secrets are pulled and merged into its
|
|
221
|
-
env file on disk (same target and conflict rules as `qore env pull`) —
|
|
222
|
-
unlike `qore run`, which only injects them into the child's environment.
|
|
223
|
-
- **`db:up`**, if the repository declares one: run automatically (unless
|
|
224
|
-
`--no-services`), then `qore dev` waits for `DB_PORT` to accept
|
|
225
|
-
connections before continuing — bounded by `--wait-timeout <s>` (default
|
|
226
|
-
`60`), which also bounds a workspace's provider-port wait (below). A
|
|
227
|
-
service that needs Docker and finds it missing or not running fails
|
|
228
|
-
fast, naming which.
|
|
229
|
-
- **Port check**: `PORT` from the merged env must be free; qore never
|
|
230
|
-
picks, shifts or suggests a port (see "Ports never move" below).
|
|
231
|
-
- **Runs `dev` exactly as `qore run` would** — same package manager, same
|
|
232
|
-
child-process semantics, same exit-code passthrough. The script name is
|
|
233
|
-
`"dev"` by default, or `dev.script` in `.qore.json` (below).
|
|
234
|
-
- `qore dev` in a module repository has no `--json`: the dev server's own
|
|
235
|
-
output passes straight through untouched.
|
|
236
|
-
|
|
237
|
-
A legacy backend `dev` script (from older templates, which need a
|
|
238
|
-
build and a `.env` first) fails fast with `QORE_DEV_UNSUPPORTED`, naming
|
|
239
|
-
the old script and the fix — the same code a repository with no `dev`
|
|
240
|
-
script at all, or an unsupported package manager, gets.
|
|
241
|
-
|
|
242
|
-
**Offline start**: if the portal is unreachable, `qore dev`
|
|
243
|
-
still starts — but only when the repository is already trusted **and** its
|
|
244
|
-
env file already exists on disk (from a previous `qore dev`/`env pull`).
|
|
245
|
-
It starts from that file as last written, with a warning that values may
|
|
246
|
-
be stale. This is the one place `qore` starts without confirming secrets
|
|
247
|
-
are current; every other command still requires the portal. An untrusted
|
|
248
|
-
repository, or one with no env file yet, surfaces the original
|
|
249
|
-
"portal unreachable" error instead.
|
|
250
|
-
|
|
251
|
-
**In a workspace root** (see "Workspaces" below), `qore dev` starts every
|
|
252
|
-
present module of the app, in dependency order, from one process — unless
|
|
253
|
-
`--module <slug>` is passed, which takes the module flow above instead
|
|
254
|
-
(run it from inside that module's own repository, not the workspace root
|
|
255
|
-
itself, or it fails with "Not inside a module repository"). `--app` is
|
|
256
|
-
refused in a workspace root: an app is already implied by
|
|
257
|
-
`qore.workspace.json`.
|
|
258
|
-
|
|
259
|
-
**Shared checkouts.** In the shared layout the modules start from
|
|
260
|
-
`modules/<slug>`. A module that another app's `qore dev` already runs from
|
|
261
|
-
the same checkout, with its port listening, is not started a second time:
|
|
262
|
-
|
|
263
|
-
- a **backend** is reused (`<module> running in qore dev for <app> (pid
|
|
264
|
-
<pid>)`) and listed with that app's URL in the summary. This needs the
|
|
265
|
-
portal capability `module.local-env-app-neutral`; without it the module is
|
|
266
|
-
listed under `! Not running:` as `running in qore dev for <app>`;
|
|
267
|
-
- a **frontend** is never reused, because its environment is per app: it is
|
|
268
|
-
listed as not running the same way.
|
|
269
|
-
|
|
270
|
-
A reused module is only watched. When its port is free for two checks in a
|
|
271
|
-
row, qore prints `<module> stopped with qore dev for <app> — restart qore
|
|
272
|
-
dev to run it here` (a `reused-stopped` event with `--json`) and does not
|
|
273
|
-
restart it. If every module is reused, nothing starts: `qore dev` just
|
|
274
|
-
watches, exits `0` once they have all stopped, and `130` (or 128 + signal)
|
|
275
|
-
on Ctrl+C or a signal.
|
|
276
|
-
|
|
277
|
-
**Ports never move.** If `PORT` (or, for a workspace, a `db:up`'s
|
|
278
|
-
`DB_PORT`) is already taken, `qore dev` fails with `QORE_PORT_IN_USE`
|
|
279
|
-
naming the port and, when it can determine one, the process already
|
|
280
|
-
holding it — it never picks a different port, shifts one, or suggests an
|
|
281
|
-
alternative. Ports are part of the local contract between modules
|
|
282
|
-
(`CONN_*_URL` values point at fixed ports), so moving one silently would
|
|
283
|
-
break every other module that depends on it.
|
|
284
|
-
|
|
285
|
-
#### What qore diagnoses
|
|
286
|
-
|
|
287
|
-
Beyond the checks above, `qore dev` recognises common failure shapes and adds
|
|
288
|
-
a hint rather than leaving a bare error (spec §14.2):
|
|
289
|
-
|
|
290
|
-
- **Docker not running**: in a TTY, waits up to 120 s for it (`Ctrl+C` to
|
|
291
|
-
stop) instead of failing immediately; non-interactive or `--json` fails at
|
|
292
|
-
once.
|
|
293
|
-
- **A leftover `qore dev` holds the port**: in a TTY, offers to stop it
|
|
294
|
-
(`Stop the previous qore dev (pid N)?`); outside a TTY it's just
|
|
295
|
-
`QORE_PORT_IN_USE`.
|
|
296
|
-
- **The dev server exits within seconds of starting**: its tail output is
|
|
297
|
-
classified into a hint — a missing dependency (`Cannot find module`), an
|
|
298
|
-
invalid/missing env var (a `ZodError`'s keys, never values), a port taken
|
|
299
|
-
after the free-port check (`EADDRINUSE`), or a Linux file-watcher limit —
|
|
300
|
-
printed after the exit, never rewriting the server's own output. An
|
|
301
|
-
unrecognised failure falls back to the tool's last lines plus the command
|
|
302
|
-
that ran, never a bare "failed".
|
|
303
|
-
- **The portal is unreachable behind a corporate proxy**: the connect error
|
|
304
|
-
names `HTTPS_PROXY`/`NODE_EXTRA_CA_CERTS` as things to check.
|
|
305
|
-
|
|
306
|
-
`QORE_DEV_EXITED` is not a thrown code: when none of this applies, `qore dev`
|
|
307
|
-
just passes the child process's own exit code through.
|
|
308
|
-
|
|
309
|
-
#### `qore doctor`
|
|
310
|
-
|
|
311
|
-
Runs the same checks `qore` makes before other commands, on demand, without
|
|
312
|
-
doing anything else — the first thing to run when something's wrong, and
|
|
313
|
-
`--json` makes it attachable to a support ticket:
|
|
314
|
-
|
|
315
|
-
```sh
|
|
316
|
-
qore doctor
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
- Prints one line per check: `✓` ok, `!` warning, `✗` failing.
|
|
320
|
-
- Checks qore's own version, Node, git, GitHub SSH, Docker + compose, every
|
|
321
|
-
logged-in portal's session, clock skew, and — inside a workspace or module
|
|
322
|
-
repository — each module's port, access and database.
|
|
323
|
-
- **Never fetches the local env and never starts anything.** Ports are read
|
|
324
|
-
from the env file already on disk; access comes from the ordinary
|
|
325
|
-
`GET /api/cli/v1/me` and `.../modules` routes.
|
|
326
|
-
- Exit code `0` only when every check passes; a `!` warning never fails it,
|
|
327
|
-
only a `✗` does.
|
|
328
|
-
- No login profile at all is a warning, not a failure.
|
|
329
|
-
- `--json` shape: success is `{"ok":true,"data":{"results":[...],"context":{...}}}`;
|
|
330
|
-
on failure it's `{"ok":false,"error":{...,"details":{"results":[...],"context":{...}}}}`
|
|
331
|
-
— the full report is always in `details`, even though the top-level error
|
|
332
|
-
names only the first failing check. A check that throws still lets the
|
|
333
|
-
rest run; it just becomes a `fail` with that error attached.
|
|
334
|
-
|
|
335
|
-
#### `qore db erd`
|
|
336
|
-
|
|
337
|
-
Opens this module's data model — tables, columns, keys and the relations
|
|
338
|
-
between them — in your browser, read live from the module's **local**
|
|
339
|
-
Postgres:
|
|
340
|
-
|
|
341
|
-
```sh
|
|
342
|
-
qore db erd
|
|
343
|
-
qore db erd shop # from anywhere (see qore init); no ref → a pick
|
|
344
|
-
qore db erd --no-open # just print the URL
|
|
345
|
-
qore db erd --port 4100
|
|
346
|
-
qore db erd --json > model.json
|
|
347
|
-
```
|
|
348
|
-
|
|
349
|
-
- **Context + trust**, like `qore run`: the same `--module`/`--app`
|
|
350
|
-
resolution and the same trust-on-first-use prompt (`--yes` to skip it).
|
|
351
|
-
- **In a workspace root** it shows the whole app; **in a module checkout of
|
|
352
|
-
a workspace** it asks whether you want the whole app or only that module
|
|
353
|
-
(without a terminal, or with `--module`, it stays the module).
|
|
354
|
-
- **Where the database comes from:** `DATABASE_URL` in the module's env file
|
|
355
|
-
(`.env.local` for a frontend module, otherwise `.env`; or the `envFile`
|
|
356
|
-
named in `.qore.json`); when that file is missing or has no (or a blank)
|
|
357
|
-
`DATABASE_URL`, it is fetched from the portal for this run only — never
|
|
358
|
-
written. A module with no `DATABASE_URL` in either has no database to show.
|
|
359
|
-
The URL is whatever the env file holds, or what the portal's local-env
|
|
360
|
-
endpoint returns (the local development database).
|
|
361
|
-
- **Read-only.** The session is opened with `default_transaction_read_only`
|
|
362
|
-
on; the viewer has no write route; only structure is read — never rows.
|
|
363
|
-
- **Local only.** The server listens on `127.0.0.1` on a free port (or
|
|
364
|
-
`--port`) and refuses requests whose `Host` is not `127.0.0.1:<port>` or
|
|
365
|
-
`localhost:<port>`. Stop it with Ctrl+C (exit code 130).
|
|
366
|
-
- **Fresh on every load.** Each page load opens a new connection and
|
|
367
|
-
introspects again, so after a migration — or a database reset or restart —
|
|
368
|
-
a refresh is enough.
|
|
369
|
-
- **The viewer** is qore's own, bundled with the CLI and fully offline.
|
|
370
|
-
Tables are listed in a palette on the left: drag one onto the canvas, or
|
|
371
|
-
click it, to place it, and use `+ N related` to pull in the tables it
|
|
372
|
-
references or is referenced by. Switch between Keys only and All columns,
|
|
373
|
-
Tidy up to re-layout, Fit to frame everything. `/` searches, `Delete`
|
|
374
|
-
removes the selected table, `R` adds its related tables, `Esc` deselects.
|
|
375
|
-
The URL hash is the canvas: a link only opens again on the same port, so
|
|
376
|
-
share it with a fixed `--port`, or copy just the `#…` part. The reload
|
|
377
|
-
button in the top strip re-reads the database without losing the canvas.
|
|
378
|
-
Light or dark follows the system, with a toggle.
|
|
379
|
-
- **A whole app.** In an app's workspace root (the folder with
|
|
380
|
-
`qore.workspace.json`, no `--module`) the canvas shows every module's
|
|
381
|
-
database at once: one lane per database (modules that share a database
|
|
382
|
-
share a lane), ordered so that what others build on sits left. Foreign keys
|
|
383
|
-
stay inside a lane; a reference that crosses databases cannot be a foreign
|
|
384
|
-
key, so it is declared as a comment on the column that holds the id:
|
|
385
|
-
`COMMENT ON COLUMN app.favourite_spots.spot_id IS '-> api:public.spots.id'`
|
|
386
|
-
(the `module:` part is optional, free text may follow). The viewer draws it
|
|
387
|
-
as a dashed cable and names the owning lane in the detail pane. A module
|
|
388
|
-
without a database has no lane; a database that is down leaves the others
|
|
389
|
-
on the canvas, with the error in its lane head.
|
|
390
|
-
- `--json` prints `{"ok":true,"data":{"context","source","model"}}`, where
|
|
391
|
-
`data.model` is the database model the viewer loads and `data.source` is
|
|
392
|
-
`env-file` or `portal`, and starts nothing;
|
|
393
|
-
combining it with `--port` or `--no-open` is a usage error (exit 2). In a
|
|
394
|
-
workspace root it is `{"ok":true,"data":{"context","databases","model"}}`:
|
|
395
|
-
`context.module` is `null`, `context.modules` lists every module with its
|
|
396
|
-
lane, `databases` holds one entry per lane with its source, and the model
|
|
397
|
-
carries `database` on every table plus `databases` and `refs`. It needs every
|
|
398
|
-
database to be reachable.
|
|
399
|
-
- Not reachable: `QORE_SERVICE_UNHEALTHY` naming the port and the fix
|
|
400
|
-
(`qore dev` / `pnpm db:up`); a taken (or reserved) `--port`: `QORE_PORT_IN_USE`.
|
|
401
|
-
|
|
402
|
-
#### `.qore.json`
|
|
403
|
-
|
|
404
|
-
An optional file at the repository root that configures `qore env pull`
|
|
405
|
-
and `qore dev` for that repository. Schema:
|
|
406
|
-
[`schema/qore.schema.json`](./schema/qore.schema.json).
|
|
407
|
-
|
|
408
|
-
```json
|
|
409
|
-
{
|
|
410
|
-
"$schema": "https://unpkg.com/@quatronic/qore/schema/qore.schema.json",
|
|
411
|
-
"envFile": ".env.local",
|
|
412
|
-
"localSecrets": ["MY_LOCAL_OVERRIDE"],
|
|
413
|
-
"dev": {
|
|
414
|
-
"install": true,
|
|
415
|
-
"services": ["db:up"],
|
|
416
|
-
"script": "dev"
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
```
|
|
420
|
-
|
|
421
|
-
- **`dev.install`** — run the package manager's install when needed
|
|
422
|
-
(default `true`).
|
|
423
|
-
- **`dev.services`** — package.json scripts to run before the dev server,
|
|
424
|
-
in order (default: `["db:up"]` if that script exists, else none — each
|
|
425
|
-
name must be a real script in package.json).
|
|
426
|
-
- **`dev.script`** — the package.json script `qore dev` runs (default
|
|
427
|
-
`"dev"`).
|
|
428
|
-
|
|
429
|
-
It never holds a portal URL, tenant, app or module id — those are always
|
|
430
|
-
resolved from the git remote or `--module`/`--app`, never committed.
|
|
431
|
-
|
|
432
|
-
#### Trust on first use
|
|
433
|
-
|
|
434
|
-
The first time you run `qore env pull` or `qore run` against a given
|
|
435
|
-
repository (for a given module), `qore` asks you to confirm before pulling
|
|
436
|
-
secrets into it — trust-on-first-use, recorded locally, not a portal-side
|
|
437
|
-
grant. Pass `--yes` to trust non-interactively (CI, scripts) instead of
|
|
438
|
-
being prompted.
|
|
439
|
-
|
|
440
|
-
#### Resolution cache
|
|
441
|
-
|
|
442
|
-
Resolved `git remote` → module lookups are cached at
|
|
443
|
-
`<config dir>/qore/cache/repos.json` so repeat commands in the same
|
|
444
|
-
repository skip an extra request. It's pure cache — deleting the file is
|
|
445
|
-
always harmless, at worst the next command re-resolves.
|
|
446
|
-
|
|
447
|
-
If a repository resolves to no module on any portal you're logged in to,
|
|
448
|
-
the error lists the portals it tried and, when a staging repository looks
|
|
449
|
-
likely, suggests `qore login --portal staging`.
|
|
450
|
-
|
|
451
|
-
### Projects folder & `qore init`
|
|
452
|
-
|
|
453
|
-
`qore init` is the guided setup. It runs four steps and reports each as
|
|
454
|
-
`done`, `already` or `skipped`, so running it again is safe:
|
|
455
|
-
|
|
456
|
-
1. **Projects folder**: where your apps live (default `~/qore`; `--root <path>`
|
|
457
|
-
sets it without asking). Nothing existing is moved.
|
|
458
|
-
2. **Login**: skipped when you are already logged in, and with `--no-input`.
|
|
459
|
-
3. **Tenant**: `already` when a tenant is active (`done` right after the login
|
|
460
|
-
step logged you in). Otherwise skipped with
|
|
461
|
-
`--no-input` or when you are not logged in (run `qore tenant use <slug>`
|
|
462
|
-
later), skipped with no tenants, selected without a prompt when you have
|
|
463
|
-
one, a picker when you have several.
|
|
464
|
-
4. **First app**: `--clone <app>` (with `--tenant <slug>` to disambiguate)
|
|
465
|
-
clones it; interactively it asks.
|
|
466
|
-
|
|
467
|
-
With `--json`, stdout is one document: `{"projectsRoot": "<path>|null",
|
|
468
|
-
"steps": {"root"|"login"|"tenant"|"clone": {"status", "detail?"}}}`.
|
|
469
|
-
|
|
470
|
-
Apps clone into `<root>/<tenant>/apps/<app>/` and their modules into
|
|
471
|
-
`<root>/<tenant>/modules/<module>`, shared by every app of the tenant that
|
|
472
|
-
uses them (see "Shared module checkouts" below). A checkout outside the
|
|
473
|
-
folder registers itself the first time you use it (`qore clone <app> <dir>`,
|
|
474
|
-
`qore dev`, ...); a registered checkout that was deleted is dropped. With a
|
|
475
|
-
projects folder set, `qore dev`, `qore env pull`, `qore run` and `qore status`
|
|
476
|
-
work from any directory (see Repository context).
|
|
477
|
-
|
|
478
|
-
```sh
|
|
479
|
-
qore config root # show the folder and how many projects it holds
|
|
480
|
-
qore config root <path> # set it
|
|
481
|
-
qore config root --unset # clear it; known projects stay findable
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
`qore doctor` checks that the folder exists and is writable.
|
|
485
|
-
|
|
486
|
-
### Workspaces
|
|
487
|
-
|
|
488
|
-
`qore clone` sets up a local directory for an app and its modules, each in
|
|
489
|
-
its own repository; `qore sync` keeps them in step with the app afterwards.
|
|
490
|
-
With a projects folder set, modules are shared between apps (next section);
|
|
491
|
-
without one, or with an explicit `qore clone <app> <dir>`, the directory
|
|
492
|
-
holds the module repositories itself and the rest of this section applies
|
|
493
|
-
as written.
|
|
494
|
-
|
|
495
|
-
```sh
|
|
496
|
-
qore clone <app> # clones every module of <app> into ./<app-slug>
|
|
497
|
-
qore clone <app> <dir> # ...into <dir> instead
|
|
498
|
-
cd <app-slug>
|
|
499
|
-
qore status # app-level table, one row per module/environment
|
|
500
|
-
cd <module>
|
|
501
|
-
qore env pull # no trust prompt — a clone made by qore is already trusted
|
|
502
|
-
cd ..
|
|
503
|
-
qore sync # clone any module that's new, fetch the rest
|
|
504
|
-
qore sync --pull # ...and fast-forward every clean repository with an upstream
|
|
505
|
-
qore code [app] [-- <claude args>] # start Claude Code in the app's frontend, every module added (--add-dir)
|
|
506
|
-
```
|
|
507
|
-
|
|
508
|
-
- **Where it clones.** Without `[dir]` and with a projects folder set, `qore
|
|
509
|
-
clone` puts the app folder at `<root>/<tenant>/apps/<app>` and its modules
|
|
510
|
-
in `<root>/<tenant>/modules/`. Without a projects folder it behaves as
|
|
511
|
-
described above and prints a tip to run `qore init`; with an explicit `[dir]`
|
|
512
|
-
it clones into `<dir>` as before, and with a projects folder set the tip
|
|
513
|
-
says that `qore init` shares modules between apps.
|
|
514
|
-
- **`--protocol https|ssh`** picks the clone URL (default `https`). `ssh`
|
|
515
|
-
rewrites `https://github.com/o/r` to `git@github.com:o/r.git`; your own
|
|
516
|
-
git `insteadOf` config still applies on top of either.
|
|
517
|
-
- **`--tenant <slug>`** on `qore clone` disambiguates an app slug that
|
|
518
|
-
exists in more than one tenant you have access to.
|
|
519
|
-
- **The workspace file** is `qore.workspace.json` at the directory `qore
|
|
520
|
-
clone` created, holding `{"schemaVersion": 1, "portal": "<apiOrigin>",
|
|
521
|
-
"appId": "<uuid>"}`. It never lists modules — those always come from the
|
|
522
|
-
portal, so a module added to the app later shows up on the next `qore
|
|
523
|
-
sync` with no local change needed. `qore` finds it by walking up from the
|
|
524
|
-
current directory (stopping at your home directory). The module commands
|
|
525
|
-
(`env pull`, `run`, …), `qore status` and `qore sync` pick up its portal
|
|
526
|
-
(and, for a module shared by several apps, its app) automatically when run
|
|
527
|
-
from inside the workspace — including from a module's own repository;
|
|
528
|
-
`qore clone`, `qore whoami` and `qore tenant` do not read it. An explicit
|
|
529
|
-
`--portal` flag always wins over it. `qore status` shows the app-level
|
|
530
|
-
table only when run in the directory that holds `qore.workspace.json`
|
|
531
|
-
itself (not inside one of its module repositories, which shows that
|
|
532
|
-
module).
|
|
533
|
-
- **Nothing is ever deleted, moved or overwritten** (in this layout; the
|
|
534
|
-
shared layout moves and removes only with your consent, below). A present module
|
|
535
|
-
directory is left exactly as it is; `sync` only fetches into it, and
|
|
536
|
-
only fast-forwards with `--pull`, and only when the tree is clean and has
|
|
537
|
-
an upstream — a dirty tree, one with no upstream, or one that would need
|
|
538
|
-
a merge is reported, never touched. `sync` runs a plain `git fetch` (no
|
|
539
|
-
`--prune`). A module's directory whose `origin` doesn't point at that
|
|
540
|
-
module's repository is reported as re-pointed, and one that isn't a git
|
|
541
|
-
repository at all is reported too — neither is repaired; move it aside
|
|
542
|
-
and run `qore sync` again. A repository directory in the workspace that
|
|
543
|
-
isn't one of the app's modules (typically a module that left the app) is
|
|
544
|
-
reported as removed, and left on disk.
|
|
545
|
-
- **A target directory that already holds something else** — someone
|
|
546
|
-
else's files, or another app's or portal's workspace — makes `qore
|
|
547
|
-
clone` fail with `QORE_WORKSPACE_CONFLICT` before writing anything,
|
|
548
|
-
including `qore.workspace.json`. Pick a different directory
|
|
549
|
-
(`qore clone <app> <dir>`).
|
|
550
|
-
- **Per-module clone failures** are diagnosed individually and don't stop
|
|
551
|
-
the rest of the run:
|
|
552
|
-
- `QORE_GITHUB_NOT_LINKED` — your GitHub account isn't linked in Qore;
|
|
553
|
-
link it at the account page, then `qore sync`.
|
|
554
|
-
- `QORE_REPO_NO_ACCESS` — you have no seat on the repository; the error
|
|
555
|
-
names the dev team(s) that build the module and their maintainers to ask.
|
|
556
|
-
- `QORE_REPO_ACCESS_PENDING` — access was granted recently, or your
|
|
557
|
-
GitHub organisation invitation isn't accepted yet; the error links the
|
|
558
|
-
invitation page.
|
|
559
|
-
- `QORE_GIT_AUTH` — git itself couldn't authenticate (no SSH key,
|
|
560
|
-
GitHub's SSH host key not accepted yet, no `gh auth login`, or SSO
|
|
561
|
-
authorisation needed for the org); the error names the fix.
|
|
562
|
-
|
|
563
|
-
`clone`/`sync` exits `0` when at least one module cloned or was already
|
|
564
|
-
present and every failure is one of the first three above
|
|
565
|
-
(`QORE_GITHUB_NOT_LINKED`, `QORE_REPO_NO_ACCESS`,
|
|
566
|
-
`QORE_REPO_ACCESS_PENDING`) — so a developer missing a seat on one module
|
|
567
|
-
of a multi-module app still gets a usable workspace for the rest.
|
|
568
|
-
`QORE_GIT_AUTH` is not an access failure in this sense: it fails the run
|
|
569
|
-
(exit `5`). Any other failure, or a run where nothing succeeded at all,
|
|
570
|
-
exits with that failure's own code. With `--json`, once the per-module
|
|
571
|
-
loop has run its results are under `data.results` (or
|
|
572
|
-
`error.details.results` on failure); an error before that (not logged in,
|
|
573
|
-
no workspace, a conflicting target directory) is an ordinary error
|
|
574
|
-
document without results.
|
|
575
|
-
|
|
576
|
-
#### `qore dev` (workspace root)
|
|
577
|
-
|
|
578
|
-
Run from the directory holding `qore.workspace.json` (not inside one of its
|
|
579
|
-
module repositories — that takes the single-module flow above), starts
|
|
580
|
-
every present module of the app as one supervised run:
|
|
581
|
-
|
|
582
|
-
```sh
|
|
583
|
-
qore dev # every present, writable module, in dependency order
|
|
584
|
-
qore dev --only api,web # just these (comma-separated)
|
|
585
|
-
qore dev --skip docs # all but these
|
|
586
|
-
qore dev --kill-others # the first module to exit stops the rest
|
|
587
|
-
```
|
|
588
|
-
|
|
589
|
-
- Only **present** modules run (cloned into the workspace); one not cloned
|
|
590
|
-
yet is skipped with "not cloned — run `qore sync`". A module without
|
|
591
|
-
write access is skipped too (local secrets need write) naming who to
|
|
592
|
-
ask; its dependents still start, with a warning that the dependency
|
|
593
|
-
they point at (`CONN_*_URL`) won't be running — qore never falls back to
|
|
594
|
-
staging. `--only`/`--skip` select by slug; a skip is never fatal by
|
|
595
|
-
itself, only when it leaves nothing to start.
|
|
596
|
-
- **Every module's install, package-manager check and port check run
|
|
597
|
-
first, for every module, before anything starts.** Problems are
|
|
598
|
-
collected per module and all reported together — one module's install
|
|
599
|
-
failure never hides another's, and nothing starts if any of them failed.
|
|
600
|
-
Installs run with bounded parallelism (4 at a time).
|
|
601
|
-
- **Start order follows `dependsOn`**: providers before their consumers.
|
|
602
|
-
A consumer waits (up to `--wait-timeout`, default `60` s) for each
|
|
603
|
-
dependency's `PORT` to accept connections before its own `dev` script
|
|
604
|
-
runs; a dependency that doesn't come up in time (or that exited) logs a
|
|
605
|
-
warning and the consumer starts anyway. Modules that depend on each
|
|
606
|
-
other (a cycle) start together, without waiting, and the cycle is
|
|
607
|
-
reported once. A backend under `node --watch` that crashes waits for a
|
|
608
|
-
file change instead of exiting, so no exit line appears and its
|
|
609
|
-
consumers wait up to `--wait-timeout`.
|
|
610
|
-
- **`--kill-others`**: the first module to exit on its own (success or
|
|
611
|
-
failure) stops every other module; the others' own exit is then reported
|
|
612
|
-
quietly, not as a failure. Without it, `qore dev` keeps every surviving
|
|
613
|
-
module running until you stop it yourself.
|
|
614
|
-
- **Ctrl+C / SIGTERM/SIGHUP** stops every running module in reverse start
|
|
615
|
-
order, `SIGKILL` after a 10 s grace if one doesn't exit on its own; a
|
|
616
|
-
second Ctrl+C escalates to `SIGKILL` immediately. A `db:up` service a
|
|
617
|
-
module started is left running — `qore dev` only stops the dev servers
|
|
618
|
-
it launched directly. During the checks, Ctrl+C / SIGTERM / SIGHUP
|
|
619
|
-
stops a running install or `db:up` before `qore dev` exits.
|
|
620
|
-
- **Offline start** (same rule as module-level): only when every
|
|
621
|
-
module that would start is already trusted and has an env file on disk;
|
|
622
|
-
one exception fails the whole run with the original error.
|
|
623
|
-
|
|
624
|
-
**Feedback.** Before anything starts, a module not yet cloned is offered as
|
|
625
|
-
`Clone <module>, <module> now with qore sync? [Y/n]` (a TTY only, never
|
|
626
|
-
with `--json`/`--no-input`; `--yes` does not accept it). A module sync
|
|
627
|
-
cannot clone (a conflicting directory, no repository yet, an unsupported
|
|
628
|
-
repository URL, GitHub not linked, no repository access) gets its own
|
|
629
|
-
warning naming the real next step, and no prompt. While preflight runs, one progress line per
|
|
630
|
-
module per step (package manager, install, env, ports) is printed as it
|
|
631
|
-
completes. Once every module with a port is either listening or has been
|
|
632
|
-
reported as not running, a one-line summary follows: `✔ All modules
|
|
633
|
-
running:` (or `✔ Running:` / `! Not running:` when some were skipped) lists
|
|
634
|
-
each module with its URL or its reason. A module that crashes while others
|
|
635
|
-
keep running gets a restart hint
|
|
636
|
-
(`Restart it on its own: qore dev --only <module>`, in another terminal;
|
|
637
|
-
the others keep running); on shutdown, a final
|
|
638
|
-
line lists what stopped cleanly and what crashed, with how long it ran.
|
|
639
|
-
When the failure is about the developer's machine rather than the app
|
|
640
|
-
(Docker, Node version, a port busy with something other than a previous
|
|
641
|
-
`qore dev`, a package manager), the error is followed by a pointer to
|
|
642
|
-
`qore doctor` for a full check.
|
|
643
|
-
|
|
644
|
-
**Output.** Every line of a dev server's own stdout/stderr is prefixed per
|
|
645
|
-
module and column-aligned:
|
|
646
|
-
|
|
647
|
-
```
|
|
648
|
-
api │ listening on 8000
|
|
649
|
-
web │ listening on 3001
|
|
650
|
-
```
|
|
651
|
-
|
|
652
|
-
qore's own start, ready and exit lines (`▶ api (pid 4121)`,
|
|
653
|
-
`✓ api is listening on 8000`, `✗ web exited with code 1`) are not prefixed
|
|
654
|
-
and go to stderr, so `--json`'s stdout stays pure NDJSON. A module's own
|
|
655
|
-
stdout goes to stdout and its stderr to stderr. Colour is disabled with `--json`, `--no-color` or `NO_COLOR`.
|
|
656
|
-
|
|
657
|
-
With `--json` — the only qore command that streams instead of printing one
|
|
658
|
-
document — stdout is newline-delimited JSON, one event object per line
|
|
659
|
-
(`{"type":"start"|"ready"|"line"|"exit"|"warning"|"skip"|...}`), instead of
|
|
660
|
-
the usual single `{"ok":...}` document. An `exit` event carries an optional
|
|
661
|
-
`hint` (`{"hint":"..."}`, the same early-exit hint the human renderer prints
|
|
662
|
-
as ` → ...`) when the module crashed early with a non-zero code and no
|
|
663
|
-
signal — never on a signalled or graceful exit.
|
|
664
|
-
|
|
665
|
-
### Shared module checkouts
|
|
666
|
-
|
|
667
|
-
With a projects folder (`qore init`), a tenant's apps share their modules.
|
|
668
|
-
A module is cloned once, however many apps use it:
|
|
669
|
-
|
|
670
|
-
```
|
|
671
|
-
<root>/<tenant>/modules/<slug>/ one checkout per module (the real repository)
|
|
672
|
-
<root>/<tenant>/apps/<app>/ one folder per app, holding no code
|
|
673
|
-
<root>/@<portal>/<tenant>/... the same, for a non-production portal
|
|
674
|
-
```
|
|
675
|
-
|
|
676
|
-
Without a projects folder, and for `qore clone <app> <dir>`, nothing
|
|
677
|
-
changes: the module repositories sit in the workspace directory as before.
|
|
678
|
-
|
|
679
|
-
**The app folder** holds `qore.workspace.json` and files that make the
|
|
680
|
-
app's modules open together in an editor or Claude Code. `qore clone` and
|
|
681
|
-
`qore sync` write them from the portal's module list:
|
|
682
|
-
|
|
683
|
-
| File | Purpose |
|
|
684
|
-
|---|---|
|
|
685
|
-
| `<app>.code-workspace` | VS Code / Cursor: the app folder plus every module in `../../modules/` |
|
|
686
|
-
| `.idea/` (`modules.xml`, `<app>.iml`, `vcs.xml`) | WebStorm: the same modules as content roots and Git roots |
|
|
687
|
-
| `CLAUDE.md` | which modules the app has, where they are, and which other apps share them |
|
|
688
|
-
| `.claude/settings.json` | `permissions.additionalDirectories` for the modules |
|
|
689
|
-
|
|
690
|
-
Only what qore owns is rewritten; the rest is yours. In `CLAUDE.md` that is
|
|
691
|
-
the block between `<!-- qore:app:start -->` and `<!-- qore:app:end -->` —
|
|
692
|
-
write anything you like outside it. In `.code-workspace` qore sets
|
|
693
|
-
`folders` and keeps every other key (settings, extensions). In
|
|
694
|
-
`.claude/settings.json` it keeps every other key, and any
|
|
695
|
-
`additionalDirectories` entry of your own as long as it is not under
|
|
696
|
-
`../../modules/`. Your indentation and line endings are kept. A file qore
|
|
697
|
-
merges into (`<app>.code-workspace`, `.claude/settings.json`, `CLAUDE.md`)
|
|
698
|
-
that is a symlink, or that cannot be parsed, is skipped and named in the
|
|
699
|
-
output, never overwritten. The three `.idea` files and `qore.workspace.json`
|
|
700
|
-
are qore's alone and are rewritten whole, edits included (qore still never
|
|
701
|
-
writes through a symlink). A sync that changes nothing rewrites nothing.
|
|
702
|
-
|
|
703
|
-
**Opening an app.**
|
|
704
|
-
|
|
705
|
-
- VS Code or Cursor: open `apps/<app>/<app>.code-workspace`.
|
|
706
|
-
- WebStorm: open `apps/<app>/` as the project.
|
|
707
|
-
- Claude Code: `qore code <app>` (see "`qore code`" below). Plain `claude`
|
|
708
|
-
in the app folder is not enough: the folder holds no code, and Claude's
|
|
709
|
-
search does not reach other directories unless they are added with
|
|
710
|
-
`--add-dir`, which `qore code` does for you.
|
|
711
|
-
|
|
712
|
-
**Commands inside `modules/<slug>`.** There is no `qore.workspace.json`
|
|
713
|
-
there, so qore asks which apps list the module. One app: it is used. Several:
|
|
714
|
-
an interactive run asks, otherwise pass `--app <slug>`. When the portal
|
|
715
|
-
puts the module in more apps than are cloned here and one of the cloned
|
|
716
|
-
ones is used, qore says so on stderr: `Using app <app> (the only app here
|
|
717
|
-
using <module>; also in <apps> — pass --app to choose).`
|
|
718
|
-
|
|
719
|
-
**`qore sync`** works for the whole tenant, not only the app you are in:
|
|
720
|
-
it reads every app folder of the tenant that it can access, clones what is
|
|
721
|
-
missing into `modules/`, fetches every checkout once, and rewrites every
|
|
722
|
-
readable app's view files. An app folder it cannot read or access is
|
|
723
|
-
reported and left alone, and its modules still count as used.
|
|
724
|
-
|
|
725
|
-
**Converting the old layout.** Apps cloned before this layout hold real
|
|
726
|
-
repositories at `<tenant>/<app>/<module>`. `qore sync` (or `qore clone` of
|
|
727
|
-
such an app) converts what it finds:
|
|
728
|
-
|
|
729
|
-
- a module checkout is moved to `modules/<slug>` (when several apps hold a
|
|
730
|
-
copy you choose which one moves);
|
|
731
|
-
- another app's copy of the same module is removed — only when it is clean;
|
|
732
|
-
- the old app folder is retired: `qore.workspace.json` moves to
|
|
733
|
-
`apps/<app>/` and a `README.md` stays behind saying where everything
|
|
734
|
-
went (an existing README is kept, and reported).
|
|
735
|
-
|
|
736
|
-
**Qore asks first**, once, listing every path it would change. Without
|
|
737
|
-
your yes nothing is moved or removed and sync reports the changes as kept;
|
|
738
|
-
it never asks with `--json`, `--no-input` or without a terminal, so run
|
|
739
|
-
`qore sync` interactively to convert. A duplicate is **clean** when it has
|
|
740
|
-
no uncommitted changes (untracked files that are not git-ignored count,
|
|
741
|
-
whatever your `status.showUntrackedFiles` says), no commits that are not
|
|
742
|
-
pushed (a detached HEAD counts), no stashes, and no linked worktrees (`git
|
|
743
|
-
worktree add`, inside the clone or elsewhere); when git cannot tell, it is
|
|
744
|
-
not clean. A clone with linked worktrees, or one that is itself a linked
|
|
745
|
-
worktree, is never removed or moved: move it by hand, then run `git worktree
|
|
746
|
-
repair`. A copy that is not clean is kept, with
|
|
747
|
-
the reason, and you decide what to do with it. If a move fails — an
|
|
748
|
-
editor or a running dev server can hold the folder, notably on Windows —
|
|
749
|
-
the error says to stop `qore dev` for the app and run `qore sync` again.
|
|
750
|
-
A checkout in `modules/` that no app uses any more is reported as `not used
|
|
751
|
-
by any app — left in place`; qore never deletes it.
|
|
752
|
-
|
|
753
|
-
Known limits:
|
|
754
|
-
|
|
755
|
-
- `qore clone` of an app whose shared module still sits in another app's
|
|
756
|
-
old-layout folder clones it a second time into `modules/`; the next
|
|
757
|
-
`qore sync` offers to remove the old copy.
|
|
758
|
-
- A module cloned by `qore dev` shows in an app's view files after the
|
|
759
|
-
next `qore sync`.
|
|
760
|
-
|
|
761
|
-
#### `qore code`
|
|
762
|
-
|
|
763
|
-
```sh
|
|
764
|
-
qore code # the app you are in
|
|
765
|
-
qore code <app> # an app of the tenant you are in
|
|
766
|
-
qore code <app> -- --resume # arguments after -- go to claude
|
|
767
|
-
```
|
|
768
|
-
|
|
769
|
-
Starts Claude Code in the app's frontend module, with every other module of
|
|
770
|
-
the app and the app folder added (`--add-dir`), and sets
|
|
771
|
-
`CLAUDE_CODE_ADDITIONAL_DIRECTORIES_CLAUDE_MD=1` so Claude reads the added
|
|
772
|
-
modules' `CLAUDE.md` files. An app without a frontend starts in the app
|
|
773
|
-
folder. The module list comes from the portal.
|
|
774
|
-
|
|
775
|
-
- **Which app.** `<app>` is looked up in the tenant of the current
|
|
776
|
-
directory, else in the projects folder (a slug cloned in several places
|
|
777
|
-
asks you to run it from inside one). Without `<app>`: from an app folder,
|
|
778
|
-
that app; from `modules/<slug>`, the app that uses the module (a picker
|
|
779
|
-
when several do, otherwise `Pass an app: used by …`).
|
|
780
|
-
- It needs a projects folder and the shared layout. An old-layout
|
|
781
|
-
workspace asks you to run `qore sync` first (`qore code needs the shared
|
|
782
|
-
layout: run qore sync to convert this workspace.`); modules not cloned yet
|
|
783
|
-
are listed with `Run qore sync first.`
|
|
784
|
-
- `claude` not found: `QORE_TOOL_MISSING`, "Install Claude Code: npm i -g
|
|
785
|
-
@anthropic-ai/claude-code". Otherwise `claude`'s own exit code (or
|
|
786
|
-
128 + signal) is `qore code`'s.
|
|
787
|
-
- No `--json`.
|
|
36
|
+
### Commands
|
|
37
|
+
|
|
38
|
+
The full reference is in [docs/commands.md](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md) (module commands,
|
|
39
|
+
repository context, `.qore.json`, `qore init`) and [docs/workspaces.md](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/workspaces.md)
|
|
40
|
+
(app workspaces, shared module checkouts, `qore dev` in a workspace root, `qore code`).
|
|
41
|
+
|
|
42
|
+
| Command | What it does |
|
|
43
|
+
|---------|--------------|
|
|
44
|
+
| `qore login` / `qore logout` / `qore whoami` | Device-code login in your browser; show the logged-in user and active tenant |
|
|
45
|
+
| `qore tenant list` / `qore tenant use <slug>` | List the tenants you have access to; set the active one |
|
|
46
|
+
| `qore version` | CLI + portal version info |
|
|
47
|
+
| [`qore init`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#projects-folder--qore-init) | Guided setup: projects folder, login, tenant, first app |
|
|
48
|
+
| [`qore config root`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#projects-folder--qore-init) | Show, set or clear the projects folder |
|
|
49
|
+
| [`qore config telemetry`](#privacy) | Show crash reporting's state, or turn it `on`/`off` |
|
|
50
|
+
| [`qore status`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-status) | Deployment and health per environment for the current module |
|
|
51
|
+
| [`qore env pull`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-env-pull) | Write this module's local secrets into an env file |
|
|
52
|
+
| [`qore run -- <command>`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-run) | Run a command with those secrets in its environment, without writing them to disk |
|
|
53
|
+
| [`qore roles list` / `sync` / `use`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-roles) | Show your code's roles and yours on `local`; announce them; take some |
|
|
54
|
+
| [`qore dev`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-dev) | Start this module's dev server, or [every module of an app](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/workspaces.md#qore-dev-workspace-root) from a workspace root |
|
|
55
|
+
| [`qore doctor`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-doctor) | Run the checks `qore` makes before other commands, on demand |
|
|
56
|
+
| [`qore db erd`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md#qore-db-erd) | Open the module's (or app's) data model in your browser, read from the local Postgres |
|
|
57
|
+
| [`qore clone` / `qore sync`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/workspaces.md#workspaces) | Set up a local directory for an app and its modules; keep it in step with the app |
|
|
58
|
+
| [`qore code`](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/workspaces.md#qore-code) | Start Claude Code in the app's frontend module, with every module added |
|
|
59
|
+
| `qore errors` / `qore traces` / `qore logs` | Recent errors, slow requests and logs per environment (examples above) |
|
|
788
60
|
|
|
789
61
|
### `--json`
|
|
790
62
|
|
|
@@ -860,6 +132,15 @@ by the Sentry project's "Prevent Storing of IP Addresses" setting, part of its i
|
|
|
860
132
|
`qore config telemetry` and `qore doctor` show the current state and where it
|
|
861
133
|
comes from. A build from source or a fork carries no DSN and sends nothing.
|
|
862
134
|
|
|
135
|
+
## Documentation
|
|
136
|
+
|
|
137
|
+
- [docs/commands.md](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/commands.md) — every module command, repository context,
|
|
138
|
+
`.qore.json`, trust on first use, the projects folder and `qore init`.
|
|
139
|
+
- [docs/workspaces.md](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/workspaces.md) — `qore clone`/`qore sync`, `qore dev` in a
|
|
140
|
+
workspace root, shared module checkouts and `qore code`.
|
|
141
|
+
- [CLAUDE.md](https://github.com/Quatronic-IT/qore-cli/blob/main/CLAUDE.md) and [docs/internals/](https://github.com/Quatronic-IT/qore-cli/blob/main/docs/internals) — how the CLI is built,
|
|
142
|
+
for contributors.
|
|
143
|
+
|
|
863
144
|
## Releasing
|
|
864
145
|
|
|
865
|
-
See [RELEASING.md](
|
|
146
|
+
See [RELEASING.md](https://github.com/Quatronic-IT/qore-cli/blob/main/RELEASING.md).
|