Install dependencies
To develop on HubSpot locally, you’ll need to install Node.js, which enables HubSpot’s local development tools. Versions 20 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.
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.