Skip to main content
A project is a folder with a package.json, a components/ folder, optionally a functions/ folder, and an ollie.json that tells the CLI which store the project belongs to and which folders are components.

ollie.json

ollie.json
The file is read by start, whoami and function dev. The record and deploy commands do not read it: they take every id as a flag.

The components map

Each entry maps a key to a folder:
  • The key is either the component’s UUID, which makes the entry linked to a record in your store, or any alias you like, which makes it unlinked. An unlinked entry gets the temporary id studio-<alias> and shows up in Studio with a Publish button.
  • path is the folder, relative to the project root. It must contain an index.tsx. It can live outside components/.
  • slot is where the component renders. Without it the component is built but not placed, and start warns about it.
  • id can carry the UUID when the key is an alias; usually the key itself is the UUID.
The CLI keeps the map current for you. When Studio publishes an unlinked component, or saves a linked one’s slot, the dev server rewrites the entry under the real UUID. The same folder can appear twice with different keys, for example after Studio’s Duplicate action, which adds <folder>-copy-<id> entries. Folders under components/ that are not in the map are still discovered: the CLI falls back to a legacy meta.json inside the folder, and without one treats the folder as unlinked with no slot.

Stages

A project can hold several configurations, one per stage: ollie.json is the prod stage, and ollie.<stage>.json (for example ollie.dev.json) any other. Select one with --stage <name> or -s, or set OLLIE_STAGE. A stage file is merged over ollie.json key by key: a versionId in ollie.dev.json replaces the one in ollie.json, and so does a components map (the two maps are not combined). ollie.json must exist even when you only use a stage, and a stage file that does not exist is an error:
Studio shows a stage selector while the dev server is connected, so you can preview the components each stage links. Stage names cannot contain dots.

init

Writes the ids to ollie.json (or to ollie.<stage>.json with --stage), merging with what is already there. It does not check that the ids exist and needs no login.
init ignores OLLIE_STAGE; pass --stage explicitly.

setup

Migrates a project from the legacy per-folder meta.json files to the components map. For every components/<name>/meta.json (or meta.<stage>.json) that carries an id, it writes the entry into ollie.json (or the stage file) and deletes the meta file. Metas without an id are left alone.
Run it once on a project that predates the map; new projects do not need it.