You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(cli): source-verify every command; fix os start auth story
Every command/subcommand/flag on the page is now verified against
packages/cli/src/commands/; validate, info, compile, build, lint --score
and --help were executed in a real 16.0.0-rc.1 consumer app and the
printed samples updated to match actual output.
- os start: the page claimed auth is silently skipped without a secret —
reality is --auth-secret > OS_AUTH_SECRET > an auto-generated secret
persisted at <home>/auth-secret, so auth works out of the box
(start.ts readOrCreateAuthSecret); documented the full artifact
resolution chain incl. config auto-compile and the empty-kernel
fallback, and the missing --home flag.
- Replaced the monorepo-internal '../objectui Vite server' Console note
with the consumer reality (prebuilt bundle served at /_console/).
- os compile / os info samples regenerated from real runs; os dev gains
--fresh/--seed-admin rows + the persistent dev-DB note and the seeded
admin / MCP endpoint mention; added the missing os build alias and an
os lint section (--score/--fix/--json); serve auth tier note gains
the dev-fallback-secret parenthetical.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012Kj2MJEPXoUXC4LiC3XYJc
Copy file name to clipboardExpand all lines: content/docs/getting-started/cli.mdx
+60-26Lines changed: 60 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ os generate flow onboarding # Add an automation flow
42
42
os dev --ui
43
43
```
44
44
45
-
Open [http://localhost:3000/_console/](http://localhost:3000/_console/) — you'll see the Console UI with a data browser, metadata explorer, and API documentation.
45
+
Open [http://localhost:3000/_console/](http://localhost:3000/_console/) — you'll see the Console UI with a data browser, metadata explorer, and API documentation. Sign in with the seeded dev admin (`admin@objectos.ai` / `admin123`) — `os dev` provisions it automatically on an empty database. The boot banner also prints the app's MCP endpoint (`/api/v1/mcp`) so a coding agent can connect to the running app.
46
46
47
47
### Validate & Build
48
48
@@ -138,8 +138,14 @@ os dev --database file:./data/test.db --auth-secret $(openssl rand -hex 32)
138
138
|`-p, --port <n>`|`OS_PORT` / `PORT`| Listen port (default `3000`). In dev a busy port auto-hops to the next free one; the banner shows the actual port. |
139
139
|`--ui`| — | Force Console UI on (already on by default in dev) |
140
140
|`--compile`| — | Force compiling `objectstack.config.ts` → `dist/objectstack.json` before starting (auto when the artifact is missing; ignored with `--artifact`) |
141
+
|`--fresh`| — | Ephemeral `OS_HOME` in the OS tempdir (clean DB, uploads, storage), auto-deleted on exit; implies `--seed-admin`|
142
+
|`--seed-admin` / `--no-seed-admin`| — | Seed a dev admin (`admin@objectos.ai` / `admin123`) on an empty DB — default on; override with `--admin-email` / `--admin-password`|
141
143
|`-v, --verbose`| — | Verbose output |
142
144
145
+
By default `os dev` keeps your data between restarts in a project-local SQLite
146
+
file at `.objectstack/data/dev.db` (created on first run). Pass `--database`,
147
+
set `OS_DATABASE_URL`, or use `--fresh` for a throwaway run.
148
+
143
149
With a file-backed SQLite database, dev also provisions a sibling
144
150
`<db>.telemetry.<ext>` file registered as the `telemetry` datasource —
145
151
lifecycle-classed system data (activity streams, job runs, notifications,
@@ -194,7 +200,8 @@ only gate the **automatic** registration of optional plugins.
194
200
195
201
The `auth` tier requires `OS_AUTH_SECRET` to be set; otherwise `AuthPlugin`
196
202
is skipped with a yellow warning and the `/api/v1/auth/*` endpoints will
197
-
return 404. To take full control, set `tiers` on the stack config:
203
+
return 404. (In `--dev` mode the CLI falls back to an insecure local secret so
204
+
login works out of the box.) To take full control, set `tiers` on the stack config:
|`--database-driver <kind>`|`OS_DATABASE_DRIVER`| Force `sqlite`\|`turso`\|`postgres`\|`mongodb`\|`memory` when the URL is ambiguous |
299
308
|`--database-auth-token <token>`|`OS_DATABASE_AUTH_TOKEN`| Auth token for libsql/Turso |
300
-
|`--auth-secret <secret>`|`OS_AUTH_SECRET`| Secret for `@objectstack/plugin-auth`; without it `/api/v1/auth/*` is skipped (server still runs) |
309
+
|`--auth-secret <secret>`|`OS_AUTH_SECRET` / `AUTH_SECRET`| Secret for `@objectstack/plugin-auth`. If neither the flag nor the env var is set, `os start`**auto-generates one** and persists it at `<home>/auth-secret`|
310
+
|`--home <dir>`|`OS_HOME`| Home directory for persistent state (default `<cwd>/.objectstack` when an `objectstack.config.ts` is present, otherwise `~/.objectstack`) |
|`-p, --port <port>`|`OS_PORT` / `PORT`| Listen port (default `3000`). **Production fails loudly if the port is busy** — see note below. |
303
313
|`--ui` / `--no-ui`| — | Mount the Console portal at `/_console/`. Enabled by default (so you can install marketplace apps); pass `--no-ui` to disable it. |
@@ -310,7 +320,7 @@ os start
310
320
> (CORS). **Pin the port explicitly** (`OS_PORT=8080 os start`) and keep
311
321
> `OS_AUTH_URL` / `OS_TRUSTED_ORIGINS` in sync when you change it.
- Runs standalone boot mode with one active environment.
321
331
322
332
**Authentication:**
323
-
The `auth` capability is auto-loaded only when both (1) the artifact declares `requires: [..., 'auth']`**and** (2) a secret is provided via `--auth-secret` or `OS_AUTH_SECRET`. Without a secret, `AuthPlugin` is **silently skipped with a warning** — the server still boots and serves data/REST routes, only `/api/v1/auth/*` (login/register) is omitted. This is intentional: `os start` is happy to run an unauthenticated, internal-network deployment.
0 commit comments