PHPackages                             lemmon/garner - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. lemmon/garner

ActiveLibrary[Templating &amp; Views](/categories/templating)

lemmon/garner
=============

Agent-first, flat-file PHP CMS with filesystem routing and Twig rendering

v0.4.1(2w ago)013MITPHPPHP ^8.4

Since May 23Pushed 1mo agoCompare

[ Source](https://github.com/lemmon/garner-cms-php)[ Packagist](https://packagist.org/packages/lemmon/garner)[ RSS](/packages/lemmon-garner/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (51)Versions (7)Used By (0)

Garner
======

[](#garner)

An agent-first, flat-file PHP CMS. Content lives as plain files on disk, the directory tree defines the routes, and pages render through Twig. There is no proprietary content format to learn — humans and AI agents edit the same files.

Requirements
------------

[](#requirements)

- PHP 8.4+ with `pdo_sqlite`
- Composer

Quick start
-----------

[](#quick-start)

```
composer install
composer start          # serves http://localhost:8040
```

Add a page by creating a directory with a `+page.json` entry:

```
routes/
└── hello/
    ├── +page.json
    └── main.md
```

```
{ "title": "Hello" }
```

That answers `/hello`. `main.md` is exposed to the template as `content.main`.

Project layout
--------------

[](#project-layout)

```
app/       templates, controllers, routes.php, favicon
config/    configuration (config/app.php)
public/    web root — point the document root here (public/index.php)
routes/    the page tree (one directory per route)
runtime/   derived index + caches (disposable, rebuildable)
storage/   persistent app state

```

Using Garner as a package
-------------------------

[](#using-garner-as-a-package)

A site can require Garner as a Composer dependency and keep only its own content and configuration (`routes/`, `app/`, `config/`, `public/`). The web entry point is a two-liner — `public/index.php`:

```
