Schema and bundles
Inspect the deployed schema, sync, add, update and manage its bundles, and compare what your code declared with what the workspace runs.
Objects are declared in code, in bundles. From a terminal you can list objects, inspect one, sync the bundles your project declares, add the pre-built bundles a workspace may add, update an added copy, list and remove the bundles a workspace holds, and diff the deployed schema against the shared runtime. schema only reads.
Inspect the deployed schema
standards schema liststandards schema inspect contactsinspect accepts an object name or id and returns its attributes, types and views.
standards schema groupsgroups lists the bundles that own objects, each with its label.
Sync, list and remove bundles
A bundle is a set of objects, views, pages and agents declared with bundle(name, label). See Bundles.
standards bundles syncsync discovers the bundles of the project (standards/bundles/*.ts by default, or the patterns of standards.config.ts), then syncs each one, the bundles it .uses() first. It prints <name> applied <hash> or <name> unchanged <hash>, and exits 1 at the first refusal. --cwd <dir> sets the project root.
standards bundles listlist shows each installed bundle's name, mode (synced or added), origin, hash and install time.
Removing a synced bundle demotes its objects to custom objects. Records are kept.
standards bundles remove <name> --yesThe command refuses to run without --yes, and refuses core, a bundle a host declares in code and a bundle another one uses. It also refuses an added copy, with Bundle "<name>" is added: uninstall it from the Bundles window: uninstalling an added bundle deletes its records, so it takes a preview and a confirmation the CLI does not carry.
Add a bundle
An added bundle is a copy the workspace owns: its objects, views and agents are created once, and you edit them like anything you built yourself. Listing and dry runs need architect: read on your key; adding needs architect: create.
| Command | What it does | What it prints |
|---|---|---|
standards bundles available | Lists the bundles the workspace may add, each with the bundles it uses and whether it is installed. | The bundles. |
standards bundles add <names...> --dry-run | Plans an add against the workspace. Writes nothing. | { pieces, fingerprint }. |
standards bundles add <names...> --fingerprint <fingerprint> | Adds the planned bundles. | { added, failed }. |
| Flag | Commands | Description |
|---|---|---|
--locale <locale> | all | en (default) or fr. On add it is the language the pieces are compiled in. |
--with-samples | add | Also adds the bundles' sample records. |
--dry-run | add | Prints the plan and its fingerprint. Writes nothing. |
--fingerprint <fingerprint> | add | Required without --dry-run: the fingerprint the dry run printed. Without it the add is refused before a request is sent. |
--decision <pieceId>=<choice> | add | How to settle one collision: bind, skip or rename:<name>. Repeat it once per collision. |
Adding a bundle also adds the bundles it uses. An unknown --locale, or a --decision that does not read <pieceId>=bind, <pieceId>=skip or <pieceId>=rename:<name>, is refused before a request is sent.
An add is two calls with the same bundles. The dry run returns one piece per object, view or agent, then a fingerprint of that plan:
standards bundles add <name> --locale en --dry-runEach piece has a pieceId and a status. new is added as is. collides means the workspace already has something under that name (existingName), and the add needs a decision for it, with two exceptions: a page or tab whose name is taken is added under a suffixed name, and a piece marked installed: true (an earlier add of the bundle put it there) is skipped, or bound when a kept piece needs it:
| Decision | Effect |
|---|---|
bind | Uses the existing object instead of adding one. Only an object can be bound. |
skip | Leaves the piece out. A piece another kept piece needs cannot be skipped. |
rename:<name> | Adds the piece under <name>. A page's <name> is its API name: lowercase letters, digits, - and _, at most 40 characters, not taken. |
A piece with installable: false carries a reason, and the add is refused unless you skip it. Pass the same bundles, the fingerprint and one --decision per collision to add:
standards bundles add <name> --locale en \
--fingerprint <fingerprint> \
--decision <objectPieceId>=bind \
--decision <viewPieceId>=rename:<newName>The add is refused with nothing written when a colliding piece that needs a decision has none, or when the workspace changed since the dry run, so the fingerprint no longer matches: run the dry run again and use the new fingerprint.
Update an added bundle
When the host offers a new version of a bundle you added, status says so and update brings it in. Nothing is removed, and a piece you changed stays as it is unless you take the new version. The Bundles window does the same; uninstalling stays there.
| Command | What it does | What it prints |
|---|---|---|
standards bundles status | Shows where each installed bundle stands. Writes nothing. | One row per bundle: name, status and usedBy, the names of the bundles that depend on it. |
standards bundles update <name> --dry-run | Plans the update, piece by piece, in the locale the bundle was added in. Writes nothing. | { pieces, fingerprint }. |
standards bundles update <name> --fingerprint <fingerprint> | Applies the planned update. | <name> updated, <n> applied, as a line of text in every --format. |
| Status | Meaning |
|---|---|
current | Nothing to do. A synced bundle, or one the host no longer offers, always reads current. |
update | The host offers another version than the one the workspace holds. |
repair | A piece the bundle installed no longer exists. update reinstalls it. |
Each piece of the plan has a pieceId, a kind, a label and a group, which says what update does with it:
| Group | Meaning | What update does |
|---|---|---|
added | The new version brings this piece. | Adds it. |
updated | You never changed it. | Writes the new version. |
conflict | You changed it, and so did the bundle. | Keeps yours, unless --take names it. |
missing | It no longer exists. | Reinstalls it, unless --skip-missing names it. |
notApplied | It cannot be applied here, for the reason in reasonCode. | Leaves it out and applies the rest. |
reasonCode is lossy (the new type would lose stored values), required (the piece would become required while records may be empty), retype (an update never changes a type), move (an update never moves a content between placements), nameTaken (the name in reasonName is held) or refused (adding the piece is refused here). A bundle with a notApplied piece keeps reading update after the update.
| Flag | Description |
|---|---|
--dry-run | Prints the plan and its fingerprint. Writes nothing. |
--fingerprint <fingerprint> | Required without --dry-run: the fingerprint the dry run printed. Without it the update is refused before a request is sent. |
--take <pieceId> | Takes the new version of a conflict piece. Repeat it once per piece. |
--skip-missing <pieceId> | Does not reinstall a missing piece, and the bundle stops asking for it. Repeat it once per piece. |
--decision <pieceId>=<choice> | Settles a nameTaken piece, as on add: bind, skip or rename:<name>. Repeat it once per piece. |
standards bundles update <name> --dry-runstandards bundles update <name> \
--fingerprint <fingerprint> \
--take <conflictPieceId> \
--skip-missing <missingPieceId>update writes nothing and exits 1 when it is refused:
| Message | Cause |
|---|---|
The workspace changed since the preview; preview again | The fingerprint no longer matches, or an agent was edited since the preview. Run the dry run again and use the new fingerprint. |
"<id>" is not in conflict | --take names a piece outside the conflict group. |
"<id>" is not missing | --skip-missing names a piece outside the missing group. |
Bundle "<name>" was added before updates existed and cannot be updated | The bundle holds a piece recorded before updates existed. The dry run refuses it too. |
A bundle that is not an added copy, or that the host no longer offers, answers not found.
status and update --dry-run need architect:read on your key, and update needs architect:update. An update that adds or reinstalls an agent also needs agents:create, and one that writes a routine also needs agents:manage.
Pull
schema pull reads the deployed schema and the shared runtime, then prints reconciliation guidance. It writes no file and changes nothing in the workspace.
standards schema pullstandards schema pull --format jsonWith an explicit --format json it prints the canonical shared state instead of the guidance. Both forms only see what has been applied: unbuilt local TypeScript is not part of the comparison.
Diff
schema diff compares the deployed schema with the shared runtime and lists every change, addressed by object, attribute, relation, view or content name.
standards schema diffstandards schema diff --format jsonschema diff is the one command whose exit codes differ from the CLI's:
| Exit code | Meaning |
|---|---|
0 | No differences. |
1 | Differences exist. The list is on stdout. |
2 | Authentication, transport or schema-contract error. The message is on stderr. |
Use it as a CI gate:
standards schema diff --format json
case $? in
0) ;;
1) echo "runtime drifted from source"; exit 1 ;;
*) echo "diff failed"; exit 2 ;;
esacRuntime additions stay listed until your declarations absorb them. A replaced content or a reordered view stays listed as a retained copy even once it matches the source again: deploying new builders does not clear it, resetting it to the source in architect mode does.
Next steps
- Schema ownership: what a bundle owns and what happens on removal.
- Bundles: declare and sync the schema in code.
- CLI: exit codes and output formats.
- Book a demo