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(deployment): add os package publish and os package install to the CLI reference (#9021)
`content/docs/deployment/cli.mdx` carried a `####` entry per command across
Development, Production, Build & Validate, Schema migrations, Scaffolding,
Quality, Authentication and Cloud Environments — but had no entry for the two
commands that move a compiled app onto a platform. The only mention of either
was one prose line inside `os cloud login`.
This matters now because #8910 made `publish-and-preview.mdx` the page that
states how a metadata app reaches a platform, on the instruction "link to the
CLI reference, do not restate it". The link landed on a reference that did not
cover the two commands the page is about.
Adds a `### Packages` subsection with `#### os package publish` and
`#### os package install`, each with a full flag table and one example per mode,
matching how `os migrate` and `os cloud login` are covered.
Every flag was read from `packages/cli/src/commands/package/{publish,install}.ts`
rather than restated from the card. That found flags the card did not name:
publish's full 23-flag surface (the card listed only install's flags), and
install's `--timeout` / `OS_CLOUD_TIMEOUT_MS`, `-r`/`-v` short forms,
`--version` default `latest`, and the `OS_RUNTIME_EMAIL` / `OS_RUNTIME_PASSWORD`
env spellings.
`publish-and-preview.mdx` is untouched: it keeps the narrative and the choosing
rule; this page carries the flag-level detail.
Claude-Session: https://claude.ai/code/session_011RB4waLuNbdruCo6X9oobm
Co-authored-by: Claude <noreply@anthropic.com>
is reserved for the server-side reseed endpoint; use it only when that endpoint
1281
1281
is available in your deployment.
1282
1282
1283
+
### Packages
1284
+
1285
+
The two commands that move a compiled app onto a platform. They target
1286
+
**different systems and authenticate as different identities**: publish uploads
1287
+
to ObjectStack Cloud (the catalog), install registers an app into a **running
1288
+
runtime**.
1289
+
1290
+
| Command | Talks to | Description |
1291
+
|---------|----------|-------------|
1292
+
|`os package publish [artifact]`| ObjectStack Cloud | Upload a compiled artifact as a versioned package in your organization |
1293
+
|`os package install <package>`| A running runtime | Install a package into a live kernel, from that runtime's catalog or from a local artifact |
1294
+
1295
+
For which one to reach for and the preview patterns around them, see
1296
+
[Publish & preview](/docs/deployment/publish-and-preview). This section is the
1297
+
flag-level reference.
1298
+
1299
+
#### `os package publish`
1300
+
1301
+
Uploads a compiled artifact as a versioned package in your organization's
1302
+
catalog. It ensures a `sys_package` row keyed by the manifest id, then snapshots
1303
+
the artifact into a new `sys_package_version`. Publishing changes nothing that
1304
+
is already running.
1305
+
1306
+
```bash
1307
+
os compile
1308
+
os package publish # dist/objectstack.json → your org
1309
+
os package publish --manifest-id com.acme.crm --version 1.2.0
1310
+
os package publish dist/objectstack.json --visibility org --note "first cut"
1311
+
os package publish --env env_abc123 --install # publish, then install into an environment
1312
+
OS_CLOUD_URL=http://localhost:4000 os package publish # against a local control plane
1313
+
```
1314
+
1315
+
**The credential is the *cloud* identity.** Resolution order: `--token`, then
1316
+
`$OS_TOKEN`, then `~/.objectstack/cloud.json` (written by
1317
+
[`os cloud login`](#os-cloud-login)). It deliberately does **not** fall back to
1318
+
`~/.objectstack/credentials.json` — that is the runtime identity
1319
+
[`os login`](#os-login) writes, and the two are different accounts. With no
1320
+
token at all the command exits `1` and tells you to run `os cloud login`.
1321
+
1322
+
**Options:**
1323
+
1324
+
| Flag | Env equivalent | Purpose |
1325
+
|---|---|---|
1326
+
|`artifact` (positional) | — | Path to the compiled artifact (default `dist/objectstack.json`) |
1327
+
|`-s, --server <url>`|`OS_CLOUD_URL`| Control-plane URL. Default `https://cloud.objectos.ai`, or the URL recorded by `os cloud login`|
1328
+
|`-t, --token <key>`|`OS_CLOUD_API_KEY`| Bearer token; `$OS_TOKEN` and `~/.objectstack/cloud.json` are the fallbacks |
1329
+
|`--manifest-id <id>`|`OS_PACKAGE_MANIFEST_ID`| Reverse-domain package id. Default: `artifact.manifest.id`, else `local.` + a slug of the artifact name |
1330
+
|`-v, --version <semver>`| — | Version to publish. Default: `artifact.manifest.version`, else `0.0.0-dev.` + a timestamp |
1331
+
|`--display-name <name>`| — | Name shown in the Marketplace (default `artifact.manifest.name`) |
1332
+
|`--description <text>`| — | Short package description |
|`--readme-file <path>`| — | README file, read at publish time. Mutually exclusive with `--readme`|
1344
+
|`--icon-url <url>`| — | Public `http(s)` icon URL. Mutually exclusive with `--icon-file`|
1345
+
|`--icon-file <path>`| — | Local PNG/JPEG/WebP/SVG (≤256 KB) uploaded to the icon CDN, which returns a stable URL and rewrites `icon_url` for you. Mutually exclusive with `--icon-url`|
1346
+
|`--homepage-url <url>`| — | Public project / docs URL, surfaced in the catalog |
0 commit comments