Meridian handbook
ReferenceCLI

dev

engine-dmo dev: Local development: the serve, check and apply loop, and the authoring verbs. Every subcommand, argument and flag.

Local development: the serve, check and apply loop, and the authoring verbs.

CommandWhat it does
engine-dmo dev config setSet one value in a configuration file (search.driver meilisearch), checked like any verb
engine-dmo dev config unsetRemove one key from a configuration file, checked like any verb
engine-dmo dev endpoint addAdd a declared endpoint from a recipe (recipe:enquiry, recipe:newsletter)
engine-dmo dev field addAdd a field to a type, or a custom field to organisation or person, with its id
engine-dmo dev field removeRemove a field; its values stay under its id, and the plan says how many documents hold one
engine-dmo dev field renameRename a field: its handle changes, its id and values stay, the old handle stays an alias
engine-dmo dev field setChange a field’s label, help or a parameter
engine-dmo dev group addAdd a group to a type’s editor layout
engine-dmo dev importer renameRename a importer: its key changes in importers.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays
engine-dmo dev locale addDeclare a locale in locales.yaml with its id, and enable it on a site
engine-dmo dev network addDeclare a network in networks.yaml with its id, and join sites to it
engine-dmo dev option addAdd an option, with its id, to a select field, or a style to a link field
engine-dmo dev portal action addDeclare a portal action on a site, with its id, target, fields, permission and tiers
engine-dmo dev portal screen addDeclare a portal screen on a site, with its id, path, template, permission, tiers and data; --scaffold writes its template
engine-dmo dev role addDeclare a partner role in portal/roles.yaml with its id and grants; a built-in key restates that role with the grants given
engine-dmo dev route addRoute a type on a site, with its id; --scaffold writes its template
engine-dmo dev site addAdd a site directory with its site.yaml and routes.yaml
engine-dmo dev site renameRename a site: its directory moves, its id and data stay, old admin and public URLs redirect
engine-dmo dev slot addDeclare a promotion slot on a site, with its id, the types it promotes, its capacity and its rules
engine-dmo dev source renameRename a source: its key changes in sources.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays
engine-dmo dev statusWhat engine-dmo dev up last found: the check, the plan, live aliases, the address and the images the sizing check found oversized
engine-dmo dev tier addDeclare a membership tier in memberships.yaml with its id, ranked last or after another tier
engine-dmo dev tier renameRename a tier: its key changes in memberships.yaml and every rule naming it, its id and memberships stay
engine-dmo dev type addA custom type with a title, a slug and a summary
engine-dmo dev upServe with the config watcher: on every change write missing ids, check, plan, apply what is safe and reload
engine-dmo dev webhook renameRename a webhook: its key changes in webhooks.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays

How the verbs behave

Each authoring verb makes its change in a copy of the configuration, loads that copy the way check does, and writes the files only when the configuration is still valid; otherwise it prints the problems and exits 3 with nothing was written. It writes the ids of the elements it adds, so never write an id by hand. --dry-run prints the diff and writes nothing.

The verbs run without a database and without the deployment’s secrets (see Commands and the environment), in development, in staging only with dev.authoring: true, and never in production.

What the configuration check does not cover, and how to finish the job:

VerbWhat happensWhat to do
dev endpoint addWrites endpoints.yaml and exits 0, saying the recipe’s templates are the site’s to write. check then fails until the response partials and mail templates existWrite the templates the message names, then run check
dev route add --scaffoldWrites routes.yaml first, then the entry template, which loads the whole configuration. With DATABASE_URL (or another variable without a default) unset, the route is written and the command exits 3 with no template. Run again, it answers nothing to change and still writes no templateSet the placeholders from Commands and the environment first. If the route is already written, run engine-dmo new template <type>/entry.html
dev route add --index ... --scaffoldWrites <type>/entry.html only. check then fails: type "walk" has an index route and no walk/index.htmlRun engine-dmo new template <type>/index.html. The file it writes is an empty block with no heading; give it an h1 and the list before you render it
dev field add <core type> ... --after <core field>On a core type (page, article and the other built-in types) whose config/schema/<type>.yaml already exists, --after names only fields in that file: --after names "slug", which is not a field in schema/page.yaml, exit 3Leave out --after (the field goes last), or name a field you added. engine-dmo describe type <type> lists the core fields, marked core

dev config set rewrites the map it changes and may reorder its keys (setting site.name.cy can put cy before en). The order has no meaning.

engine-dmo dev config set

Set one value in a configuration file (search.driver meilisearch), checked like any verb.

engine-dmo dev config set <file> <path> <value> [flags]
ArgumentRequiredRepeatable
fileyesno
pathyesno
valueyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev config unset

Remove one key from a configuration file, checked like any verb.

engine-dmo dev config unset <file> <path> [flags]
ArgumentRequiredRepeatable
fileyesno
pathyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev endpoint add

Add a declared endpoint from a recipe (recipe:enquiry, recipe:newsletter)

engine-dmo dev endpoint add <key> [flags]
ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--fromstringrecipe:enquirythe recipe
--sitestringthe site (default: the default site)
--subjectstringfor an enquiry, the type it is about, taken from the path

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev field add

Add a field to a type, or a custom field to organisation or person, with its id.

engine-dmo dev field add <type> <name> [flags]
ArgumentRequiredRepeatable
typeyesno
nameyesno
FlagTypeDefaultMeaning
--afterstringplace it after this field
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--groupstringadd it to this group of the editor
--help-textstringits help text in the source locale
--indexboolprojected for listing, filtering and sorting
--labelstringits label in the source locale
--optionsstringsa select’s option values, each given an id
--paramstring, repeatablea type parameter as key=value in YAML (max=280, multiline=true); repeatable
--requiredboolrequired at publish
--sitestringa field this site alone offers, on a shared type
--translatestringnone | locale | language | group
--typestringthe field type (engine-dmo describe fieldtypes)

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev field remove

Remove a field; its values stay under its id, and the plan says how many documents hold one.

engine-dmo dev field remove <type> <name> [flags]
ArgumentRequiredRepeatable
typeyesno
nameyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev field rename

Rename a field: its handle changes, its id and values stay, the old handle stays an alias.

engine-dmo dev field rename <type> <old> <new> [flags]
ArgumentRequiredRepeatable
typeyesno
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--no-aliasbooldo not keep the old handle as an alias

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev field set

Change a field’s label, help or a parameter.

engine-dmo dev field set <type> <name> [flags]
ArgumentRequiredRepeatable
typeyesno
nameyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--help-textstringits help text in the source locale
--labelstringits label in the source locale
--paramstring, repeatableset key=value on the field (required=true, max=120); repeatable

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev group add

Add a group to a type’s editor layout.

engine-dmo dev group add <type> <key> [flags]
ArgumentRequiredRepeatable
typeyesno
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--fieldsstringsthe fields it holds, in order
--labelstringthe group’s label in the source locale

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev importer rename

Rename a importer: its key changes in importers.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays.

engine-dmo dev importer rename <old> <new> [flags]
ArgumentRequiredRepeatable
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--sitestringthe site whose importers.yaml it is; omitted, the default site

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev locale add

Declare a locale in locales.yaml with its id, and enable it on a site.

engine-dmo dev locale add <code> [flags]
ArgumentRequiredRepeatable
codeyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--fallbackstringslocales it falls back to, in order
--labelstringthe locale’s name in its own language
--sitestringenable it on this site

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev network add

Declare a network in networks.yaml with its id, and join sites to it.

engine-dmo dev network add <key> [flags]
ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--namestringthe network’s name in the source locale
--sitestringsa site to join the network; repeatable

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev option add

Add an option, with its id, to a select field, or a style to a link field.

engine-dmo dev option add <type> <field> <value> [flags]
ArgumentRequiredRepeatable
typeyesno
fieldyesno
valueyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--classstringa link style’s class
--dry-runboolprint the diff of every file it would change, and write nothing
--labelstringthe option’s label in the source locale

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev portal action add

Declares a portal action in config/sites/<site>/portal.yaml: a form posted to {portal path}/actions/<key>. The key is <subject>.<verb>, the verb one of create, update, remove, add, submit, request, invite. The target is one of --document <type> (with --create for a new document of the active organisation, or the document named by ?id=), --organisation or --person (their custom fields, named custom.<name>). --can is the permission a partner’s role must grant (default action.<key>), and --tiers or --min-tier the tiers whose organisations may use it (default every tier and none).

engine-dmo dev portal action add <subject.verb> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
subject.verbyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--approvalstringtier (the tier’s member_editable rule, the default) or required
--canstringthe partner permission the action needs (default action.<key>)
--createboolwith --document, create a new document of the active organisation
--documentstringa document target: the type it writes
--dry-runboolprint the diff of every file it would change, and write nothing
--fieldsstringsthe fields it writes; repeatable or comma separated
--labelstringthe action’s name in the source locale, where a screen lists it
--min-tierstringthe lowest tier that may use it, and every tier ranked above
--organisationboolwrite the active organisation’s custom fields
--personboolwrite the signed-in person’s custom fields
--rate-limitstringa limit such as 20/hour/person
--respondstringa reference screen to redirect to after a good post
--sitestringthe site (default: the default site)
--tiersstringsthe tiers whose organisations may use it, none included; repeatable or comma separated

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev portal screen add

Declares a portal screen in config/sites/<site>/portal.yaml: a page under the portal path rendered from a template
under the site's portal template directory, with declared data the engine reads scoped to the partner's organisation.
--path carries {org}, {id} or neither (default /organisations/{org}/<key>); --template defaults to <key>.html.
--data is repeatable: a name, the source and its parameters, such as
  --data 'offers=documents type=offer states=draft,published sort=-updatedAt limit=50'
The sources are documents, document, published, report, enquiries, pending, people, membership, organisation, promotions, first_session.
A key that is a reference screen's (dashboard, organisation, report, contact_details, people, membership, contact_team, enquiries, events, promotions, listing_edit, photos, hours) replaces that screen's template
and takes only --template.
engine-dmo dev portal screen add <key> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--canstringthe partner permission the screen needs (default screen.<key>)
--datastring, repeatablea data source: ‘<name>=<source> [<param>=<value>…]’; repeatable
--dry-runboolprint the diff of every file it would change, and write nothing
--min-tierstringthe lowest tier that may open it, and every tier ranked above
--nav-groupstringput the screen in the portal navigation under this group (default business with --nav-order)
--nav-orderint0the screen’s place in its navigation group
--pathstringthe path under the portal path, with {org}, {id} or neither (default /organisations/{org}/<key>)
--scaffoldboolwrite the screen’s template under the site’s first template root, unless the chain already has it
--sitestringthe site (default: the default site)
--templatestringthe template under the site’s portal template directory (default <key>.html)
--tiersstringsthe tiers whose organisations may open it, none included; repeatable or comma separated
--titlestringthe screen’s title in the source locale, which the navigation shows

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev role add

Declares a partner role: what a person may do for an organisation in the portal and the member API. --can takes the permissions it grants (profile.update, organisation.update, listing.update, photos.add, photos.remove, hours.update, event.submit, people.invite, people.manage, promotion.request, billing.pay, enquiries.manage, report.view, enquiries.view, membership.view, pending.view) and patterns such as listing.* or *. A key that is owner, manager, contact or billing restates the built-in role, which keeps the engine’s id; owner always holds every permission.

engine-dmo dev role add <key> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--canstringsa permission or pattern the role grants; repeatable or comma separated
--dry-runboolprint the diff of every file it would change, and write nothing
--labelstringthe role’s name in the source locale

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev route add

Route a type on a site, with its id; --scaffold writes its template.

engine-dmo dev route add <type> <uri> [flags]
ArgumentRequiredRepeatable
typeyesno
uriyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--indexstringthe index route’s uri
--scaffoldboolwrite the type’s template from its fields (engine-dmo new template)
--sitestringthe site (default: the default site)

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev site add

Add a site directory with its site.yaml and routes.yaml.

engine-dmo dev site add <key> [flags]
ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--domainstringsa host the site answers; repeatable
--dry-runboolprint the diff of every file it would change, and write nothing
--localesstringsthe locales it enables, the first its default
--namestringthe site’s name
--networkstringthe network it joins, declared when new; omitted, the default network

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev site rename

Rename a site: its directory moves, its id and data stay, old admin and public URLs redirect.

engine-dmo dev site rename <old> <new> [flags]
ArgumentRequiredRepeatable
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev slot add

Declares a slot in config/sites/<site>/promotions.yaml: a place on the site’s pages where a promotion can appear, rendered by promoted(‘<key>’) and labelled by promotionLabel(item). --types names the document types it may promote; --capacity how many are live at once (default 1); --min-days and --max-days bound a promotion’s length; --lead-time is the earliest a request may start after it is made (3d); --tiers or --min-tier say whose organisations may request it (default every tier and none); --price is shown to the partner, with --currency (default the site’s) and --per week, day or placement.

engine-dmo dev slot add <key> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--capacityint0how many promotions are live in it at once (default 1)
--currencystringthe price’s currency (default the site’s)
--dry-runboolprint the diff of every file it would change, and write nothing
--lead-timestringthe earliest a request may start after it is made, such as 3d
--max-daysint0the longest promotion in days (default no limit)
--min-daysint0the shortest promotion in days (default 1)
--min-tierstringthe lowest tier that may request it, and every tier ranked above
--namestringthe slot’s name in the source locale, as staff and partners see it
--perstringwhat the price is for: week, day or placement (default placement)
--pricestringthe price shown to the partner, a decimal such as 150.00
--sitestringthe site (default: the default site)
--tiersstringsthe tiers whose organisations may request it, none included; repeatable or comma separated
--typesstringsthe document types it may promote; repeatable or comma separated

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev source rename

Rename a source: its key changes in sources.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays.

engine-dmo dev source rename <old> <new> [flags]
ArgumentRequiredRepeatable
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--sitestringthe site whose sources.yaml it is; omitted, the default site

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev status

What engine-dmo dev up last found: the check, the plan, live aliases, the address and the images the sizing check found oversized.

engine-dmo dev status

--json prints the command’s own JSON document. Runs in a project.

engine-dmo dev tier add

Declare a membership tier in memberships.yaml with its id, ranked last or after another tier.

engine-dmo dev tier add <key> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--afterstringrank it directly above this tier; omitted, it ranks highest
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--labelstringthe tier’s name in the source locale

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev tier rename

Rename a tier: its key changes in memberships.yaml and every rule naming it, its id and memberships stay.

engine-dmo dev tier rename <old> <new> [flags]

Available in engine-dmo only.

ArgumentRequiredRepeatable
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev type add

A custom type with a title, a slug and a summary.

engine-dmo dev type add <key> [flags]
ArgumentRequiredRepeatable
keyyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--labelstringthe type’s name in the source locale
--pluralstringits plural
--sitestringdeclare it in this site’s schema directory, so it is that site’s alone
--sitesstringsdeclare it in config/schema/ on these sites only (sites:); each site’s directory may then extend it

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev up

dev up runs serve --dev and watches config/. On a change it writes any missing ids (engine-dmo check --fix), loads and checks the whole project, computes the schema plan, and applies it if it is not destructive, then reloads the engine in this process. A failed check or a destructive plan leaves the engine on the last good configuration and prints why. engine-dmo dev status reads what it last found.

engine-dmo dev up [flags]
FlagTypeDefaultMeaning
--listenstringoverride server.listen

--json prints the text output in the JSON envelope. Runs in a project.

engine-dmo dev webhook rename

Rename a webhook: its key changes in webhooks.yaml and in every endpoint step naming it, and its id, with what is stored under it, stays.

engine-dmo dev webhook rename <old> <new> [flags]
ArgumentRequiredRepeatable
oldyesno
newyesno
FlagTypeDefaultMeaning
--applyboolafter writing, apply the schema plan when it is not destructive
--dry-runboolprint the diff of every file it would change, and write nothing
--sitestringthe site whose webhooks.yaml it is; omitted, the default site

--json prints the text output in the JSON envelope. Runs in a project.