Skip to main content
The Agent CLI is a terminal-based tool that your agent uses on your behalf to interact with HubSpot data. Like the native AI connectors, it can create, read, update, and delete records across your account (contacts, companies, deals, and more). The difference is that it operates through a terminal interface rather than a chat window. You don’t need to interact with the terminal directly. Your agent does that for you. But because AI has deep expertise with terminals, it can do things a chat interface can’t: chain multiple CLI commands together, write scripts to perform complex sequences of actions, and run those scripts programmatically, without requiring an LLM to reason through every step each time. This makes the Agent CLI especially well-suited for repetitive or high-volume operations where you want the reliability and speed of a script, not a live AI reasoning through each action on the fly.

When to use the Agent CLI

The Agent CLI is a good fit when you need to:
  • Update records in bulk: change lifecycle stages, reassign owners, or fill in missing fields across hundreds of contacts or companies at once.
  • Clean up your CRM: find and merge duplicates, normalize inconsistent data, or archive stale records.
  • Manage deals: move deals between pipeline stages, flag stalled opportunities, or reassign deals across your team.
  • Run routine operations: create follow-up tasks, update properties, or generate quick reports without navigating through menus.
  • Populate a test account with mock data: ask the agent to generate and upload realistic sample contacts, companies, deals, and other records into a test account. This is a common step when building UI extensions, website modules, or other HubSpot integrations, since you need data in the account to see how your work looks and behaves.
  • Script recurring tasks: build a reusable script for something you do regularly, so the agent can run it on demand without repeating the reasoning each time.

Dry-run mode

Every change the Agent CLI makes can be previewed before it takes effect. Dry-run mode shows you exactly what will happen (which records will be updated, what values will change) so you can review and approve before anything is committed. This means you can experiment safely. If something doesn’t look right, cancel and adjust your instructions.

Install and use the HubSpot Agent CLI

Step-by-step installation instructions and a full reference of all available commands.

Agent CLI use cases

Examples of common use cases for managing your HubSpot data with the Agent CLI.
Last modified on September 9, 2026