Setup

Get started.

Install the CLI, write your first workbook, open it in a browser. No framework. No server. No ceremony.

Quickstart

  1. Install the CLI

    The mere package ships the CLI and the runtime bundle.

    npm install -g mere
  2. Create a workbook

    Save this as hello.mp.html:

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="utf-8">
      <script src="https://mere.mp/mere-runtime.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>
  3. Validate it

    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.

  4. Open it

    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.

Runtime options

Three ways to include the runtime in a workbook:

CDN

Reference the hosted runtime. Workbooks work from anywhere.

<script src=
"https://mere.mp/mere-runtime.js"
></script>

Self-hosted

Copy mere-runtime.js alongside your workbook. Works fully offline.

<script src=
"./mere-runtime.js"
></script>

Inline

Embed the runtime inside the .mp.html file. Fully self-contained single file.

<script>
/* mere-runtime.js */
…inlined…
</script>

CLI reference

CommandDescription
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 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.

Next steps