@wirecat/hubspot-cli 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +40 -16
  3. package/contracts/wirecat.json +1441 -136
  4. package/dist/bin/hubspot.js +2 -2
  5. package/dist/bundle/{app-server-422MCA7S.js → app-server-GXV2OFML.js} +5 -5
  6. package/dist/bundle/chunk-2UOJ7DLZ.js +46 -0
  7. package/dist/bundle/{chunk-BKXDHU3G.js → chunk-3WLYWRGG.js} +1 -1
  8. package/dist/bundle/{chunk-SAKK2YRU.js → chunk-GPYCBYX5.js} +1 -1
  9. package/dist/bundle/chunk-IJADZW42.js +195 -0
  10. package/dist/bundle/{chunk-2TWQIWWG.js → chunk-LXZ66MCH.js} +2 -2
  11. package/dist/bundle/{chunk-WQBX7XYP.js → chunk-MFNMKHML.js} +807 -519
  12. package/dist/bundle/{chunk-HTAN663T.js → chunk-Q2OLOMHL.js} +1 -1
  13. package/dist/bundle/{chunk-LNV33FDC.js → chunk-TLKEPUAV.js} +4 -4
  14. package/dist/bundle/{chunk-JRCPCVPI.js → chunk-URX6YDUL.js} +2 -2
  15. package/dist/bundle/{chunk-ZBDSHFG4.js → chunk-VOH7S5M4.js} +1301 -1271
  16. package/dist/bundle/{chunk-X7XUX7A4.js → chunk-YMCY7VRE.js} +4 -4
  17. package/dist/bundle/{chunk-VIEYMDBR.js → chunk-Z73OL5HV.js} +1 -1
  18. package/dist/bundle/{dist-MYZZKZJ7.js → dist-7TGU56B2.js} +1 -1
  19. package/dist/bundle/{first-run-RPIJZEDT.js → first-run-UWAFSINQ.js} +1 -1
  20. package/dist/bundle/hubspot.js +2 -2
  21. package/dist/bundle/{program-POG5GHUQ.js → program-XA4C44Z4.js} +173 -40
  22. package/dist/bundle/{server-XJSNF3K5.js → server-ATG5KY7K.js} +2 -2
  23. package/dist/bundle/{server-C3ZHA7AZ.js → server-VNWVVH7A.js} +5 -5
  24. package/dist/bundle/{source-A3SBLHC4.js → source-54HR4IWG.js} +68 -341
  25. package/dist/bundle/{store-CCDNUB6A.js → store-DXWYNVVB.js} +2 -2
  26. package/dist/bundle/{store-maintenance-command-BRCG6MNA.js → store-maintenance-command-J57HCJYY.js} +3 -3
  27. package/dist/bundle/writer-NLLI5YRM.js +79 -0
  28. package/dist/commands/api.d.ts +4 -4
  29. package/dist/commands/api.d.ts.map +1 -1
  30. package/dist/commands/api.js +12 -7
  31. package/dist/commands/api.js.map +1 -1
  32. package/dist/commands/crm-shared.d.ts +2 -2
  33. package/dist/commands/crm-shared.d.ts.map +1 -1
  34. package/dist/commands/crm-shared.js +20 -4
  35. package/dist/commands/crm-shared.js.map +1 -1
  36. package/dist/config.d.ts +46 -8
  37. package/dist/config.d.ts.map +1 -1
  38. package/dist/config.js +137 -12
  39. package/dist/config.js.map +1 -1
  40. package/dist/context.d.ts +2 -2
  41. package/dist/context.d.ts.map +1 -1
  42. package/dist/context.js +1 -1
  43. package/dist/context.js.map +1 -1
  44. package/dist/crm/source.d.ts +7 -2
  45. package/dist/crm/source.d.ts.map +1 -1
  46. package/dist/crm/source.js +26 -29
  47. package/dist/crm/source.js.map +1 -1
  48. package/dist/crm/writer.d.ts +15 -0
  49. package/dist/crm/writer.d.ts.map +1 -0
  50. package/dist/crm/writer.js +199 -0
  51. package/dist/crm/writer.js.map +1 -0
  52. package/dist/generated/manifest.d.ts.map +1 -1
  53. package/dist/generated/manifest.js +6 -1
  54. package/dist/generated/manifest.js.map +1 -1
  55. package/dist/hubspot/transport.d.ts +6 -1
  56. package/dist/hubspot/transport.d.ts.map +1 -1
  57. package/dist/hubspot/transport.js +13 -5
  58. package/dist/hubspot/transport.js.map +1 -1
  59. package/dist/identity.js +3 -3
  60. package/dist/identity.js.map +1 -1
  61. package/dist/program.d.ts.map +1 -1
  62. package/dist/program.js +2 -1
  63. package/dist/program.js.map +1 -1
  64. package/dist/setup/texts.en.json +3 -3
  65. package/dist/setup/texts.es.json +3 -3
  66. package/dist/setup/texts.ru.json +3 -3
  67. package/dist/version.d.ts +1 -1
  68. package/dist/version.js +1 -1
  69. package/package.json +2 -2
  70. package/skills/hubspot-cli/SKILL.md +13 -8
  71. package/skills/hubspot-cli/references/api/api-advanced.md +51 -0
  72. package/skills/hubspot-cli/references/api/api-basic.md +602 -0
  73. package/skills/hubspot-cli/references/api/api-batch.md +575 -0
  74. package/skills/hubspot-cli/references/api.md +3 -2
  75. package/dist/commands/comments.d.ts +0 -3
  76. package/dist/commands/comments.d.ts.map +0 -1
  77. package/dist/commands/comments.js +0 -114
  78. package/dist/commands/comments.js.map +0 -1
  79. package/dist/sample/comments.d.ts +0 -61
  80. package/dist/sample/comments.d.ts.map +0 -1
  81. package/dist/sample/comments.js +0 -39
  82. package/dist/sample/comments.js.map +0 -1
  83. package/dist/sample/records.d.ts +0 -16
  84. package/dist/sample/records.d.ts.map +0 -1
  85. package/dist/sample/records.js +0 -22
  86. package/dist/sample/records.js.map +0 -1
  87. package/dist/sample/transport.d.ts +0 -42
  88. package/dist/sample/transport.d.ts.map +0 -1
  89. package/dist/sample/transport.js +0 -153
  90. package/dist/sample/transport.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,30 @@
2
2
 
3
3
  Notable changes to `@wirecat/hubspot-cli`. One section per version, newest first.
4
4
 
5
+ ## 0.2.0 — 17.11.2026
6
+
7
+ ### Added
8
+
9
+ - **`deals create`, `update`, `move`, `close` and `delete` change deals in HubSpot, and the copy takes each answer.**
10
+ `close` moves a deal to its pipeline's closed won or lost stage and keeps `--reason` as HubSpot's closed reason.
11
+ `delete` archives the deal and asks first. See [usage](docs/usage.md).
12
+ - **`people create|update` and `organizations create|update` change contacts and companies.** A contact keeps one
13
+ e-mail and two numbers, a company one number and no e-mail; a longer list is refused before anything is sent.
14
+ - **`api` offers HubSpot's writes and deletes too: 66 writes and 33 deletes of the CRM API, version 2026-03.** Each
15
+ write checks `api.<command>` and its group's `<group>.write`, each delete its `<group>.delete`, and both ask by
16
+ default. A write that does what a command does checks that command's key too (`deals.update`), a body that sets a
17
+ deal's stage checks `deals.move` and `deals.close`, and one that sets an owner checks `crm.assign-others`, `deny` by
18
+ default. `api contacts-gdpr-delete` also checks `people.erase`, to deny erasing alone. `--dry-run` names every key.
19
+ See [settings](docs/configuration.md#permissions).
20
+ - **Write scopes are optional.** The setup and [installation](docs/installation.md#make-a-key) list
21
+ `crm.objects.{deals,contacts,companies}.write`; without them the key only reads.
22
+
23
+ ### Fixed
24
+
25
+ - **`api` sends the key with every operation.** HubSpot's object specs mark 115 operations as needing no sign-in, so
26
+ in 0.1.0 `api deals-get`, `api contacts-list` and the other record operations went out without the key and HubSpot
27
+ answered 401. The pipelines, properties, owners and account operations were not affected.
28
+
5
29
  ## 0.1.0 — 17.11.2026
6
30
 
7
31
  ### Added
package/README.md CHANGED
@@ -10,8 +10,9 @@
10
10
  </p>
11
11
 
12
12
  <p align="center">
13
- <a href="docs/index.md">Docs</a> ·
14
- <a href="docs/usage.md">Examples</a> ·
13
+ <a href="https://github.com/WireCatLabs/hubspot-cli/blob/main/docs/index.md">Docs</a> ·
14
+ <a href="https://github.com/WireCatLabs/hubspot-cli/blob/main/docs/installation.md">Install</a> ·
15
+ <a href="https://github.com/WireCatLabs/hubspot-cli/blob/main/docs/usage.md">Usage</a> ·
15
16
  <a href="https://discord.gg/DebENqbRrJ">Discord</a>
16
17
  </p>
17
18
 
@@ -24,7 +25,8 @@
24
25
  Codex or any app that speaks MCP.
25
26
  - **The morning starts with what changed.** `changes list` shows what each sync saw change, and a schedule sends it to
26
27
  you.
27
- - **Read only.** This release changes nothing in HubSpot. The key it signs in with needs read scopes only.
28
+ - **Writes when you want them.** Create and update deals, contacts and companies, move a deal or close it. The key
29
+ stays read only until you give it the write scopes, and a delete asks first.
28
30
 
29
31
  ```text
30
32
  You: What changed in the CRM since yesterday?
@@ -49,6 +51,9 @@ crm.objects.owners.read crm.schemas.contacts.read crm.schemas.companie
49
51
  crm.schemas.deals.read sales-email-read
50
52
  ```
51
53
 
54
+ To let `hubspot` change records too, add `crm.objects.contacts.write`, `crm.objects.companies.write` and
55
+ `crm.objects.deals.write`. Leave them out and the key only reads.
56
+
52
57
  Add `crm.objects.leads.read` on Sales Hub Professional or Enterprise to read leads, and `tickets` to read tickets
53
58
  through `api`. A scope you leave out fails only the commands that need it.
54
59
 
@@ -74,7 +79,10 @@ More: [install and connect](docs/installation.md)
74
79
  name.
75
80
  - **Find a client.** Any contact or company in the account, read live, with its phones and e-mails.
76
81
  - **Follow the work on a deal.** Notes, calls, e-mails, meetings and tasks, copied with the deals.
77
- - **Reach past the copy.** Every read operation of HubSpot's CRM API is a command of its own, tickets included.
82
+ - **Change a deal from the chat.** Create a deal, rename it, move it to the next stage, close it won or lost, or add
83
+ a contact or a company, and the copy takes the change at once.
84
+ - **Reach past the copy.** Every operation of HubSpot's CRM API is a command of its own: notes, tasks, tickets,
85
+ associations and merges included.
78
86
  - **Search across your work.** A deal turns up next to the chat where you agreed on it and the meeting where you
79
87
  discussed it, if you use the other WireCat tools.
80
88
 
@@ -94,9 +102,10 @@ hubspot work mcp add claude-code --allow-writes # or: codex
94
102
  hubspot work mcp config # the entry for Claude Desktop, Cursor and others
95
103
  ```
96
104
 
97
- `--allow-writes` confirms you saw that the server offers commands that change something on this computer, such as
98
- `sync` and schedules. None of them changes anything in HubSpot. Text from the account reaches the agent marked as
99
- untrusted, so the agent reads it as data, never as instructions. The sign-in commands are not offered over MCP.
105
+ `--allow-writes` confirms you saw that the server offers commands that change something: `sync` and schedules on this
106
+ computer, and the writes to HubSpot, which only a key with write scopes can make. Text from the account reaches the
107
+ agent marked as untrusted, so the agent reads it as data, never as instructions. The sign-in commands are not offered
108
+ over MCP.
100
109
 
101
110
  More: [agents and MCP](docs/usage.md#agents)
102
111
 
@@ -106,8 +115,8 @@ More: [agents and MCP](docs/usage.md#agents)
106
115
  sync takes only the changes. Lists, the pipeline and search then answer with no request to HubSpot, also offline.
107
116
  - **The key stays in the system keyring.** It never appears in output, errors or run records, and no command takes it
108
117
  as an argument.
109
- - **A permission on every command.** Each command and each read operation of HubSpot's API has its own level, so
110
- you decide what an agent may read.
118
+ - **A permission on every command.** Each command and each operation of HubSpot's API has its own level, so you
119
+ decide what an agent may read and change.
111
120
  - **Your CRM beside your other context.** Deals sit in the same local store as your messages, notes and meetings from
112
121
  the other WireCat tools, and `search all` finds them together.
113
122
  - **As many accounts as you need.** Each HubSpot account is a profile you name in the command, and none is ever picked
@@ -123,6 +132,9 @@ hubspot work deals list stage:"Contract sent" # from the copy, offline
123
132
  hubspot work deals show deal:12 # one deal with its stage, amount and the people on it
124
133
  hubspot work pipelines list # the deal pipelines and their stages
125
134
  hubspot work leads list # leads, on Sales Hub Professional or Enterprise
135
+ hubspot work deals create --title "Example kitchen" --amount 15000 --currency EUR
136
+ hubspot work deals move deal:12 "Contract sent" # the next stage of its pipeline
137
+ hubspot work deals close deal:12 won
126
138
  ```
127
139
 
128
140
  ### Contacts, companies and owners
@@ -131,6 +143,8 @@ hubspot work leads list # leads, on Sales Hub Pro
131
143
  hubspot work people list "Anna" # any contact in the account, read live
132
144
  hubspot work organizations list "Example LLC" # any company, read live
133
145
  hubspot work users list # the account's owners
146
+ hubspot work people create --name "Anna Example" --email anna@example.com
147
+ hubspot work organizations update 4021 --phone "+34 600 000 000"
134
148
  ```
135
149
 
136
150
  ### Activities and what changed
@@ -142,15 +156,16 @@ hubspot work changes list "at>=1d" # what changed in the las
142
156
 
143
157
  Activities are copied once you turn on the activities setting. `activities list` names the setting.
144
158
 
145
- ### Any read of the API
159
+ ### Any operation of the API
146
160
 
147
161
  ```sh
148
- hubspot work api list # every read operation, without calling HubSpot
162
+ hubspot work api list # every operation, without calling HubSpot
149
163
  hubspot work api deals-list --limit 5 # one of them
164
+ hubspot work api notes-create --body-file note.json # a note on a deal: a write, which asks first
150
165
  ```
151
166
 
152
- `api` offers every read operation of HubSpot's CRM API version 2026-03, from its 15 specs, each with its own
153
- permission. Tickets are read here.
167
+ `api` offers every operation of HubSpot's CRM API version 2026-03, from its 15 specs, each with its own permission:
168
+ reads, writes and deletes. Notes, tasks and tickets are written here.
154
169
 
155
170
  ### With your other sources
156
171
 
@@ -190,6 +205,12 @@ Each profile has a permission level for every command and every API operation: `
190
205
  A command's key is its name, such as `deals.list`. An API operation's key is `api.<command>`, such as
191
206
  `api.deals-search`, and `api` covers them all.
192
207
 
208
+ Changing a deal, contact or company with its command goes ahead; deleting one asks. Every write of `api` also checks
209
+ its group's `<group>.write`, such as `deals.write`, and every delete its `<group>.delete`: both ask. A write that does
210
+ what a command does checks that command's key too, so `deals.update deny` holds on both paths. A key belongs to the
211
+ account, not to a person, so giving a record an owner checks `crm.assign-others`, which is `deny` until you allow it.
212
+ A GDPR delete of a contact checks `people.erase` as well, so you can deny it alone.
213
+
193
214
  ```sh
194
215
  hubspot work config set permissions.people deny # this profile reads no contacts
195
216
  ```
@@ -202,9 +223,12 @@ More: [settings and permissions](docs/configuration.md#permissions)
202
223
 
203
224
  ## Limits
204
225
 
205
- - `hubspot` is tested against a fake account built from HubSpot's API reference, not yet against a live account.
206
- - Read only: no command changes deals, contacts or companies in this release, `api` included.
207
- - Tickets are read only through `api`, not copied.
226
+ - `hubspot` is tested against a fake account built from HubSpot's API reference, and each release is checked against
227
+ a HubSpot test account.
228
+ - A contact keeps one e-mail and two numbers (phone and mobile), and a company one number and no e-mail: a longer
229
+ list is refused. Leads, notes, tasks and a deal's contacts and company are written through `api`.
230
+ - HubSpot takes no idempotency key: a write that ended in `outcome_unknown` may have happened. Check before repeating.
231
+ - Tickets are read and written only through `api`, not copied.
208
232
  - Leads need Sales Hub Professional or Enterprise.
209
233
  - Before 1.0, a minor version may change commands, `--json` fields and MCP tools. The changelog marks each such
210
234
  change.