Mage docs

Every command, option and setting of Mage. New to Mage? Start with the install, then run mage help in a project.

Topics

  • Configuration

    Mage runs with defaults that suit most projects.

  • Environments

    Mage detects how a project runs, and runs its commands the matching way.

  • Scripts and agents

    Mage works the same from a CI job, a script or an AI agent as from a terminal, with a few things to know.

  • Composer fragments

    A composer fragment is a json file with a part of a composer.json, which mage add applies to the project.

  • Templates

    The files mage generates come from the templates folder of this repository.

  • Development

    The mage script in the root of the repository is built, never edit it directly.

Commands

  • add

    Add something to the project.

  • add admin

    Create an admin user.

  • add hyva

    Add the Hyvä Theme and make it the active theme where possible.

  • add i18n

    Collect the translatable phrases of a module or theme into i18n/en_US.csv.

  • add module

    Create a new module.

  • add patch

    Add patches through cweagans/composer-patches, and apply them right away.

  • add sample

    Add sample data, one set at a time.

  • add store

    Create a store view with its own domain.

  • add storeinfo

    Add the Siteation StoreInfo modules.

  • add theme

    Create a child theme of a given parent theme.

  • backup

    Back up the database, and optionally the media, to set the project up on another device.

  • build

    Build themes with their npm scripts, or watch one.

  • clean

    Clean caches and generated files.

  • create

    Create a new project, install it and set it up, in a new folder.

  • enable and disable

    Enable or disable modules, by name or by term.

  • info

    Show the main facts of the project.

  • log

    Follow a log in var/log.

  • nuke

    Permanently delete the project.

  • open

    Open a store view, the admin or the mail catcher in your browser.

  • outdated

    List the direct dependencies that have a newer version.

  • reindex

    Reindex everything, then clean the cache so the result shows.

  • del

    Remove composer packages, by name or by term.

  • restore

    Replace the database with a backup of mage backup, unpack its media, and set it up for this device.

  • run

    Run n98-magerun2, with all arguments as is.

  • set

    Change a setting of the project.

  • show

    Show information about the project.

  • sync

    Pull pub/media from a server with rsync, and with --db also the latest backup of mage backup.

  • upd

    Update composer packages, by name or by term.

  • watch

    Watch the files of the project, and clean only the caches a change affects, with Mage-OS Cache Clean.