Lapis Docs

Running a site

Console

Every Lapis site has a console, ./lapis, in its root folder. Run it without arguments to see every command of Lapis, of the site's own app/ folder and of the installed plugins:

./lapis

Commands

These are the commands Lapis ships, by topic:

Topic Commands
Setting up setup, routes, cache:clear, plugins
Users user:create [--role=editor], user:password, user:list, user:role <email> <role>, user:disable <email>, user:enable <email>, log:prune
Assets importmap:require, importmap:remove, importmap:install, importmap:list, assets:compile, assets:clear, storage:link
Backups backup [--name=…] [--uploads=false], backup:daily, backup:list, backup:restore <name> [--force]
Maintenance down [--message=…] [--retry=600], up
Media media:stats, media:prune [--orphans], media:regenerate, media:clean-svg [--dry-run]
Going live deploy, doctor, publish:scheduled
Data and forms data:status, data:migrate [--force], make:table <name>, forms:prune
Migrations migrate:status, migrate:up, migrate:validate, migrate:rehash
Coding agents skill:install [--force]

Cron runs schedule:run every minute, which in turn runs the daily backup, the scheduled publishing and the cleanups. See Deploying.

Migrations

Lapis's own tables, the plugins' and the site's (app/) all come from Tempest migrations, and new ones run by themselves on the next request. migrate:status lists them and whether each has run, migrate:up runs the new ones now (in a deploy script, for example), migrate:validate checks that none was changed after it ran, and migrate:rehash accepts the current files (and forgets the records of removed ones). The tables of data/*.php follow their definitions instead (data:status, data:migrate).

Tempest's commands

Tempest's own commands are kept apart, so the overview stays short. ./lapis tempest lists them, and ./lapis tempest <command> … runs one with all its arguments:

./lapis tempest migrate:down

They also run by their own names (./lapis migrate:down), and ./lapis --all lists everything at once. migrate:down stays here on purpose: it rolls back every migration that has a down, the plugins' tables included. migrate:fresh is not there at all, as it would drop Lapis's content too.

Coding agents

./lapis skill:install writes a skill for coding agents into .agents/skills/lapis/SKILL.md. This is the folder shared by the agents that follow the open Agent Skills format. The skill tells an agent how a site is built, which page of this documentation answers what, and the pitfalls no file shows.

The skill points to vendor/lapis/cms/docs/, so an agent always reads the documentation of the installed version. An agent that only reads its own folder gets a copy there, when the project has that folder (today, .claude/). The starter site runs the command on composer create-project.

After updating Lapis, ./lapis skill:install --force replaces the skill with the new version's. Keep the site's own notes for agents in AGENTS.md, not in the skill.