HubSpot Developer Changelog

CLI Environment Variables

Written by Jon McLaren | Jun 1, 2021 6:57:11 PM

CLI environment variables

The HubSpot CLI has environment variables for communicating to the CLI the account ID and auth information to use. This is an alternative to using the hubspot.config.yml and is specifically useful in automating your workflow.

What's changing?

In reality - mostly just our documentation. The CLI has had environment variables unofficially for a while - our Deploy GitHub Action actually uses them. We're now ready for folks to officially start using them in other contexts. Our documentation has been updated to highlight the environment variables available. After setting the environment variables, you can use the --use-env flag with any commands to use the environment variables instead of the settings in hubspot.config.yml.

For most developers this update will not change your workflow, as the hubspot.config.yml file is not going away.

While these environment variables were released in an older version of the CLI, it's always a great idea to keep your CLI up to date to ensure you have the latest features.