We've been busy: crafting the fastest way to build

Authors
The fastest way to build. Leaf, December 2026

Leaf 5 shipped in August. In October we looked back at 740,000 installs, and today that number is 822,000. We've been quiet on the blog and busy everywhere else, and nearly all of that work has gone into one goal: making Leaf the fastest way to build a real web app.

Fast means two things here. The first is how quickly you get from an idea to a working app, and the second is how quickly that app answers a request. This post covers what we built for both and where each piece stands today.


Our take on Agent Experience

We were seeing more and more projects started by a coding agent, with a person describing what they wanted and reviewing what came back. That person is still our user, but the first reader of our docs, our APIs and our error messages is now often a model. The folks at Netlify call this Agent Experience, or AX, and we think it is changing how frameworks get judged.

Our take is that good AX is mostly good DX with the shortcuts removed. An agent cannot guess what you meant, so one obvious way to do a thing beats three clever ones. It cannot click around a dashboard, so everything has to be reachable from a command. It reads the docs as text, so a page that says exactly which function to call and what it returns wins over a page that explains the philosophy first. Leaf has always leaned this way, with small modules, plain functions like auth()->login() and db()->select(), and very little configuration. That is why Leaf 5 treats AI as a first-class target.

What we are not doing is building a separate Leaf for agents. The framework a person writes by hand and the framework an agent writes for them have to be the same code, with the same tests, so that you can open the project a week later and understand every line. The next two sections are what that principle has turned into since August.

Agents that use Leaf instead of working around it

In early v5 versions, we set guardrails for agents to follow in particular situations, but we kept seeing the same thing in agent-built Leaf apps. The agents would skip our modules and write their own sign-in or database code, which costs you tokens and leaves you with code nobody has tested.

So we changed what a new project hands to the agent. The Leaf skill now ships inside the framework, which means the agent reads it from disk with no network call. The project's AGENTS.md names the exact commands for auth, models and migrations, and new projects default to SQLite so leaf db:migrate works on the first try. All of this is in Leaf MVC 5.1, which is out now.

Leaf for Mac

The Leaf for Mac page, showing the app building a ceramics shop from a one-line description

We are building an official desktop app for Leaf. You download one app, describe what you want to build, and your AI starts from a working Leaf project instead of an empty folder. There is no setup needed on your end, you download the app, it sets everything up for you and you start building with your favorite agent.

Leaf for Mac works with the Claude, ChatGPT or Gemini account you already pay for, and we do not sell any AI ourselves. The code it produces is a normal Leaf app on your Mac that any developer can pick up later. The app is in private testing right now, and it will be free when it lands. You can follow the build at desktop.leafphp.dev.

Eien is back

Some of you will remember Eien from 2022. It was our Swoole-based server, and it loaded your app into memory so requests did not start from nothing every time. We liked the idea a lot, but Swoole asked too much of the people installing it.

Eien is now built on FrankenPHP in worker mode. Your app boots once, and every request after that is served from memory. You do not rewrite anything to use it:

leaf install eien
leaf serve

The setup experience is just as sweet as every other Leaf module. You install Eien, and it sets up everything for you, including FrankenPHP, then wires up Leaf to use worker mode automatically. From there, a normal leaf serve runs your app on Eien in place of the traditional PHP server. Leaf MVC apps work the same way as basic Leaf apps.

The difference shows up in the numbers. On our test Mac, a JSON route in the Leaf MVC starter went from about 10,700 requests per second on the classic server to about 54,700 on Eien. The 99th percentile response time went from about 17.6 ms to 1.5 ms. That is one machine and one route, so your numbers will differ.

Note that Eien 5.0 is out today, and will be the default way Leaf apps are served. Here are a few things you need to know:

  • Eien is only available to v5.x of Leaf and its modules. It needs Leaf 5.1 or newer, so update Leaf and your modules to their latest releases.
  • Eien's worker mode runs on Apple Silicon Macs and on Linux. On Windows and Intel Macs, leaf serve keeps using PHP's built-in server, so installing Eien is safe and changes nothing there.
Try Eien on your appIt takes two commands and no rewrite.
Read the Eien docs

PHP 8.6

PHP 8.6 came out on 19 November together with security releases for every supported branch. We covered all of that in its own post, so we will keep this short.

Leaf 5 runs on PHP 8.2 and newer, and most of our modules now run their tests on PHP 8.6 as well. The first 8.6 feature has also landed in Leaf DB 5.2: orderBy() accepts the new SortDirection enum, while strings keep working on older versions.

$posts = db()
    ->select('posts')
    ->orderBy('created_at', SortDirection::Descending)
    ->all();

A new leafphp.dev

The new leafphp.dev homepage: the easiest way to build a real web app, by hand or with AI

We rebuilt the Leaf website from the homepage down. The old page tried to explain Leaf to developers and to people building with AI in the same breath, and it ended up doing neither well. The new one opens with what Leaf is for: the easiest way to build a real web app, by hand or with your coding agent.

A few things on it are new. There is a wall of real products people have shipped with Leaf, a section on what it costs to build and run a Leaf app, and a walkthrough of the modules that covers sign-in, the database, payments, background jobs and validation. We also wrote a deployment guide for shared hosting, since a lot of you run Leaf on plans that cost a few dollars a month.

Friday

The Friday homepage, with the Mac app showing a conversation with the Friday bot

Friday is a new product from us, and it is the one piece in this post that is not about PHP at all. It is a macOS app that gives you AI teammates you message like people. Your bots get a computer of their own, sign in to the tools you already use and come back with the work done.

Friday runs on your own Mac and on the AI account you already have, so there is no second model bill. It is free to download today for Macs with Apple silicon at friday.leafphp.dev, and an iPhone app is on the way.

We use Friday on Leaf every day. The bots watch our repositories, added PHP 8.6 to our test matrices and opened the pull requests behind the agent changes above. Nothing gets released until a human has reviewed it.

Thank you to our sponsors

Leaf is free and open source, and none of the work in this post happens without the companies that back it. Netlify, Anthropic, Algolia, and GitHub give Leaf the hosting, tools and credits that keep the project running. We also want to welcome Neon, who join as our latest credits sponsor. Thank you all for betting on a small framework and the people building with it.

If your company runs on Leaf and wants to help, the support page lists the ways to do it.

What comes next

Eien, the agent changes and the PHP 8.6 work are all released, and you can use them today. Before publishing, we ran every command and code sample in this post on a fresh Leaf MVC app to make sure it works as written.

Leaf for Mac is the piece still to come, and getting it out of private testing is where the next few weeks go.

Start building with LeafCreate a new app with one command, by hand or with your coding agent.
Start building

Thank you to everyone who filed issues and sent pull requests this year. If you are starting something on Leaf, tell us about it on Discord or on X at @leafphp.