Last modified: August 22, 2025
The HubSpot command line interface (CLI) connects your local development tools to HubSpot, allowing you to develop on HubSpot with version control, your favorite text editor, and various web development technologies. Below, learn about the CLI commands available while you’re developing with HubSpot projects. You can also refer to the standard CLI commands reference for general commands such as hs auth. The current recommended version of the HubSpot CLI is 7.6.0 or later.
You can run hs project --help at any time in your terminal to learn more about project-specific commands.

Update the CLI

Update your CLI to the latest version.
npm install -g @hubspot/cli@latest

View all commands

List all project-specific CLI commands.
hs project help
To learn more about a specific command, enter the command followed by --help.

Create a new project

Create a project in a specified directory. You’ll be prompted to give the project a name, as well as confirm the local location. You’ll then select whether to start the project from scratch or from a sample template. Learn more about the project structure and how to get started in the app creation guide. Once you’ve created a project, you can run other project commands inside your project directory and HubSpot will automatically recognize your project.
hs project create --platform-version 2025.2

Upload to HubSpot

Upload the project to your HubSpot account and create a build. If the project hasn’t been created in the account yet, you’ll be asked whether you want to create it. If the project is configured to auto-deploy, this command will automatically deploy after the build is successful. By default, new projects are set to auto-deploy.
hs project upload
You can upload a project to a specific account in your ~/.hscli/config.yml file by adding --account=accountName to the command. For example, hs project upload --account=main. This can be useful when switching between uploading to a sandbox account and then uploading to the main account. For example, your workflow might look like:
  • When developing your project in a sandbox, you upload changes with hs project upload --account=sandbox.
  • Then when uploading the project to a main account, you upload the project with hs project upload --account=main.
You can use the same configuration when using the watch command.

Deploy to HubSpot

Manually deploy the most recent build if the project is not set to auto-deploy.
hs project deploy

Migrate a public app

Migrate an existing public app to the new developer projects framework (v2025.2). Learn more in the public app migration guide.
hs app migrate

Start a local development server

Start a local development server to view extension changes in the browser without needing to refresh. With the server running, saving changes to any JSX files when you’re developing an app card or settings page using UI components will cause the page to automatically refresh. This does not include changes made to the .json config files, which need to be manually uploaded using the hs project upload command instead.
hs project dev

Open project in HubSpot

Opens the project in HubSpot where you can view the project’s settings, build history, and more. By default, will attempt to open the project in the default account set in ~/.hscli/config.yml. Specify an account by adding the --account=accountName flag.
hs project open

Watch for changes

Watches the project directory and uploads to HubSpot upon saving, including deleting files. Each upload will result in a new build with a new build ID. A successful build will deploy automatically if the project’s auto-deploy setting is turned on.
hs project watch
You can further configure watch to send changes to a specific account with ---account=accountName. For example, hs project watch --account=main.

View logs

Get logs for a specific function within a project.
hs project logs
Running this command will guide you through selecting the project and app to get logs for. However, you can also manually specify this information by including the following flags in the command:
FlagDescription
--project=projectNameThe name of the project as set in the hsproject.json file.
--app=appNameThe name of the app as set in the app.json file.

Sandbox commands

Interact with standard sandboxes and development sandboxes using the commands below.

Create a sandbox

Creates a new sandbox in a production account. When running this command, you can select whether you want to create a standard sandbox or a development sandbox. If creating a standard sandbox, when running this command, all supported assets will be synced from production to the standard sandbox by default. You can choose to trigger a one-time sync of the last updated 5,000 contacts and, if applicable, up to 100 associated companies, deals, and tickets (for each associated object type). A production account can have one standard sandbox and two development sandboxes at a time. Additional standard sandboxes can be purchased as an add-on. Learn more about development sandbox limits.
hs sandbox create

Delete a sandbox

Deletes a sandbox connected to the production account. Follow the prompts to select the sandbox account to delete, then confirm the permanent deletion.
hs sandbox delete