PHP 8.5 · WebAssembly · zero server

Fold PHP into flat HTML.

A static site generator that turns PHP into fast, dependency-free HTML — no server required. Real PHP templates, compiled to plain HTML by PHP running in WebAssembly, right inside Node.

Get started Read the docs

An elephant folded from green paper

Four ways in, one engine

In your editor

VS Code extension

Create a project, build, export and preview from the Command Palette. The status bar runs the dev server; saves rebuild and reload the preview.

In your terminal

Command line

kiri serve while you write, kiri export when you ship. One npm install, no PHP on the machine.

With your AI assistant

MCP server

kiri mcp hands your assistant the project: it scaffolds, builds, validates and reads the results as structured data.

In your own code

JavaScript API

load() a project and call build(), export() or serve() from any Node script: the engine the other three are built on.


And for the people who run the site

For site owners

Kiri Studio

A desktop app for your client: sign in with GitHub, edit text, data and pictures with a live preview, click Publish. No Git, no code, no terminal.

For the maintainer

Set a site up for editing

Declare what is editable in a studio: block of kirigami.yaml, with schemas, labels and creatable collections. The build ignores it.


You write PHP. It compiles to flat HTML.

A page is a real PHP file: includes, loops, a PHPDOC block that becomes your variables. Kirigami runs PHP 8.5 entirely in WebAssembly, inside Node, and compiles every page to plain HTML at build time. Nothing runs on your server, because there is no server.

src/_index.php

                            /**
                             * @title Home
                             * @type  page
                             */
                            
                            echo str_htmlesc($tagline);
                        
src/index.html, after kiri build

                            <h1>Fold PHP into flat HTML.</h1>
                        

What you get

Real PHP templating

Includes, loops, Markdown, YAML and page types, compiled to clean HTML at build time, not served at runtime.

An asset pipeline

esbuild for JavaScript, Sass for styles, an image autogenerator, all wired from one kirigami.yaml.

SEO without the boilerplate

Title, description, Open Graph, canonical links and a schema.org graph, generated from one seo: block.

One-command export

kiri export ships a static site for GitHub Pages or any static host, sitemap included.

Instant scaffolding

kiri create starts from an official template, so a new project begins with something real.

Zero native dependencies

PHP, images and the cache run on WebAssembly and Node's standard library: no compiler, no binding to install.


What it needs, and what it doesn't


Built with itself

This site is a Kirigami project: every page is an _index.php, the documentation uses a page type for its sidebar, and Ecosystem fetches its version numbers from npm at build time. Its source is on GitHub.


                        npm install --save-dev @kirigami/cli
                        npx kiri create     # pick a template
                        npx kiri serve      # build, then live-reload while you edit