ObjectStackObjectStack

Publish, Versioning & Preview

Compile metadata into an artifact, publish it as a versioned package to your Cloud catalog, optionally install it into an environment, and preview locally.

Publish, Versioning & Preview

ObjectStack treats compiled metadata as an immutable artifact. The local loop is:

objectstack.config.ts -> os compile -> dist/objectstack.json -> os package publish -> Cloud package version (optionally installed into an environment)

The framework CLI owns compile and package publish. The Cloud control plane that stores package versions, installs them into environments, and serves them to runtime nodes lives outside this framework repo.

The legacy direct-to-environment os publish / os rollback commands (which wrote sys_environment_revision) were removed (#2237). Publishing now goes through the package catalog: os package publish uploads a versioned package, and an environment is updated by installing a version into it. Revision-style rollback is no longer a framework CLI command — version and environment management are a Cloud control-plane concern.


1. Compile

os compile
# -> dist/objectstack.json

The artifact contains metadata, manifest requirements, and packaged function code. Deployment config stays outside the artifact: database URLs, secrets, runtime credentials, and environment identity are host inputs.


2. Publish a package version

# upload dist/objectstack.json as a new version in your org catalog
os package publish

# explicit artifact + install into an environment in one step
os package publish ./dist/objectstack.json --env env_prod --install

The CLI:

  1. POST /api/v1/cloud/packages — ensure a sys_package row exists (id derived from artifact.manifest.id, or --manifest-id).
  2. POST /api/v1/cloud/packages/:id/versions — snapshot dist/objectstack.json into sys_package_version.manifest_json (status published).
  3. (optional) install the new version into --env.

Common flags:

FlagEnv varPurpose
artifact (positional)Path to the compiled artifact (default dist/objectstack.json)
--server, -sOS_CLOUD_URLCloud control-plane URL
--token, -tOS_CLOUD_API_KEYBearer token (service mode)
--version, -vSemver version (default: artifact.manifest.version)
--visibilityorg (default) · private · marketplace
--orgOS_ORG_IDOwner org id (service mode)
--envOS_ENVIRONMENT_IDEnvironment to install the new version into
--installAuto-install the new version into --env after publishing

In user mode the package is owned by your active organization; in service mode (bearer key) pass --org. See Packages for the package model.


3. Install / update an environment

An environment is updated by installing a package version into it — either at publish time with --env --install, or separately via the Cloud control plane / Marketplace. To "roll back," install the prior version; there is no revision-activate CLI command anymore.


4. Preview patterns

Use one of these shapes:

PatternCommand
Local artifact previewos dev --artifact ./dist/objectstack.json --ui
Production artifact hostOS_ARTIFACT_PATH=./dist/objectstack.json os start
Cloud environment previewInstall to a preview environment, then route clients to it via /api/v1/environments/:environmentId/... or X-Environment-Id.

On this page