What’s New with HubSpot CMS CLI [2021 Updates]
March 23, 2021
HubSpot is dedicated to making its content management system (CMS) one of the best web development tools available through frequent updates and improvements. Being the HubSpot CMS wizards that we are, we thought we would break down a few of the latest updates made to the HubSpot CMS command line interface and what they mean for developers (hint: faster development and fewer headaches).
The command line interface (better known as the HubSpot CLI) connects your local workflow to HubSpot and its CMS. This allows you to take advantage of local development tools when developing in HubSpot’s CMS Hub, such as version control, your favorite text editor, and various other web development tools.
The CMS Hub local development update supports a host of local projects including modules, templates, HTML, CSS, and Javascript files. You can then easily sync your local projects to HubSpot Design Tools. Better still, HubSpot has included the ability to automatically sync changes of local files. This creates a seamless integration between your code editor and HubSpot, allowing for rapid development.
Thankfully, HubSpot has created a guide to help you get off and running with the local development tools, including connecting your local project with your HubSpot CMS, configuring the local tools, and syncing the projects.
What are the benefits of local CMS development?
Use Your Tools
HubSpot has invested a lot of time into its CMS development tools. However, as every developer knows, eventually you’ll want to use a tool from a different project. Thanks to this latest update, you can pull in text editors, version control tools, and even testing frameworks from different projects.
Use Version Control
If you depend on a version control system to keep track of changes and even use it as a backup when things break, you can now incorporate it into your HubSpot project locally. This feature allows developers to push up and pull down previous versions of their work, just like any other version-controlled software project.
Use Any Web Technology
HubSpot currently supports Bootstrap 2 and jQuery as system defaults, and developers were previously limited to just these two frameworks. However, with local development, you can import nearly any library or framework into your project. This opens the HubSpot CMS to frameworks like Javascript, CSS, and more.
Increase Your Productivity
As HubSpot continues to open up more options and flexibility for developers within its CMS, developers are becoming more efficient and productive with the tool. Gone are the days of having to cobble together chains of programs to accomplish your goals. Better yet, because everything can be done in one environment, there are fewer chances for bugs to occur during the development process.
What are the new commands?
Now that we’ve covered the benefits of local development and how to sync your project, let’s explore some of the new commands HubSpot has implemented and what they allow developers to do.
List
This command enables developers to list files stored in the developer file system either by path or from the root. This command works similarly to using standard ls to view your current directory on your computer.
Fetch
Now developers can fetch a file or directory in addition to its child folders and files by path.
This command will take the files from your HubSpot account and bring them into your local environment. The <src> should be the path from your HubSpot Design tools. The <dest> is the local directory where you would like to add these files.
Upload
The upload command allows you to add new local assets to your HubSpot account. The best part is that changes are live immediately!
These new tools and commands allow developers to do what they do best with the tools they are most familiar with and comfortable using. HubSpot’s commitment to improving the CMS and allowing developers the freedom to use local development tools means better and faster development within the HubSpot CMS.
As these tools continue to grow and improve, development projects in the CMS will be able to be completed more quickly and efficiently—giving marketers the ability to hand off their development projects and achieve their goals.
About the author
Mitch Transue is a Demand Generation Strategist based in Charleston, South Carolina. With over seven year of experience in digital marketing, he enjoys helping clients reach their goals and working as part of a larger team. In his free time, you can find him either running or enjoying the beach with his wife and dog. Read more articles by Mitch Transue.