Before installation make sure you have Node.js installed (>= 6.0, recommended latest LTS version)
Install the package globally
npm install @magnolia/cli -g or
npm update @magnolia/cli -g
Alternatively you can checkout the latest code and simply install it from source with
npm install -g
To invoke a command, execute
mgnl <command> [options] on your shell.
To see what commands are available simply enter
mgnl -h (or
jumpstart download and setup a Magnolia CMS instance for development.start start up a Magnolia CMS instance. To stop it, enter CTRL+Cadd-availability add component availability.build scan a node_modules folder for npm packages with the keyword "magnolia-light-module" (in package.json) and extract them to a directory of choice.create-component create a component and optionally add availability for it.create-light-module create a light module.create-page create a page template.customize-local-config extract "mgnl-cli-prototypes" folder and "mgnl-cli.json" file to customize CLI configuration.install install a light module from npm to the local Magnolia instance.search search a light module.tab-completion install tab autocomplete feature for Bash, zsh or PowerShellhelp [cmd] display help for [cmd]
As of version 2.1.0 two new commands have been added:
searchwhich helps you to discover light modules on npm
installto easily install a light module from the registry into your light modules folder
As of version 2.0 the
setup command has been replaced with
customize-local-config (or its alias
customise-local-config, yes with an s instead of z) because we thought it was a better name :)
To get help for any of the subcommands, simply enter
mgnl <subcommand> -h.
mgnl create-light-module -h will output:
Usage: mgnl-create-light-module <moduleName> [options]Creates a light module. Light modules are created under a 'root' folder which is observed by Magnolia for changes. The path to such folder is the value of 'magnolia.resources.dir' property at <magnoliaWebapp>/WEB-INF/config/default/magnolia.properties.Options:-h, --help output usage information-V, --version output the version number-p, --path <path> The path to the light modules root folder. If no path is provided, then the current directory is assumed to be the light modules root folder and the module will be created here.
This package provides a basic tab autocompletion feature for Bash, Z-Shell (zsh) and PowerShell. To enable it, simply run:
mgnl tab-completion install
This will scan your system for shell initialization hooks (like
.profile) and install it accordingly.
Tab autocompletion can be disabled again by running (while mgnl cli is still installed):
mgnl tab-completion uninstall