Osy#betaRun it on Osyrin: osyrin.com

Reference / Local

The local loop (running your app on your own machine)

Everything the `osy` CLI does to the project in front of you — run it, look at what it did, check it before you ship. The first-day mistake is treating a local platform as a database you can leave data in: a compile mints a new app version and yesterday's rows are not what the new one reads, so seed through the app's own functions or `osy import` after every compile.

stablelocalcliovervieworientation

Summary#

osy is the local surface: it works on the project in front of you, needs no account and no cloud. Most of it is offline. It runs against a local platform it starts for you on demand, and the whole area is one loop — write, run, look, check.

osy launch      # create the app if missing, compile this source into it, open it
osy logs --tail # what it said — client and server lines under one correlation id
osy inspect     # what actually happened in a run, and where it faulted
osy check       # validate + lint + test, one verdict, before you ship

Description#

A compile mints a new app VERSION, and data does not carry across it. This is the fact that surprises people first: a recompile is not an edit in place, so rows you created against the previous version are not what the new one reads. Seed through the app's own functions, or Importing data, after a compile — never by expecting yesterday's data to still be there.

A local platform is a cache, not a store. Instances live under ~/.osy/instances/, each carrying its own Postgres cluster, and they are reaped: one you have not touched for a day is gone, and that is correct — losing one costs a rebuild. Listing your local platforms shows every instance on the machine and which are running; Reclaiming the disk your local platforms use is the deliberate sweep. Stopping the local platform ends the one serving this project.

Ask the platform rather than reading the compiler. Most questions about your app have a verb: Understanding your app for the resolved model, Explaining your app's security for the declared security in plain English, Reading a capability's source for what a surface offers, Reading your theme for the token vocabulary you may write, Mapping your theme onto your kits — osy kit tokens --app for what each token comes to once your kits are in it. A question you answer by reading source is a question the platform has not answered yet.

When something misbehaves, look before you reason. Seeing what happened when your code ran opens the trace and jumps to the fault; Recording a run captures one deliberately; Seeing what a page cost answers the performance question. Faults are captured even with tracing off.

The pages#

Run osy docs local for the full listing.

See also#

Related

The inner loop

The local develop-and-debug loop for an Osy# app — for the person in the editor and the coding agent at the CLI alike…

Running a local platform

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

Launching your app

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

Compiling your app

Compiles your app's source into the app on the local platform — the inner-loop compile-and-apply. It applies additive…

Checking your app

Checks your app against production best-practice rules and reports where it falls short — the maturity signal, beside…

Checking access

Runs your app and checks that it does what its model says about access: who can read, change and delete each row, what…

Seeing what happened when your code ran

Opens a finished run and shows what it did — each step named and pointed at its source line, the values that crossed…

Reading what your application actually used

CPU, egress, database statements — counted by the machine that ran your code, not estimated. Read from your local…

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…

Importing a data source's schema

Writes an entity for every table a registered data source holds — at its address, with its key — as ordinary source you…

Reading your theme

Prints everything your app's theme advertises — every group, every token, each token's value or its light/dark pair…

Listing your local platforms

Lists every local platform on this machine and says which are still running. The build-and-test loop starts one per…

Stopping the local platform

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

Giving a secret its value

Declaring `app.Secrets` names a secret; it does not give it a value, and an app cannot run until something does. `osy…

Deploying your app to an environment

Builds your app on this machine and hands it to the zone one of its organization's environments runs on — `osy deploy…

Generating the C# a native provider implements

Writes the C# interface, and the plain classes it carries, for a seam a native .NET provider implements — `IBlobStore`…

Drilling your app

Runs four reliability drills against your app in a real browser, on a local platform of its own that can be made to…