You need PHP 8.3 or newer, Laravel 12.62 or newer (or Laravel 13), and git on developer machines and in CI. Production servers do not need git.
- Require the package
bash composer require larecipe/larecipe - Run the installer
bash php artisan larecipe:installIt asks a few questions. The defaults suit most apps, so you can press Enter through them.
- Open your docs
Visit
/docs. The first page is a short Introduction written from your app: its name, its Laravel version, its first-party packages and the opening of your README.
That is a working site. The installer also set up your coding agents, so the docs stay current from the first push. Commit what it wrote, except the file in bootstrap/cache.
Next, let your coding agent write real starter pages from your code: Your first docs.
What the installer asks
Every question has a flag, so you can answer up front or run the installer in a script.
| Question | Flag | Default |
|---|---|---|
| Where should the docs live? | --driver=repository or --driver=database |
repository |
| The docs folder of a repository set | --path=docs |
docs |
| Which coding agents to set up | --agents=claude,codex,cursor,gemini,copilot, or --agents=none |
The agents it detects |
| Hold an agent's push once when it leaves pages stale | --no-hooks to skip |
Yes |
| Also check pushes people make without an agent | --git-hook=warn or --git-hook=strict |
No |
| Add the optional no-AI docs check for pull requests | --ci=fail or --ci=comment |
No |
| Review mode for docs changes | --review=required or --review=auto |
required |
Refresh the agent setup after every composer update |
--composer-script |
Asked |
Add @AGENTS.md to an existing CLAUDE.md |
--claude-md |
Asked |
| Generate starter docs now | --onboard=product,api,package,internal and --onboard-agent=claude |
Asked when an agent is installed |
--dry-run shows every file the installer would change without writing anything, and --no-index leaves the docs index out of AGENTS.md. Run the installer again at any time: it merges into files you already have and never overwrites them.
What it writes
The docs folder with a manifest and an Introduction page, and the setup your agents read: a LaRecipe block in AGENTS.md, four skills, the local MCP server in each agent's config, and the pre-push hook for Claude Code and Codex. A git hook and a CI workflow are written only when you ask for them.
Every file the installer writes
| File | What it is |
|---|---|
docs/larecipe.json |
The doc set's manifest: the name from APP_NAME and the $schema pointer. |
docs/index.md |
The Introduction page, with sources: pointing at README.md and composer.json, so it shows up as stale when they change. Skipped when docs/index.md, docs/README.md or docs/introduction.md exists. |
database/migrations/docs/{timestamp}_docs_introduction.php |
With --driver=database only, in place of the two files above: a docs migration that gives the set its name and the same Introduction page. |
config/larecipe.php |
Published only when you pick something other than the defaults (the database driver, another folder, or auto review). |
AGENTS.md |
A marked LaRecipe block: what to do with the docs before every push, and a compact index of your pages. See agent instructions. |
CLAUDE.md |
@AGENTS.md, added only with your consent, so Claude Code reads the same instructions. |
.claude/skills/, .agents/skills/ |
The four LaRecipe skills. See skills. |
.mcp.json, .codex/config.toml, .cursor/mcp.json, .gemini/settings.json, .vscode/mcp.json |
The local larecipe MCP server (php artisan larecipe:mcp), in the file each detected agent reads. |
.claude/settings.json, .codex/hooks.json |
The pre-push and SessionStart hooks, for Claude Code and Codex. See the pre-push hook. |
.git/hooks/pre-push |
Only with --git-hook. It respects core.hooksPath. |
.github/workflows/larecipe-docs-check.yml |
Only with --ci. See the optional CI check. |
composer.json |
@php artisan larecipe:agents --ansi in post-update-cmd, only with your consent. |
bootstrap/cache/larecipe/hooks.php |
The compiled push patterns the hook reads, so ordinary shell commands never boot Laravel. Not committed. |
The installer merges into files you already have. Other MCP servers and hooks stay where they are, an existing larecipe entry is left alone, and a file it cannot parse is skipped with a note.
Details
Run it without questions
In a script, in CI or in a dev container, pass --no-interaction with the answers you want:
php artisan larecipe:install --no-interaction \
--driver=repository \
--agents=claude,codex \
--review=required \
--claude-md \
--composer-scriptWithout a terminal to ask, the installer uses the defaults in the table above: the repository driver, the agents it detects, the agent hooks, no git hook, no CI check, required review, and no change to composer.json or CLAUDE.md unless you pass the flag. Onboarding never runs without --onboard.
How it finds your agents
The installer detects an agent in two ways: its CLI on your PATH (claude, codex, cursor-agent, gemini, copilot), or its files in the project (.claude, CLAUDE.md, .codex, .cursor, .gemini, GEMINI.md, .github/copilot-instructions.md). It only writes config for agents you use.
Where the docs folder may live
The docs folder must be inside your app. The installer refuses a --path that is the app's root folder itself, or a folder outside it.
With Laravel Boost
When laravel/boost is installed, Boost ships LaRecipe's instructions and skills, so LaRecipe writes no AGENTS.md block and no skill copies of its own. Run php artisan boost:install (or boost:update) and select larecipe/larecipe. larecipe:install still writes the MCP config and the hooks. See agent instructions.
With the database driver
--driver=database keeps the docs in your database, with an admin UI and docs migrations for changes made in pull requests. The installer writes no docs/ folder in this case. It writes a starter docs migration instead, database/migrations/docs/{timestamp}_docs_introduction.php, with the set's name and the same Introduction page. Running the installer again never writes a second one. Then:
- Run
php artisan migrate. It creates LaRecipe's tables, which load from the package (publish them withphp artisan vendor:publish --tag=larecipe-migrationsto customize them), and applies the starter migration, so/docsopens on the Introduction right away. - Use a persistent cache store. A database set always runs behind a cache, and the installer warns when the store is
arrayornull. SetLARECIPE_CACHE_STOREtoredis,databaseorfile.
Read the database source before you choose it. Most teams start with the repository.
Codex and Ask AI
Two steps the installer prints when they apply:
- Codex: trust the project in
~/.codex/config.tomland approve the LaRecipe hooks with/hooks, so Codex loads them. - Ask AI needs
laravel/aiand a provider key of your own:composer require laravel/ai. Everything else works without it. See Ask AI.
Every option of larecipe:install
Read live from this app's command registry:
larecipe:installInstall LaRecipe: your docs, and the agent setup that keeps them current
php artisan larecipe:install [--driver [DRIVER]] [--path [PATH]] [--agents [AGENTS]] [--no-hooks] [--git-hook [GIT-HOOK]] [--ci [CI]] [--review [REVIEW]] [--claude-md] [--no-index] [--composer-script] [--onboard [ONBOARD]] [--onboard-agent [ONBOARD-AGENT]] [--dry-run]| Option | Description | Default |
|---|---|---|
--driver=DRIVER | repository (recommended) or database | |
--path=PATH | The docs folder of a repository set | docs |
--agents=AGENTS | Agents to set up, comma-separated (claude,codex,cursor,gemini,copilot), or "none" (default: the ones detected) | |
--no-hooks | Skip the pre-push and SessionStart agent hooks | |
--git-hook=GIT-HOOK | Also install the git pre-push hook: warn or strict | |
--ci=CI | Add the optional no-AI CI check: fail or comment | |
--review=REVIEW | required (default) or auto | |
--claude-md | Add @AGENTS.md to CLAUDE.md without asking | |
--no-index | Leave the docs index out of AGENTS.md | |
--composer-script | Add larecipe:agents to composer post-update-cmd without asking | |
--onboard=ONBOARD | Then write starter docs for these audiences: product,api,package,internal | |
--onboard-agent=ONBOARD-AGENT | The agent to run onboarding with | |
--dry-run | Show what would change without writing anything |
Next
- Your first docs: let your coding agent write starter pages from your app.
- Configuration basics: the few settings most apps change.
- Project structure: what goes where in
docs/.