# ezi Render

ezi Render turns a short page description (a Page Spec in YAML or JSON) into
one self-contained HTML file: no network requests, and the same spec always
gives the same bytes. The kits' skills use it to produce reports, plans and
diagrams; you can also run it yourself.

## Requirements

- Node.js 24 or later.
- A license (every license covers ezi Render) to download it.
- For PNG and PDF export: Google Chrome, Microsoft Edge or a Playwright
  Chromium on the machine, and the `playwright-core` package (below).

Runs on macOS, Linux and Windows.

## Install

ezi Render is downloaded separately from `ezi`:

```bash
ezi render install
```

```text
Installed ezi Render 1.0.0 in /Users/you/.ezi/products/render/1.0.0
```

It installs the release that matches your `ezi` version, checks its signature,
size and SHA-256, and keeps the previous version until the next install. Until
it is installed, every `ezi render` command stops with
`ezi Render is not installed in ...; install it with ezi render install`.

## Compile a page

Save this as `hello.page.yaml`:

```yaml
version: 1
meta:
  title: Hello ezi
theme:
  preset: paper-ink
blocks:
  - type: hero
    title: Hello ezi
    description: My first compiled page.
```

Check it, then compile it:

```bash
ezi render validate hello.page.yaml
```

```text
ok: hello.page.yaml
  title: Hello ezi
  theme: paper-ink
  blocks: 1 (nodes: 2)
  depth: 4, bytes: 160
```

```bash
ezi render hello.page.yaml --out hello.html
```

```text
wrote 116515 bytes to hello.html (1 runtime features, hash 03ii4fj1u181z1)
```

Open `hello.html` in any browser. A spec with a mistake exits with status 1,
and each message names the place in the spec to fix.

## Explore blocks and themes

```bash
ezi render catalog          # every block type
ezi render describe hero    # the fields of one block
ezi render themes           # theme presets, e.g. blueprint, editorial, paper-ink
```

## Export PNG or PDF

Export drives a browser that is already installed; it downloads none. Install
the driver once, into the ezi Render folder:

```bash
npm install --prefix ~/.ezi/products/render playwright-core
```

Without it, export fails with
`export failed (driver-unavailable): no Playwright driver; install playwright-core`.
Then:

```bash
ezi render export hello.page.yaml --format pdf --out hello.pdf
ezi render export hello.page.yaml --format png --out hello.png
```

## After an ezi update

When `ezi` moves to a new version, render commands print:

```text
[!] ezi Render 1.0.0 is installed, but this is ezi 1.0.1; run `ezi render install` to install the matching release
```

The old version keeps working. Run `ezi render install` to match:

```text
Installed ezi Render 1.0.1 in /Users/you/.ezi/products/render/1.0.1
  replaces 1.0.0 (kept until the next install)
```

## Use it from an agent

`ezi render mcp` serves ezi Render as an MCP server over stdio, for runtimes
that take MCP servers.
