Skip to main content
Find, create, update and link HubSpot contacts, companies, deals, tickets and activities. The commands follow the CRM part of HubSpot’s Agent CLI.

Setup

Create a service key as HubSpot setup describes.
No service mount is required. For YAML and multiple accounts, see the CLI overview.

SKILL.md

The SKILL.md an agent reads with hubspot installed.
CommandshubspotEach entry is one subcommand’s complete usage. --help shows the same options with longer descriptions. [ ] optional · (repeat) give the flag once per value · =v default · a|b choices · json one quoted JSON value, its keys after the entry when the schema names them. Flags are spelled exactly as shown; no abbreviations. Quote a value that contains spaces.hubspot

Supported commands

Run hubspot <command> --help for the supported flags and operands. This list is generated from Mirage’s registered command tree.

Usage

Find records

Conditions in one --filter are joined by AND; a record that meets any one --filter is found. Rows print as JSONL. --format json adds the cursor of the next page at meta.next, for --after; --format table prints columns.

Change records

An update needs a --dry-run first. Its result holds the digest to pass back, with the record ID, or the number of records, as --confirm. The digest stays valid for at least five minutes and only for the same change. create, update and associations create also read one JSON object per line from stdin, and print one result per line.

Behavior

  • The install carries the account, so hubspot auth, whoami and upgrade do not exist. Other commands of HubSpot’s CLI, such as delete, workflows and reports, are not supported.
  • Bad flags and malformed input exit 2. A refused call, a missing record and a partly failed write exit 1.
  • Reads retry 429, 502, 503 and 504; writes retry only 429, to avoid repeating a write that may already have succeeded.

License

See compatibility and licenses.