CLI
The ryot CLI (package @ryot-app/cli) turns a plugin package into an installable archive. It has
two commands, ryot plugin build and ryot plugin messages. Run both from the plugin package root,
the directory that holds its package.json.
{ "exports": { ".": { "types": "./manifest/plugin.ts", "default": "./manifest/plugin.ts" } }, "scripts": { "build": "ryot plugin build", "messages": "ryot plugin messages" }}The build reads the manifest from the module named by exports["."].default and fails when it is
missing.
ryot plugin build
Section titled “ryot plugin build”Validates the plugin and writes a deterministic, source-free archive.
| Flag | Effect |
|---|---|
--output <path> |
Write the archive to this path instead of dist/<publisher>/<name>.zip |
--watch |
Build, then rebuild whenever authoring inputs change |
--skip-initial |
With --watch, skip the first build and wait for the first change |
Build steps
Section titled “Build steps”A build stops at the first failing step and leaves any existing archive untouched.
- Messages. Runs the
ryot plugin messagesstep. - Manifest. Loads the authored manifest and validates it against the strict authored schema.
- Backend. Compiles every
backend/**/*.sandbox.tsentry, with theshared/sources it reaches, and derives the manifest’sscriptssection from the compiled entries (see Script discovery). - Manifest text. Requires every manifest display text, including property schema labels, hints and choice labels and the search options schemas of compiled provider scripts, to name an English key whose arguments are exactly the declared ones: none, except row text bindings.
- Client. When the manifest declares
client, compilesclient/and theshared/sources it reaches into a client artifact. - Full manifest. Validates the manifest together with the derived
scripts. - Definitions. Validates the plugin’s definitions, declared queries, saved views and controls with the ingestion validator against the kernel baseline and the declared dependency closure.
- Archive. Writes the archive.
Source discovery skips test files (any file whose name contains .test.) and
shared/messages.generated.ts. backend/ and shared/ contribute .ts files; client/
contributes .ts, .tsx, .css and supported asset files (.svg, .png, .jpg, .jpeg,
.gif, .webp, .avif, .ico, .mp3, .woff2, .wasm).
Messages in the build
Section titled “Messages in the build”ryot plugin build leaves shared/messages.generated.ts out of the compiler sources and passes the
compiled English catalog to both compilers, which generate the builder themselves (see
The generated builder). The compiled catalogs,
plus the generated en-XA pseudo-locale, are written into the archive.
Dependency resolution
Section titled “Dependency resolution”Manifest dependencies map importer-local aliases to { packageId, scope }. Authored imports use
@ryot-app/plugins/<alias>/<export>; compilation replaces the alias with the exact scoped package
target. It does not install dependencies or select revisions.
- Each dependency resolves to an installed npm dependency of the importing package (from its
dependencies,devDependenciesorpeerDependencies, found innode_modules) whoseexports["."].defaultis a plugin manifest with the matching package ID. - Dependencies of dependencies are resolved the same way, from each dependency’s own package.
- The build fails when a declared dependency is not installed.
- A plugin that depends on a
user-scope package is validated as a private plugin itself.
See Dependencies for the manifest side.
Archive output
Section titled “Archive output”- The archive is written to
dist/<publisher>/<name>.zip(frommetadata.packageId) unless--outputnames another path. It is written to a temporary file first and then renamed into place. - It contains the manifest (with derived
scripts), compiled backend and client artifacts, and compiled message catalogs. It never contains authored sources or raw assets. - The archive is deterministic. See the archive format for entry order, limits and rejection reasons.
- Client artifacts record the imported package/export targets and a hash of the full client declaration. Archive validation rejects an artifact whose declaration hash differs from the manifest, even when its package ID and executable bytes are unchanged.
Watch mode
Section titled “Watch mode”--watch runs one build, then polls the package for changes and rebuilds in a fresh process.
- Watched inputs are
.tsfiles (except*.generated.ts), catalogs undershared/messages/, client source and asset files, andpackage.json.node_modules,distand the--outputpath are ignored. - If the first build fails, watch mode exits. Pass
--skip-initialto start watching without it. - After a failed rebuild, the next poll retries until a build succeeds.
ryot plugin messages
Section titled “ryot plugin messages”Validates the message catalogs and writes the typed builder. Run it before type-checking plugin sources; it works from a clean checkout, before kernel catalog generation.
- Validates
shared/messages/<locale>.jsonwith the shared catalog validator from@ryot-app/i18n: the same rules and limits as kernel catalogs.enis required. - Scans the plugin’s non-test
.tsand.tsxsources underbackend/,client/,manifest/,shared/and the package root. Any quoted literal equal to a key counts as a use. - Fails on a
catalogMessage(...)orcatalogRowText(...)call whose first literal is not a key, on a key that nothing references, and on a catalog that defines one of the kernel’s common message keys. - Writes the typed
catalogMessagebuilder, andcatalogRowTextfor row text, toshared/messages.generated.ts, rewriting it only when its contents change.
Generated modules are not committed. See Messages and languages for catalog format and key rules.