Agents get the map
Leaf keeps routes, modules, structure, conventions, and project state readable so AI can work inside your app instead of guessing around it.
Leaf 5 is an AI-native PHP framework with project context built in, so assistants understand your app, Craftly can turn patterns into product, and your code stays clean, readable, and yours.
Open Source
Leaf is fully community-backed. Your support keeps the momentum going as we make modern PHP faster, cleaner, and more AI-ready.
AI-native framework
Leaf makes your routes, modules, structure, conventions, and project state readable to AI, so assistants can build inside your app instead of guessing around it.
Leaf keeps routes, modules, structure, conventions, and project state readable so AI can work inside your app instead of guessing around it.
Routes, controllers, models, services, config, and views stay predictable, so generated code lands where it belongs.
Agents read shared project memory alongside the code, then write useful changes back so the next session starts informed.
AI composer
Build a customer portal with billing and a CMS view
Agent workflow
Workflow
AI-first design meets battle-tested PHP code, giving you the power to ship real products faster and cheaper than ever before.
Spin up a full project with auth, db, and routing already in place, or generate your own custom setup with AI.
From AI or your keyboard, write the logic that matters without getting bogged down in repetitive boilerplate.
Deploy anywhere PHP runs. No lock-in, no hidden layers, just your product running the way you built it.
Architecture
Leaf keeps your app consistent, readable, and easy for AI to reason about from day one, so every feature, change, and iteration fits naturally into your codebase.
Pattern language
Every module in Leaf follows the same API patterns. Routes, controllers, models, and services all use familiar patterns, so you don't have to learn a different way for each part.
auth()->login([...]);
db()->select(...)->where([...]);
cache()->get('key');
response()->json([...]);Same fluent, chainable pattern across everything. This predictability is what makes tools and AI work better with your code.
Frontend
Use any frontend you want. React, Vue, Svelte, Blade, PHP. Your AI assistant still gets the same backend map. Your tools follow your stack.
Learn moreLeaf route
app()->get('/menu/items', function() {
$items = db()->select('menu_items')->all();
return response()->inertia('menu', [
'items' => $items
]);
});React view
export default function Menu({ items }) {
return (
<div className="menu-grid">
{items.map((item) => (
<MenuCard key={item.id} item={item} />
))}
</div>
);
}Vegan • 4 stars
Spicy • 5 stars
Low-carb • 4 stars
Ecosystem
Leaf is more than the framework — it's a family of focused tools that work anywhere PHP (or JavaScript) runs, each with its own home.

Alchemy
QA from one config
Tests, code style, refactors, static analysis + CI pipelines for any PHP app — described in one alchemy.yml.

Seedling
Console applications
A tiny framework for building CLI tools with the Leaf MVC experience — commands, prompts, and packaging.

Fetch
HTTP client
fetch() for PHP. The request API you already know from JavaScript, in any PHP app — Leaf or not.

Auth
Authentication
Login, registration, roles, permissions and subscriptions for any PHP app — sessions or JWT, one API.

Db
Database
Fluent queries and raw SQL without a heavy database layer — MariaDB, MySQL, Postgres, SQLite, SQL Server.

Kata
Design systems for AI
Compile your design system into a language AI can build with, so generated UIs come out looking like yours.
Hana JS
Frontend framework
Simple, lightweight React alternative for building user interfaces — from the same team.
25+ modules, one install away
Auth, databases, queues, mail, billing and more — grab exactly what you need, nothing else.
Agent-ready
Leaf gives AI enough structure to help without taking over. Ask for a feature, review familiar PHP files, and keep shaping the app by hand or with your agent.
Prompt starters
With the agent inside your project, each prompt starts from shared context plus the live codebase. Useful structural changes sync back when the work is done.
Agent output
reviewable PHPCommunity
Build alongside developers shaping how modern products are made. Share what you're building, get help when you're stuck, and compare the ways people are building with AI in real Leaf apps.
The Leaf Discord is where releases drop first, questions get answered, and builders show off what they're shipping — from weekend projects to production apps.
Start building with usBuilding in public
How we think about frameworks, AI-assisted development, and shipping products that last.
The biggest release in our history: a new routing engine, Leaf Crash, AI-native projects, and a family of stable modules.
The quiet had a reason. A year of rebuilding Leaf from the ground up, and what came out the other side.
Speak at an event
Want a Leaf core team member to speak? We'd love to bring practical Leaf 5 and AI-native PHP demos to your attendees.
Any format
Conferences, meetups, workshops, Twitter Spaces — we're flexible.
AI-native demos
We bring real code, real speed, and agent-friendly Leaf 5 walkthroughs.
Free of charge
We speak for free. Just cover travel if it's in-person.
Contributors
These contributors make Leaf cleaner, faster, and easier for humans and AI tools to understand.