Osy#the first language built for agents
Agents firstAgentic appsWorkflowsDurable Execution — built inSecurityTestingThe editorThe UI modelOne program

Reference / Local

Compiling your app

osy compile [path] [--prune] [--generate-migration] [--migration <file>] [--json]

Compiles your app's source into the app on the local platform — the inner-loop compile-and-apply. It applies additive changes directly; non-additive ones (drops, renames, type changes) are gated behind a migration.

stablelocalcliauthoring

Summary#

Compiles the source on your disk into your app on the local platform (Running a local platform) — the inner-loop compile-and-apply. Additive changes (new entities, fields, functions) apply directly; changes that would remove or reshape existing data are held until you authorise them with a migration.

Signature#

osy compile [path] [--prune] [--generate-migration] [--migration <file>] [--json]

Description#

osy compile finds the local platform for your project, ensures your app exists there, and compiles the current source into it. It needs no account and no credentials — the local platform is yours. If no platform is running for the project, it starts one for you in the background and leaves it running, so you never have to start a server first — the compile is a single command. (See Running a local platform, and Stopping the local platform to shut it down.)

  • --prune reconciles the app to the source, dropping metadata the source no longer declares. On a local (Development) app these apply; removing something in production requires a migration.
  • --generate-migration writes a migration template listing any non-additive changes, each marked acknowledged = false for you to review — it does not apply anything.
  • --migration <file> applies a migration you have reviewed and authorised.
  • --json writes the compile result as JSON.

Compiling against a remote platform is the operator command osyrin app compile — the same compile, a different target.

Examples#

osy compile                       # starts the local platform if needed, then applies the current source
osy compile --generate-migration  # preview a migration for any non-additive changes

See also#

Importing data — load the app's rows, the other half of "copy this app and it works".

Running a function — run one of the app's functions once it is compiled.

Running a local platform — the local platform your app compiles into.

Launching your app — open the app in a browser after compiling.

Running tests locally — run your app's tests (which compile the source too).

Related

Running a local platform

Runs a full platform on your own machine — its own database, no account, no cloud, reachable only from your computer…

Stopping the local platform

Stops the local platform serving your project — the one the build-and-test loop starts on demand. Its database stops…

Launching your app

Opens your app in a browser, running on the local platform. It compiles the current source first, so what opens…

Importing data

Loads your app's own data — the JSON files that live beside its source — into the app on the local platform. Rows are…

Running a function

Runs one of your app's own functions from the command line — to put the app in a known state, backfill a column, or…

Running tests locally

Runs your app's tests against a Platform on your own machine — no account, no network, no setup beyond a running local…