@skillhq/hubspot
v0.3.2
Published
HubSpot CRM CLI for managing contacts, companies, deals, and engagements
Maintainers
Readme
HubSpot CLI
A fast, focused CLI for HubSpot CRM operations.
Installation
npm install -g @cyberdrk/hsOr from source:
git clone https://github.com/cyberdrk305/hubspot.git
cd hubspot
npm install
npm run build
npm linkQuick Start
Create a Private App in HubSpot:
- Go to Settings > Integrations > Private Apps (under "Legacy Apps")
- Create app with required scopes (see below)
- Copy the access token (starts with
pat-)
Configure the CLI:
hs authVerify connection:
hs check
Required Scopes
When creating your Private App, grant these scopes:
CRM:
crm.objects.contacts.read/crm.objects.contacts.writecrm.objects.companies.read/crm.objects.companies.writecrm.objects.deals.read/crm.objects.deals.writecrm.objects.owners.readcrm.schemas.contacts.read(for custom properties)crm.schemas.companies.readcrm.schemas.deals.read
Tickets:
tickets(read/write)
Settings:
account-info.security.read(for portal info)
Usage
Contacts
hs contacts # List contacts
hs contact <id> # Get contact
hs contact-search "query" # Search
hs contact-create --email [email protected] --firstname John
hs contact-update <id> --lastname SmithCompanies
hs companies # List companies
hs company <id> # Get company
hs company-search "query" # SearchDeals
hs deals # List deals
hs deal <id> # Get deal
hs deal-search "query" # Search
hs pipelines # List pipelinesTickets
hs tickets # List tickets
hs ticket <id> # Get ticket
hs ticket-search "query" # SearchNotes & Tasks
hs notes <objectType> <id> # List notes
hs note-create <objectType> <id> "body" # Create note
hs tasks # List tasks
hs task <id> # Get task
hs task-create --subject "Task" --due "2024-12-31"Associations
hs associations <from> <id> <to> # List associations
hs associate <from> <id1> <to> <id2> # Create associationOutput Formats
- Default: Colored terminal output
--json: JSON for scripting--markdown: Markdown tables
Configuration
Config stored at ~/.config/hs/config.json5:
{
accessToken: "pat-xxx",
portalId: "12345678",
defaultFormat: "plain",
defaultLimit: 20
}License
MIT
