Last modified: August 22, 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 current recommended version of the HubSpot CLI is 7.6.0 or later.

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

Run npm 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.

Authenticate your account

Next, run hs 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.

Next steps

Now that you’ve installed the CLI and authenticated your account, you can proceed to create your first app, or learn more about using the CLI: