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.)
--prunereconciles 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-migrationwrites a migration template listing any non-additive changes, each markedacknowledged = falsefor you to review — it does not apply anything.--migration <file>applies a migration you have reviewed and authorised.--jsonwrites 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 changesSee 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).