Skip to content

HubSpot CLI ​

Starter

Install ​

bash
npm install -g @hubspot/cli
hs --version

Auth ​

Modern CLI uses a global config (personal access key), often at ~/.hscli/config.yml.

bash
hs account auth
# or follow prompts from project create scripts
hs accounts list

Classic theme upload / watch ​

bash
# from theme root (patterns may vary by project type)
hs upload src remote-theme-name
hs watch src remote-theme-name
hs fetch remote-theme-name src

Projects platform (apps / CMS React) ​

bash
hs project upload
hs project deploy
hs project open
hs project dev          # when supported for your project type

Always:

bash
hs --help
hs project --help

Tips ​

  • Prefer sandbox portals for first upload
  • Keep secrets out of themes (use HubSpot secrets / env features)
  • Pair with VS Code HubSpot extension for HubL highlighting

Official ​