Last modified: September 26, 2025
The HubSpot CLI (Command Line Interface) connects your local environment to HubSpot, meaning you’ll have local copies of your app assets. This allows you to use version control, your favorite text editor, and various web development technologies when developing on the HubSpot developer platform.
In this guide, you’ll learn how to install the CLI and connect it to your HubSpot account.
For more commands and local file formats, check out the reference article.
The latest version of the HubSpot CLI, which is recommended, is 7.7.0
. You can check which version of the CLI you have installed by running hs --version
.
Install dependencies
To develop on HubSpot locally, you’ll need to install Node.js, which enables HubSpot’s local development tools. Versions 18 or higher are supported. It’s recommended to use a package manager like Homebrew or nvm to install Node.Install the latest version of the HubSpot CLI
Runnpm install -g @hubspot/cli
in your command line to install the HubSpot CLI globally. To install the tools in only your current directory instead, run npm install @hubspot/cli
.
If you prefer, you can also use Yarn. If you are using Yarn, commands are run with the yarn
prefix.
Getting an EACCES error when installing? See NPM Resolving EACCESS permissions errors when installing packages globally.
Authenticate your account
Next, runhs account auth
to connect the tools to your HubSpot account. Follow the prompts to generate a Personal Access Key in your account, then copy and paste it into the terminal to save your configuration. Learn more about CLI authentication.