Install the CLI, write your first workbook, open it in a browser. No framework. No server. No ceremony.
The @semanticintent/mere-cli package ships the CLI and the runtime bundle.
npm install -g @semanticintent/mere-cli
Save this as hello.mp.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/@semanticintent/mere-cli@latest/dist/mere-runtime.min.js"></script>
</head>
<body>
<workbook theme="classic-light">
<state>
<value name="name" type="text" value="World" />
</state>
<actions>
<action name="reset">
clear name
</action>
</actions>
<screen name="home">
<header>
<heading>Hello, @name</heading>
</header>
<field ~name placeholder="Your name" />
<button !reset>Reset</button>
</screen>
</workbook>
</body></html>
Check the workbook for structural errors before opening:
mere check hello.mp.html
Exit 0 means clean. Exit 1 means errors. Exit 2 means warnings only.
Drag hello.mp.html into any browser, or serve it locally:
# Any static file server works
npx serve .
# Or the Mere CLI dev server
mere dev
The workbook runs entirely in the browser. No server logic. Share the file — anyone with the runtime can run it.
Three ways to include the runtime in a workbook:
Reference the hosted runtime via jsDelivr, which mirrors every published npm release automatically. Workbooks work from anywhere.
<script src=
"https://cdn.jsdelivr.net/npm/@semanticintent/mere-cli@latest/dist/mere-runtime.min.js"
></script>
Copy mere-runtime.js alongside your workbook. Works fully offline.
<script src=
"./mere-runtime.js"
></script>
Embed the runtime inside the .mp.html file. Fully self-contained single file.
<script>
/* mere-runtime.js */
…inlined…
</script>
| Command | Description |
|---|---|
| mere check <file> | Validate a workbook. Reports errors with file:line:col and caret underline. Exit 0 / 1 / 2. |
| mere check *.mp.html | Validate multiple workbooks. Prints a summary line. |
| mere pack <file> | Inline the runtime into a workbook, producing a fully self-contained *.packed.mp.html — no CDN dependency, runs anywhere. |
| mere pack <file> --out <path> | Write the packed file to a specific path. |
| mere dev [path] | Serve workbooks locally. Runs mere check on boot and on every save, live-reloads the browser over SSE. Nothing is written to disk. |
| mere diff <old> <new> | Structural diff between two workbook versions — screens, state, computed values, and actions added, removed, or changed. |
| mere validate <packed> | Confirm a packed workbook's body still matches the source embedded in it at pack time — proves the file hasn't been hand-edited since packing. |
| mere schema | Print the element registry as a formatted table. |
| mere schema --json | Print the element registry as machine-readable JSON. |
| mere help | Show usage and diagnostic code reference. |