# Setting up CLI/config files

**URL:** <https://community.hubspot.com/t/setting-up-cli-config-files/61051>\
**Category:** CMS Development\
**Created:** [July 15, 2022, 12:52pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051 "2022-07-15T12:52:43Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ALetaw](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@ALetaw](https://community.hubspot.com/u/ALetaw)\
**Post date:** [July 15, 2022, 12:52pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/1 "2022-07-15T12:52:43Z")

</div>

Hi All, when I create a folder/directory in my root directory to hold a new project and run hs auth to create a config file for it, it’s not creating one. I have already successfully run hs init and the config file is in the root directory. Could someone please explain how to fix that/what I might be doing wrong? Thanks for the help!

Anna

---

<div class="post-metadata">

**Author:** ![Brownstephen101](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/brownstephen101/32/52735_2.png) [@Brownstephen101](https://community.hubspot.com/u/Brownstephen101)\
**Post date:** [July 15, 2022, 2:23pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/2 "2022-07-15T14:23:24Z")

</div>

Hi @ALetaw ,  
When you initially run hs init, you don’t need to run hs auth unless you are setting up a connection to a new portal. Init creates the config file and auth updates it with new permissions, so if you are just working in 1 portal, you don’t need to worry about ‘hs auth’.  
Once you have run hs init, you are connected to the portal and can use any of the CLI commands to manage your folders / files between your local computer and the hubspot portal you are connected to.

> **[HubSpot CLI commands overview - HubSpot docs](https://developers.hubspot.com/docs/developer-tooling/local-development/hubspot-cli/reference)**
>
> A quick reference list of all HubSpot CLI commands

---

<div class="post-metadata">

**Author:** ![ALetaw](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@ALetaw](https://community.hubspot.com/u/ALetaw)\
**Post date:** [July 15, 2022, 2:55pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/3 "2022-07-15T14:55:58Z")

</div>

Thank you for your reply. In the tutorials, it shows the config file in the folder that is created for the tutorial. I had the config file in the first one I did, but not on any of the subsequent ones. I also get an error when I try to run the watch command and have to use hs upload instead.

I sort of know command line but only just enough to not really understand when something doesn’t work. Thanks for your patience!

Anna

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [July 21, 2022, 10:25am UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/4 "2022-07-21T10:25:26Z")

</div>

Hi @ALetaw, you only need the config file once, no need to create more config files for each folder or something like that.

Once your config file is created in your root folder, then everything you create/edit on local can be uploaded to Hubspot.

Regarding your error when running hs watch, could you please tell us exactly what error are you getting? Simply copy & paste here the error 🙂

---

<div class="post-metadata">

**Author:** ![ALetaw](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@ALetaw](https://community.hubspot.com/u/ALetaw)\
**Post date:** [July 21, 2022, 12:49pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/5 "2022-07-21T12:49:04Z")

</div>

Thank you for your reply. And, I stand corrected. This is the “error” I receive when running: C:\xx\xxxxxx\annaberd\>hs watch annaberd annaberd

_[INFO] The “hs watch” command no longer uploads the watched directory when started. The directory “annaberd” was not uploaded._  
_[INFO] To upload the directory run “hs upload” beforehand or add the “--initial-upload” option when running “hs watch”._  
_Watcher is ready and watching C:\xx\xxxxxx\annaberd\annaberd. Any changes detected will be automatically uploaded and overwrite the current version in the developer file system._

So, [INFO] is different than [ERROR]. I was thrown by the first statement but the changes to the files are in fact uploading in real time.

The first time I set up the CLI, ran init and did the first tutorial, I did not get these [INFO] messages. Why am I getting them now?

Thanks for your help and patience!

Anna

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [July 21, 2022, 1:00pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/6 "2022-07-21T13:00:24Z")

</div>

Thanks for the information @ALetaw!

I believe this is the expected behaviour when using **hs watch**.

I use it on a daily basis and I see the same [INFO] messages as you, so don’t worry about it. It’s just letting you know that by running hs watch you are not uploading content yet until you save your changes in your files. This is in case some people expect hs watch to deploy everything and then watch, which is not the case.

So, don’t worry about those messages, you are doing everything correctly 🙂

---

<div class="post-metadata">

**Author:** ![ALetaw](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@ALetaw](https://community.hubspot.com/u/ALetaw)\
**Post date:** [July 21, 2022, 1:34pm UTC](https://community.hubspot.com/t/setting-up-cli-config-files/61051/7 "2022-07-21T13:34:24Z")

</div>

Thank you for the help!

Anna
