Commands
| Command | Where | Does |
|---|---|---|
mela:install | Your machine | Sets up MelaCMS in a fresh Laravel app |
mela:update | Your machine | Updates the core and applies it |
mela:super-admin | The server, or anywhere | Creates a super-admin, or gives the role to an existing account |
mela:media-regenerate | Anywhere | Makes the image sizes again |
mela:install
Sets up MelaCMS: config, migrations, user model, roles, super-admin, Filament assets, storage link, welcome route, workflow templates and agent instructions. Safe to run again. See Installation.
| Option | Purpose |
|---|---|
--name= | Super-admin name |
--email= | Super-admin email |
--password= | Super-admin password, at least 8 characters |
--locales= | Comma-separated site languages, for example en,it |
--force | Replace project files that differ from the core templates |
Without the options it asks for each value. With --no-interaction, --email and --password are required.
mela:update
Asks Composer for the newest MelaCMS release, requires it, then applies it: migrations, roles, the storage link, the agent instructions, and a question for each workflow template the core changed. It then prints the commands that test, commit and release the update, and runs none of them. See Updating the core.
| Option | Purpose |
|---|---|
--installed | Apply the core already in vendor/, without looking for a newer version |
--check | Change nothing, and fail when the agent instructions are behind the installed core. Run by the site's CI |
On a production environment it does not look for a new version.
mela:super-admin
Changes the database only, so it is the command to run on a server after the first deploy. It creates the core roles if they are missing, then the super-admin account. If the email belongs to an existing user, that user keeps their name and password and gains the role.
| Option | Purpose |
|---|---|
--email= | Email of the account |
--name= | Name of a new account |
--password= | Password of a new account |
mela:media-regenerate
Makes the image sizes of every file in the media library again. Run it after changing media.conversions or media.quality in the config.
The new sizes are written first, and the ones no longer used are deleted last. A file that cannot be made again (its original is missing, it cannot be read, it needs more memory than PHP allows, the disk refuses to write) keeps the sizes it has, and the others go on. A size the disk wrote only in part is removed, and url() gives the original in its place. The command names each file with a problem and ends with a non-zero exit code. Fix the cause and run it again.