Fire up your Magnolia CMS project with Magnolia CLI
Magnolia CMS offers a really neat and novel way to get running quickly with development. There’s a CLI (command line interface) that can be installed from NPM to start up Magnolia quickly and easily.
npm install @magnolia/cli -g
(you may need to use sudo on some systems to install this)
This gives you the ‘mgnl’ command. If you now use ‘mgnl jumpstart’ it’ll offer you a list of choices, including the DX versions (you’ll need a username and password). The tool will download the right version, set it up, and bootstrap the project ready to run.
You can then start up Magnolia CMS with ‘mgnl start’ and away you go. It’s really that easy, and very well geared towards development with light modules. Of course, you’ll need to have Java 8+ and NPM already installed, but you already should have these if you’re planning on working with Magnolia CMS.
At the moment the recommended versions of Java and Node are JDK 11 and Node 12, but be sure to check the documentation. As a general rule, the LTS versions are usually the right choice.
To get information on the commands available use: mgnl help
C:\>mgnl help Usage: mgnl <command> [options] A tool to setup and facilitate light development with Magnolia CMS Options: -v, --version output the version number -h, --help output usage information Commands: jumpstart download and setup a Magnolia CMS instance for development. start start up a Magnolia CMS instance. To stop it, enter CTRL+C add-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-app create an app. create-block create a block. create-component create a component and optionally add availability for it. create-content-type create a content type. create-light-module create a light module. create-page create a page template. create-virtual-uri create a virtual uri mapping. 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 for a light module on npm. tab-completion install tab autocomplete feature for Bash, zsh or PowerShell version display mgnl and node.js versions help [cmd] display help for [cmd] mgnl: 3.1.0 node: v12.11.1 os: win32 As you can see from the list of commands, it’s possible to create a new Magnolia CMS instance, start it, and create various parts of your application using this tool.
You can find the official documentation on Magnolia CLI here in the Magnolia documentation: https://documentation.magnolia-cms.com/display/DOCS61/Magnolia+CLI