CLI Commands
Laravix ships six Artisan commands under the laravix: namespace. This is their complete reference; standard Laravel commands (migrate, queue:work, scout:import, …) apply as usual.
laravix:install
Interactive first-run setup: database, assets, first site and super admin.
php artisan laravix:install [options]
| Option | Effect |
|---|---|
--force |
Run even when sites already exist |
--site-name= |
Name of the first site |
--domain= |
Domain of the first site |
--admin-name= |
Name of the super admin |
--admin-email= |
Email of the super admin |
--admin-password= |
Password of the super admin (min 8 characters) |
--no-interaction |
Fail instead of prompting (requires the options above; the database must already be reachable) |
Installing into containers adds the flags of laravix:docker:
| Option | Effect |
|---|---|
--docker |
Generate a Docker environment and run the installation inside it |
--db= |
Database service in the container: mysql, pgsql or sqlite |
--search |
Add a Meilisearch container |
--mail |
Add a Mailpit container |
--redis |
Add a Redis container |
--no-worker |
Leave out the queue worker container |
--no-scheduler |
Leave out the scheduler container |
--port= |
Host port the site is served on |
--continue= |
Internal: resume the installation inside the container from a state file. Not meant to be run by hand |
What it does, in order: ask how to run Laravix (Docker or local services — skipped with --no-interaction or when a compose.yaml already exists), then either hand over to the Docker path or continue locally with database setup (prompting for SQLite/MySQL/PostgreSQL if unreachable, writing .env), guard against an existing installation, migrate --force, storage:link, laravix:theme:link, publish assets/config/views and Filament assets, publish the default theme (skipped if themes/default exists), create the first site (theme mode), create the super admin via laravix:user.
On the Docker path it collects the site and admin details up front, writes the Docker files and .env, generates an application key if needed, starts and waits for the containers, then re-runs itself inside the container with --continue.
laravix:docker
Generate a Docker environment (compose.yaml, docker/, .env) for local development.
php artisan laravix:docker [options]
| Option | Effect |
|---|---|
--db= |
Database service to run: mysql, pgsql or sqlite |
--search |
Add a Meilisearch container |
--mail |
Add a Mailpit container |
--redis |
Add a Redis container |
--no-worker |
Leave out the queue worker container |
--no-scheduler |
Leave out the scheduler container |
--port= |
Host port the site is served on |
--force |
Overwrite an existing compose.yaml |
Without --force the command refuses to run when a compose.yaml is already present, so it will never quietly overwrite an environment you have tuned by hand. Queue worker and scheduler containers are generated by default. See Docker development environment for what ends up in each file.
laravix:theme:link
Expose every theme dist/ directory under public/themes so the browser can reach it.
php artisan laravix:theme:link [--force]
--forcereplaces links that already exist.- Only directories containing a valid
theme.jsonare treated as themes. laravix:installruns this for you; run it by hand after adding a theme, or when theme styles suddenly 404.
See Theme Structure.
laravix:user
Create a user that can log into the admin panel.
php artisan laravix:user [--name=] [--email=] [--password=] [--super]
--supercreates a super admin (access to all sites).- Without
--super, the command asks — and for a regular user it prompts for a site and a role (admin,editor,viewer). - Fails if the email is already taken; passwords must be at least 8 characters.
This is also the fastest way to attach a brand-new user to a site without the email invitation flow.
laravix:upgrade
Upgrade the Laravix core: composer update, migrations and asset republish.
php artisan laravix:upgrade [--force]
--force skips the "back up your database" confirmation. When a newer minor release is available, the command raises the laravix/cms constraint in your composer.json instead of staying pinned to the range you installed with. The full step-by-step behavior and failure recovery are described in Upgrading. Honors the COMPOSER_BINARY environment variable when Composer isn't on the PATH.
laravix:publish-scheduled
Publish scheduled content whose published_at date has passed.
php artisan laravix:publish-scheduled
Prints how many items were published. You normally never run this yourself — the package schedules it every minute, so it just works wherever php artisan schedule:run is wired into cron (see Deployment). Running it manually is handy when testing scheduling locally.
Useful standard commands in a Laravix context
| Command | Why you'd run it |
|---|---|
php artisan vendor:publish --tag=laravix-theme |
Get a fresh copy of the default theme into themes/default |
php artisan vendor:publish --tag=laravix-config |
Publish config/laravix.php for customization |
php artisan vendor:publish --tag=laravix-assets --force |
Republish admin assets (part of the upgrade) |
php artisan scout:import "Laravix\Cms\Models\Content" |
(Re)build the search index |
php artisan scout:sync-index-settings |
Push Meilisearch index settings |
php artisan queue:work |
Process image variant jobs |