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

# HubSpot CLI

> Set up the HubSpot CLI.

![](https://mintcdn.com/struktoai/F9Lv_nTaj6By6crk/images/python-logo.svg?fit=max\&auto=format\&n=F9Lv_nTaj6By6crk\&q=85\&s=cf5b268d330f7db46ea5cf6083f309a1)

Node.js

Browser

![](https://mintcdn.com/struktoai/CsxMCKUyfoQQJYHB/images/cloudflare-logo.svg?fit=max\&auto=format\&n=CsxMCKUyfoQQJYHB\&q=85\&s=23668457afa14abb3b0db0f5b9c0541a)

The commands follow the CRM part of HubSpot's [Agent CLI](https://developers.hubspot.com/docs/developer-tooling/local-development/agent-cli/guide).

Create a [service key](https://developers.hubspot.com/docs/apps/developer-platform/build-apps/authentication/account-service-keys)
in HubSpot with the CRM scopes the CLI needs, then register it on an existing
`ws`. For a second account, register the CLI again under another name.

> [tab] YAML
>
> ```yaml workspace.yaml theme={null}
> clis:
>   hubspot:
>     cli: hubspot
>     machine: in_process
>     config:
>       token: ${HUBSPOT_TOKEN}
> ```

> [tab] Python
>
> ```python theme={null}
> from mirage.commands.cli.builtin.hubspot import HUBSPOT
> from mirage.core.hubspot.config import HubSpotConfig
>
> config = HubSpotConfig(token="pat-...")
> ws.register_cli("hubspot", HUBSPOT, config)
> ```

> [tab] TypeScript
>
> ```typescript theme={null}
> import { HUBSPOT } from '@struktoai/mirage-node'
>
> const config = { token: 'pat-...' }
> ws.registerCli('hubspot', HUBSPOT, config)
> ```

## SDK guides

> [card] [Python](https://docs.mirage.strukto.ai/python/cli/hubspot.md)
>
> Every command, its flags and behavior.

> [card] [TypeScript](https://docs.mirage.strukto.ai/typescript/cli/hubspot.md)
>
> Every command, its flags and behavior.

## License

| Project | Role in Mirage | License |
| - | - | - |
| [agent-cli-skills](https://github.com/hubspot/agent-cli-skills) | Command names, filters and result shapes; no text is copied | Apache-2.0 |
| [Mirage](https://github.com/strukto-ai/mirage) | Command implementation | [Apache-2.0](https://github.com/strukto-ai/mirage/blob/main/LICENSE) |

See [compatibility and licenses](https://docs.mirage.strukto.ai/home/setup/clis.md#compatibility-and-licenses).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.