Exploring Magnolia CLI v5
Magnolia CLI v5 is more than a tool - it’s your powerful development assistant.
Magnolia in action
Take 12 minutes and a coffee break to discover how Magnolia can elevate your digital experience.
Whether you’re building Freemarker-based projects or headless solutions, CLI v5 streamlines workflows, reduces setup time, and keeps your focus on building great applications.
Let’s explore how Magnolia CLI v5 makes it easier to set up, customize, and develop projects by automating repetitive tasks and simplifying configurations.
What is Magnolia CLI v5?
Magnolia CLI v5 is built to handle the key tasks that developers face when building applications with Magnolia. By automating project setup and template creation, CLI v5 speeds up delivery, letting you concentrate on core tasks instead of setup.
For a full overview of the CLI’s capabilities, visit our documentation page.
Magnolia CLI v5 in Action: Key Features
1. Unified Support for Freemarker and Headless Projects
Previously, you needed separate tools for Freemarker-based and headless projects. Magnolia CLI v5 changes that by unifying support for both project types, offering a consistent interface for all Magnolia applications. This simplifies the learning curve, making it easier to switch between project types.
2. Quick Project Setup with `jumpstart`
The `jumpstart` command is a core efficiency feature in CLI v5. With just one command, you can set up a fully configured project tailored to your needs. This command structures the project automatically, letting you dive directly into coding without extra setup time.
`npx @magnolia/cli jumpstart`
3. Modular Architecture with Plugins
Magnolia CLI v5 is built on a plugin-based system, which makes it modular and highly customizable. This architecture allows you to install only the features you need or create custom plugins that extend CLI functionality.
To see the full list of available plugins, read the documentation.
This plugin system gives you full control. You can select only the features you need, tailor the CLI to your requirements, and improve efficiency across projects.
The bulk of CLI commands allow developers to quickly generate new starter files for use with Magnolia Light Modules, including pages, components, blocks, and apps.
Automating Development Tasks with Magnolia CLI v5
Magnolia CLI v5 offers a range of commands to automate creating essential elements for your project. This saves you time on repetitive tasks and reduces common development errors by ensuring consistent file structures and configurations. Depending on your project, CLI v5 can also generate either Freemarker templates or JavaScript code.
Here’s a breakdown of available plugins:
Create App plugin: Defines a new app template, allowing you to structure content and functions that editors and users interact with.
Create Block plugin: Generates a new block definition, ideal for creating modular content pieces in visual editors or applications like the Stories App.
Create Component plugin: Creates new components with essential fields, like title, image, and link, and includes options to make components available on specific pages.
Create Content Type plugin: Establishes a new content type template for structured and consistent content entry across various apps and pages.
Create Light Module plugin: Sets up a new light module with the correct folder structure, organizing templates, configurations, and resources for modular development.
Create Page plugin: Creates a new page template with configurable properties, providing the layout basis for individual pages in your project.
Create Virtual URI plugin: Adds a virtual URI mapping configuration, allowing for flexible redirection and customized URL paths.
Additionally, CLI v5 allows developers to create and manage custom prototypes. This lets you focus on developing custom functionality while CLI v5 handles the setup and configuration.
Local Development Made Easy - Starting Magnolia Locally
Magnolia CLI v5 simplifies starting your Magnolia instance locally. With a single command, you can spin up your Magnolia instance, develop, and test changes in real time.
Using the CLI to run Magnolia locally keeps the development process seamless. You can see your updates instantly, making local testing efficient.
Advanced Customization and Plugin Development
With Magnolia CLI v5, you can use available commands and templates, and also create your own plugins. This gives you full control over your development environment, letting you configure the CLI to your specific project requirements.
Creating custom plugins allows you to expand the CLI’s capabilities to match your needs, ensuring it grows with your project and adapts to any changes.
Magnolia Low-code Development
Simplify and speed up development with Magnolia using file-based configuration.
What’s Next for Magnolia CLI v5?
Magnolia CLI v5 is designed with extensibility in mind, and we’re continuously improving it based on feedback from the developer community. Future updates will enhance support for various project types even further, adding flexibility and new customization options to meet the demands of modern development workflows.
Why You Should Try Magnolia CLI v5 Now
Magnolia CLI v5 is designed to be a valuable tool for developers. By bringing Freemarker and headless project support together, offering a modular plugin-based architecture, and automating repetitive tasks, CLI v5 enhances the development experience.
Whether you’re an experienced Magnolia developer or just getting started, CLI v5 gives you the tools to create, customize, and manage projects more efficiently. Try it out today and see how it can transform your workflow.
Ready to get started?
Check out the documentation at mgnl.io/cli to learn more and start using Magnolia CLI v5 today!