Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/public/ai/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.bashrc && source ~/.
echo 'export PATH="$PATH:$HOME/.composer/vendor/bin"' >> ~/.zshrc && source ~/.zshrc
```

**Always use the global `leaf` CLI (no `php` prefix) for everything.** It carries its own commands (`create`, `install`, `uninstall`, `context`, `up`, `update`) and forwards anything else (`db:*`, `g:*`, `scaffold:*`, ...) into the project's own console automatically, so `leaf g:controller Posts` and `leaf db:migrate` just work. `php leaf`, by contrast, runs only the project console, so `php leaf install` and `php leaf context` fail with "not found". Only fall back to `php leaf <command>` when the global CLI isn't installed, and then `leaf install auth` becomes `composer require leafs/auth`.
**Use the global `leaf` CLI (no `php` prefix) whenever it is installed.** Check with `which leaf`. It carries its own commands (`create`, `install`, `uninstall`, `context`, `up`, `update`) and forwards anything else (`db:*`, `g:*`, `scaffold:*`, ...) into the project's own console automatically, so `leaf g:controller Posts` and `leaf db:migrate` just work. If `leaf` is not installed, run the same command as `php leaf <command>` from the project root. `php leaf install` and `php leaf context` work there too in current MVC and API projects. On an older project where they are missing, `leaf install auth` becomes `composer require leafs/auth`. `create`, `uninstall`, `up` and `update` exist only in the global CLI, which installs with `composer global require leafs/cli`.

| Command | Description |
|---|---|
Expand Down Expand Up @@ -249,7 +249,7 @@ Read the relevant file before generating code for that area:

| Topic | File |
|---|---|
All reference files live at `https://leafphp.dev/ai/references/<name>.md`, fetch them raw from there.
Reference files ship with the framework at `vendor/leafs/mvc-core/ai/references/<name>.md`, so read them from disk first. Only if that path is missing, fetch `https://leafphp.dev/ai/references/<name>.md` raw.

| Lite apps: the manual setup contract (db, views, Vite, schema) | `references/lite.md` |
| Routing (methods, groups, dynamic routes, constraints) | `references/routing.md` |
Expand Down