Skip to content
API and agents

Command line

Run abilities, build the site and manage users, tokens and plugins from the terminal.

On this page

Run php cms from your site folder.

CommandDoes
cms installInstall a site (see Installation).
cms serve --port=8000Development server.
cms runList abilities.
cms run <ability> key=value …Run an ability. Values may be JSON: cms run entries/create collection=pages title=About 'data={"summary":"Hi"}', or pass the whole input with --json='{…}'.
cms buildBuild the whole static site. --strict fails on warnings, such as a missing image.
cms links:checkFail on links, images and anchors in the built site that lead nowhere. External links are left alone.
cms syncRun migrations and plugin install/upgrade steps, and import content/media.
cms packages:updateCheck the signed update list and update the core. --check only says what's on offer. --security-only does what an admin's visit would, for cron.
cms license:status, license:set <key>, license:refresh, license:clearRead or change the licence of a paid plugin. license:status --json prints the whole report. They don't show in cms list.
cms media:checkImport content/media and report what's broken: see Media. --strict, --json, --adopt.
cms pluginsList plugins and modules with their status.
cms starter:refresh --forcePut the Site plugin's starter kit back on this site, after a snapshot in storage/backups/. Accounts and settings stay. For working on the kit.
`cms plugin enabledisable
cms user:create --email= --name= --role=Create a user (--super for a super administrator).
cms token:create <email> --scope=… --days=Create an API token.
cms publish:scheduledLet scheduled entries go live (run from cron every minute).

Abilities run from the CLI act with full rights and are logged as cli in the audit log. Abilities can opt out of the CLI with expose: ['cli' => false].