> ## Documentation Index
> Fetch the complete documentation index at: https://developers.hubspot.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging and configuration CLI commands

> Learn about debugging, configuration, and other utility CLI commands.

export const Tag = ({children, type = 'default', className = ''}) => {
  return <span className={`tag tag-${type} ${className}`.trim()}>
      {children}
    </span>;
};

The following commands can help with configuration, troubleshooting, and debugging local development issues.

## Open browser shortcuts

To make it easier to navigate to HubSpot tools you frequently access, you can open them directly from the command line. Your `defaultAccount` or `--account` argument will be used to open the associated tool for that account.

### open

```shell theme={null}
hs open <shortcut-name or alias>
```

**Arguments**

| Argument                                    | Description                                                                                |
| ------------------------------------------- | ------------------------------------------------------------------------------------------ |
| `shortcut` <Tag type="error">Required</Tag> | Provide the full shortcut name or alias of the short cut you wish to open in your browser. |

```shell theme={null}
hs open --list
```

**Arguments**

| Argument                                  | Description                                                 |
| ----------------------------------------- | ----------------------------------------------------------- |
| `--list` <Tag type="error">Required</Tag> | Lists all of the shortcuts, their aliases and destinations. |

## Command completion

If you use the CLI frequently, it can be useful to be able to tab to auto-complete commands.

```shell theme={null}
hs completion >> ~/.bashrc
```

For Mac OS X

```shell theme={null}
hs completion >> ~/.bash_profile
```

## Set configuration options

Update CLI configuration settings and persist them within the HubSpot CLI config file.

```shell theme={null}
hs config set [flags]
```

| Flag                         | Description                                                                                                                                                                                            |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--allow-usage-tracking`     | A boolean that determines whether to send usage data to HubSpot (e.g., `--allow-usage-tracking=false` will disable tracking).                                                                          |
| `--http-timeout`             | Specify the number of milliseconds before a request to HubSpot will timeout (e.g., `--http-timeout=5000` will set the timeout to 5000ms).                                                              |
| `--default-cms-publish-mode` | Set the default CMS publish mode (e.g., `default-cms-publish-mode=draft` will set the publish mode to draft).                                                                                          |
| `--allow-auto-updates`       | A boolean that determines whether the HS CLI will automatically update (e.g., `--allow-auto-updates=false` will disable automatic updates).                                                            |
| `--auto-open-browser`        | A boolean that determines whether to automatically launch a browser window with certain commands, like `hs project dev`. Running `hs config set --auto-open-browser=false` will disable this behavior. |

## Migrate configuration

Create or update the global configuration file in your home directory at `~/.hscli/config.yml`. This will migrate from the older global `hubspot.config.yml` config and archive the previous config as `archived.hubspot.config.yml`.

```shell theme={null}
hs config migrate [flags]
```

| Flag       | Description                                                                                                 |
| ---------- | ----------------------------------------------------------------------------------------------------------- |
| `--config` | Path to a config file.                                                                                      |
| `--force`  | Bypass prompts and overwrite any conflicting values in the global config with the deprecated config values. |

## View local HubSpot configuration

Run `hs doctor` to retrieve diagnostic information about your local HubSpot configurations. You can include the `--output-dir` flag to write the output to a file, which can be particularly helpful to share with HubSpot support should you need to open a ticket.

```shell theme={null}
# View diagnostic information in the terminal
hs doctor

# Write diagnostic information to a file in the current directory
hs doctor --output-dir='./'
```

The output will provide information about your local HubSpot configuration, including:

* The installed versions of the HubSpot CLI, Node, and npm.
* The location of the HubSpot CLI configuration file.
* The current default account, along with its current active status.

<Frame>
  <img src="https://developers.hubspot.com/hubfs/Knowledge_Base_2023-24-25/developer-local/hs-doctor-output.png" alt="screenshot of the hs doctor output" />
</Frame>

## Enable debug logging

Append the `--debug` flag to other HubSpot CLI commands to enable debug logging. This will add debugging statements to your terminal output that show information about the CLI's internal operations. In addition to providing additional context when running into errors, it can also be helpful for sharing with HubSpot support should you need to open a ticket.

```shell theme={null}
# Enables debugging when uploading a project to HubSpot
hs project upload --debug
```
