Skip to content

Artisan commands ​

CommandDoes
lynx:install --user= --migrateDefault language, root page and roles. When no one is a superuser, offers to create one; --user (an id or email) makes an existing account one instead.
lynx:superuser --email= --name= --password=Creates a superuser's account, or makes the account with that email one. Asks for what the options don't give. Comes with lynxcms/admin.
lynx:migrate --forceLists the database changes waiting in Lynx packages, asks whether the database is backed up, then applies them; --force skips the question.
lynx:languagesLists the languages.
lynx:find "selector" --lang= --sqlRuns a selector; --sql shows the query.
lynx:schema:export --path=Writes the schema as YAML (default lynx/schema).
lynx:schema:apply --path= --dry-run --forceApplies schema files; --force also deletes what the files lack.
lynx:phpstan --path=Writes the field types Lynx's PHPStan extension reads, so $page->field and $item->field are checked (default lynx/phpstan/types.php).
lynx:export path --without-filesWrites a content package (a directory or a .zip); --without-files leaves media files out, for machines that download them from production.
lynx:import path --with-schema --prune --dry-runImports a content package.
lynx:backupWrites a content backup and keeps the newest ones.
lynx:schedule:runApplies due publishing schedules (the scheduler runs it every minute).
lynx:clean-html --field= --dry-runCleans stored HTML the way a save would.
lynx:search-index --template=Rebuilds the search index, for every page or one template's pages.
lynx:sort-keysRebuilds the stored sort values of the fields in lynx.sort_keys, after adding one or changing a field's fallback. See Finding Pages.
lynx:trigramInstalls PostgreSQL's pg_trgm and adds trigram indexes that speed up text selectors. See Finding Pages.
lynx:strings:scanLists the editable strings each template's view declares with @string, and reports problems. Templates without a view, such as settings pages and menus, are counted, not listed. See Views.
lynx:media:prune --older-than= --dry-runDeletes media files that no page, draft or revision uses (the scheduler runs it daily). Needs lynxcms/media.
lynx:media:pull --page=Queues downloads from production for the media files this machine lacks (LYNX_MEDIA_REMOTE). Needs lynxcms/media.
lynx:forms:purge --days=Deletes old spam and archived form submissions with their files. Needs lynxcms/forms.
lynx:sitemap --clear --warmLists the sitemap's parts; --clear drops the cached files, --warm builds them all now. Needs lynxcms/sitemap.
lynx:page-cache --clear --prune --warm --stats --compileDrops every stored page, drops expired ones (scheduled every minute), stores every public page now, counts them per template, or writes the settings serve.php reads. Needs lynxcms/cache.
lynx:static --path= --url= --zipExports the site as static files, to host without PHP. See Static site export. Needs lynxcms/static-site.
lynx:page-cache:server nginxPrints web server rules (nginx, apache or caddy) that send stored pages without PHP. Needs lynxcms/cache.
lynx:ask "prompt" --file= --applyAsks the agent to change the site.
lynx:demo --pages= --languages=Builds demo content, for trying Lynx and for benchmarks.
lynx:bench --lang= --runs=Measures selector and page loading times.
mcp:start lynxStarts the MCP server over stdio.

Released under the MIT License.