Kirigami lets you build static websites using a language you already know — PHP — and compiles them straight into clean, production-ready HTML. There's no server to provision, no runtime to patch, and no infrastructure to maintain: the PHP engine runs entirely in WebAssembly, directly inside the Node.js process. You get the full expressiveness of PHP templating with the simplicity, speed, and portability of a static site.
- Real PHP templating — includes, loops, Markdown, YAML — compiled directly to clean HTML, no server needed at runtime.
- Integrated asset pipeline with esbuild for JS and Sass for styles, wired in from the start.
- A
watchmode with hot-reload, so changes show up instantly during development. - A single-command production export — a fully static site ready to deploy anywhere (GitHub Pages, Netlify, any static host), with a license banner and an auto-generated sitemap.
- Instant project scaffolding from official templates via
kiri create. - Continuous deployment through the official
kiribuildGitHub Action.
Every project is driven by a single configuration file, kirigami.yaml, at the project root.
| Repository | Description |
|---|---|
kirigami |
The main monorepo: the kiri CLI, the PHP → HTML compiler, the PHP-WASM runtime, and every supporting package. |
kiribuild |
The official reusable GitHub Action — build and deploy a Kirigami site straight from CI, typically to GitHub Pages. |
All packages live in the kirigami monorepo and are published on npm under the @kirigami scope.
| Package | Description |
|---|---|
@kirigami/kirigami |
The heart of the project: the kiri CLI (build, export, watch, run, create, phpinfo). |
@kirigami/php-prepros |
The PHP → HTML compiler that powers the CLI — template rendering, sitemap generation, and a full PHP class library. |
@kirigami/php-wasm |
A custom PHP WebAssembly build for Node.js (JSPI only, no browser support). Distributed under GPL-2.0-or-later. |
@kirigami/struct-walker |
Recursively walks YAML/JSON structures, resolving relative file references and converting assets to data URIs. |
@kirigami/sdk |
Shared runtime for plugins: the hook registry and the on-disk Cache. |
@kirigami/canva |
Shared Sass/JS design system reused across Kirigami projects. |
Install the CLI:
npm install -D @kirigami/kirigamiDrop a kirigami.yaml at the root of your project:
kirigami:
project: "My Site"
baseurl: "https://mysite.com"
root: "src"
prepros:
before: "_layouts/header.php"
after: "_layouts/footer.php"
format: trueWrite your _*.php pages inside src/, then:
npx kiri watch # dev mode with hot-reload
npx kiri export # fully static site, ready to deployFull documentation lives in the main repository README.
Everything is distributed under the MIT license, except for @kirigami/php-wasm, which is GPL-2.0-or-later.
MIT © Maxime Larrivée-Roy, 2026