
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
@magnolia/cli
Advanced tools
Magnolia CLI version 5 is a plugin-based system.
The purpose of this architecture is to offer developers enhanced flexibility, control, customization of commands, and definition of their own project templates.
You can install the CLI manually or by using a Jumpstart Plugin, which will prompt you to choose a project template and automatically installs the CLI at project level and sets up the required files (package.json and mgnl.config.js) for you.
npx @magnolia/cli jumpstart
While both global and local installations of Magnolia CLI are possible, it is recommended to install the CLI locally at the project level. Which allows each project to maintain its unique configuration within a mgnl.config.js file and to have separate plugins per project.
Install the Magnolia CLI:
npm install @magnolia/cli
Add the following script to package.json:
{
"scripts": {
"mgnl": "node node_modules/@magnolia/cli"
}
}
so you can use following command:
npm run mgnl
or you can run it directly with node:
node node_modules/@magnolia/cli
In package.json, set the type property to "module":
{
"type": "module"
}
Create the mgnl.config.js file, where you configure your plugins:
export default {
plugins: [],
logger: {
filename: "./mgnl.error.log",
fileLevel: "warn",
consoleLevel: "debug"
}
};
sudo npm install @magnolia/cli -g
For a list of available plugins, please refer to CLI Documentation
The add-plugin command is a included in the CLI. This plugin automates the installation and configuration of new plugins within the mgnl.config.js file.
npm run mgnl -- add-plugin <plugin> [<pluginArgs>]
Replace <plugin> with one of the following options based on your source:
References for further details:
Optionally, the <pluginArgs> argument allows you to pass an object (JSON) that the plugin constructor will receive during initialization.
The command installs the new plugin by executing npm install <plugin> or yarn add <plugin>.
After, it identifies the appropriate plugin's class name and writes it into the mgnl.config.js file for you.
In the project folder install the package with desired package manager.
npm install <plugin>
Then register the plugin in mgnl.config.js:
import <PluginClass> from <plugin>
export default {
plugins: [
new <PluginClass>()
]
}
Observe that the plugin was successfully registered under "Commands" in help:
npm run mgnl -- --help
To start a plugin in the context of the CLI, you can run the mgnl script with the plugin name and its options. Here's an example:
npm run mgnl -- <plugin-name> -<plugin-option> <option-value>
NOTE: By default, npm outputs additional information about the script. If you prefer to suppress this output, you can add the --silent (or -s) flag when running the script:
npm run -s mgnl -- <plugin-name> -<plugin-option> <option-value>
To help us improve our services, we collect the following information:
@magnolia/cli package you are using.We use this data to enhance your experience by understanding how the CLI and plugins are being used. All collected data are anonymous and not tied to any individual. No personal information is collected.
If you prefer to opt out, you can disable analytics by setting 'analytics.enabled' to 'false' in the mgnl.config.js file.
For detailed documentation of the CLI, please refer to CLI Documentation
This CLI is created to work with Magnolia CMS. For more information, please refer to Magnolia CMS Documentation
FAQs
CLI for light development of Magnolia projects
The npm package @magnolia/cli receives a total of 115 weekly downloads. As such, @magnolia/cli popularity was classified as not popular.
We found that @magnolia/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.