HubSpot.Extend() Workshop 2022 | Intro to Local Development with the HubSpot CLI

Learn how to set up local development for HubSpot using the CLI. The workshop walks through creating a developer test account, installing the HubSpot CLI, and connecting your local directory to your HubSpot account.
In this first section, we're going to create a developer test account, create a local directory, install HubSpot CLI, and then connect your local dev environment to your HubSpot account using the CLI. So, first part, we are going to use our developer account to create a developer test account. So first step, I'm going to sign in. I already have an account. Okay. Once you're logged in, on the top left you're going to see your menu press Testing. Then in the top right you're going to see a orange button that says Create App Test Account. Click on this. It's going to prompt you to name this account. I'm going to call it HubSpot Extend and then Create. Okay, great. Once we're here, we're going to open up Terminal. In Visual Studio code, create a directory and then move into that directory. So I have Visual Studio code open. To open a terminal, go to the top menu, press Terminal and new terminal. Let me make this a little larger. So I'm going to CD into my desktop. Once you've moved into your desktop or wherever you want to create this directory, you're going to make a new directory. So I'm going to put mkdir space and the name of the directory. I'm going to call this HubSpot Extend. Once you've created your directory, move into that directory. I like to just copy. Okay, Once you've moved into that directory, we can download the HubSpot CLI. I'm going to use NPN install space-g space at HubSpot forward slash CLI. I already have HubSpot installed, so I'm going to actually not press this. Okay, Once you've installed HubSpot CLI, we can start using the tools. So if you already have a YAML file, you. You need to do this separately. So if you don't have a YAML file in this folder, then you use hsinit. If you do need to create a config YAML, if you don't need to create it, then then you want to use HS auth. So I do not have a YAML file. So I'm going to do HS init. Once you've done this, it's going to ask if you want to copy your personal access key. I do. So I'm going to put yes, here we go. It's going to open up so I can access this account. I'm going to press Continue with this account. I already accepted the permissions, so I don't need to do that again. You want to press show and then copy. We're going to copy this into terminal, so I'm going to Command V Enter. Once you've entered your personal access key, you want to give it a unique name to reference. I'm going to do HubSpot Extend. Once you've named your account, press Enter or Return and it's going to say success, and then give you some options of what to do next. I want to see. So the way I like to see if I was successful is HS Accounts list. And then, yep, it shows me that my account's name, account ID and the auth type. And there you go. Your local environment is connected.










