@zoominfo/gtm-ai-cli 1.0.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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +427 -0
  3. package/dist/index.js +155 -0
  4. package/package.json +56 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Zoom Information, Inc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,427 @@
1
+ # GTM AI CLI
2
+
3
+ A command-line interface for the [ZoomInfo](https://www.zoominfo.com/) GTM AI MCP server. Search and enrich companies and contacts, surface intent signals and news, manage GTM context, and pipe results through your shell as JSON, JSONL, CSV, YAML, or a table.
4
+
5
+ > **Status:** working end-to-end against `mcp.zoominfo.com`. The OAuth client name is currently `GTM AI CLI` — pending the ZI MCP team adding it to the DCR vendor allowlist. Until that lands, the first `gtm auth login` returns `"Vendor with name GTM AI CLI was not found in approved vendors"`. See `src/oauth.ts:17` for the handshake.
6
+
7
+ ## Installation
8
+
9
+ ### From source (Node 18+)
10
+
11
+ ```bash
12
+ git clone https://github.com/zoominfo/gtm-ai-cli.git
13
+ cd gtm-ai-cli
14
+ npm install
15
+ npm run build:ts
16
+ npm link # makes `gtm` available globally
17
+ ```
18
+
19
+ ### Homebrew (coming soon)
20
+
21
+ ```bash
22
+ # planned once binary releases are signed and published
23
+ brew install zoominfo/gtm-ai-cli/gtm-ai-cli
24
+ ```
25
+
26
+ ## Authentication
27
+
28
+ OAuth 2.0 + PKCE via your browser. Tokens are saved to `~/.config/gtm-ai/` at mode `0600`.
29
+
30
+ ```bash
31
+ gtm auth login # opens browser to authorize, saves token
32
+ gtm auth whoami # show login status + token expiry
33
+ gtm auth logout # revoke token and remove saved credentials
34
+ ```
35
+
36
+ If you ever need a clean slate (e.g. to re-trigger DCR), remove the saved client:
37
+
38
+ ```bash
39
+ rm ~/.config/gtm-ai/client_id ~/.config/gtm-ai/credentials
40
+ gtm auth login
41
+ ```
42
+
43
+ ## Output formats
44
+
45
+ Every subcommand accepts `-f, --format`. The `table` and `csv` formats auto-flatten JSON:API envelopes (`data: [...]`) and one-level-nested objects (`company.id`, `company.name`); `json`, `jsonl`, and `yaml` preserve the exact response shape.
46
+
47
+ | Format | When to use |
48
+ |---|---|
49
+ | `json` (default) | Pretty-printed JSON. Pipe to `jq` for field extraction. |
50
+ | `jsonl` | One JSON object per line. Stream into log/data pipelines. |
51
+ | `csv` | Flat CSV with headers; nested objects are dot-flattened, arrays are stringified. |
52
+ | `yaml` | Human-readable diffs of deeply nested responses. |
53
+ | `table` | ASCII bordered table. Best for terminal browsing of small responses. |
54
+
55
+ ```bash
56
+ gtm companies search --industry software -f table
57
+ gtm contacts search --management-level "C Level Exec" -f jsonl > c-level-contacts.jsonl
58
+ gtm-context get -f yaml
59
+ ```
60
+
61
+ ### Projecting fields with `--select`
62
+
63
+ Any command that returns records also accepts `--select <paths>` — a comma-separated list of
64
+ dotted paths to project from each record, applied before formatting. Handy for narrow CSVs or
65
+ quick scans without `jq`. (Distinct from the enrich commands' `--fields`, which selects which
66
+ fields ZoomInfo returns server-side.)
67
+
68
+ ```bash
69
+ gtm companies search --industry software --page-size 5 --select id,name,revenue -f table
70
+ gtm companies search --industry software --select name,company.id -f csv > orgs.csv
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Commands
76
+
77
+ ### `gtm lookup` — get exact filter values
78
+
79
+ ZoomInfo's search endpoints reject unknown industry/metro/topic strings with 422. **Always look up the canonical ID first**, then pass it to the search filters.
80
+
81
+ ```bash
82
+ # Industries containing "software"
83
+ gtm lookup --field industries --fuzzy software -f table
84
+
85
+ # All management levels (C Level Exec, VP Level Exec, Director, …)
86
+ gtm lookup --field management-levels -f table
87
+
88
+ # Intent topics about cloud
89
+ gtm lookup --field intent-topics --fuzzy cloud -f table
90
+
91
+ # Tech-products requires a two-step lookup (vendor first, then products under that vendor)
92
+ gtm lookup --field tech-vendors --fuzzy hubspot
93
+ gtm lookup --field tech-products --vendor "HubSpot, Inc"
94
+
95
+ # Metro regions in California
96
+ gtm lookup --field metro-regions --fuzzy "san francisco"
97
+ ```
98
+
99
+ Valid `--field` names: `industries`, `metro-regions`, `states`, `countries`, `continents`, `management-levels`, `departments`, `job-functions`, `employee-count`, `revenue-ranges`, `company-types`, `company-rankings`, `intent-topics`, `scoop-topics`, `scoop-types`, `scoop-departments`, `news-categories`, `naics-codes`, `sic-codes`, `tech-vendors`, `tech-products`, `tech-categories`, `tech-skills`, `hashtags`, `buying-groups`, `board-members`, `years-of-experience`, `sub-unit-types`, `job-titles`.
100
+
101
+ ---
102
+
103
+ ### `gtm companies` — search, enrich, find similar
104
+
105
+ **Search.** Requires at least one filter.
106
+
107
+ ```bash
108
+ # By name
109
+ gtm companies search --name "ZoomInfo"
110
+
111
+ # Tech companies in San Francisco with 100-500 employees
112
+ gtm companies search --industry software --metro "CA - San Francisco" --employees "100to249,250to499"
113
+
114
+ # Public US companies with $1B+ revenue, sorted by revenue desc
115
+ gtm companies search --type public --country "United States" --revenue-min 1000000 --sort -revenue --page-size 10 -f table
116
+
117
+ # Companies using a specific tech product (lookup product IDs first)
118
+ gtm companies search --tech "5f1d1d5c123" --metro "MA - Boston" --employees "250to499,500to999"
119
+
120
+ # Series A-B funded ($1M-$20M) software companies in the US
121
+ gtm companies search --industry software --country "United States" --funding-min 1000 --funding-max 20000
122
+
123
+ # By NAICS / SIC codes
124
+ gtm companies search --naics "541511,541512"
125
+ ```
126
+
127
+ **Enrich.** Provide any identifier:
128
+
129
+ ```bash
130
+ gtm companies enrich --id 344589814
131
+ gtm companies enrich --domain stripe.com
132
+ gtm companies enrich --name "Stripe"
133
+ gtm companies enrich --ticker NVDA
134
+ gtm companies enrich --website https://www.zoominfo.com
135
+
136
+ # Restrict the returned fields
137
+ gtm companies enrich --domain stripe.com --fields name description website revenue employeeCount industries
138
+
139
+ # Bulk: up to 10 companies via JSON file
140
+ # companies.json: [{ "domain": "stripe.com" }, { "companyId": "344589814" }]
141
+ gtm companies enrich --file companies.json
142
+ ```
143
+
144
+ **Similar companies** (machine-learning ranked list of look-alikes):
145
+
146
+ ```bash
147
+ gtm companies similar --id 344589814
148
+ gtm companies similar --name "Stripe"
149
+ ```
150
+
151
+ ---
152
+
153
+ ### `gtm contacts` — search, enrich, find similar, recommended
154
+
155
+ **Search.** Requires at least one filter.
156
+
157
+ ```bash
158
+ # By name
159
+ gtm contacts search --first-name Henry --last-name Schuck
160
+
161
+ # By job title (free-text OR queries supported)
162
+ gtm contacts search --job-title "CFO OR VP Finance OR Treasurer" --employees "1000to4999,5000to9999"
163
+
164
+ # C-level and VP-level executives at a specific company
165
+ gtm contacts search --management-level "C Level Exec,VP Level Exec" --company-id 344589814
166
+
167
+ # Engineering managers at SF software companies, only ones with verified email + phone
168
+ gtm contacts search --management-level Manager --department "Engineering & Technical" \
169
+ --industry software --metro "CA - San Francisco" --required email,phone
170
+
171
+ # Sales leaders with accuracy score ≥ 90
172
+ gtm contacts search --management-level "VP Level Exec" --department Sales --accuracy-min 90
173
+ ```
174
+
175
+ **Enrich.** Provide any valid identifier combination — `personId` (most accurate), `email`, `phone`, or `firstName + lastName + (company OR companyId)`:
176
+
177
+ ```bash
178
+ gtm contacts enrich --id 1260398587
179
+ gtm contacts enrich --email henry@zoominfo.com
180
+ gtm contacts enrich --phone 555-303-1234
181
+ gtm contacts enrich --first-name Henry --last-name Schuck --company "ZoomInfo"
182
+ gtm contacts enrich --full-name "Henry Schuck" --company-id 344589814
183
+
184
+ # Return only specific fields
185
+ gtm contacts enrich --email jane@acme.com --fields phone jobTitle managementLevel email
186
+
187
+ # Bulk: up to 10 contacts via JSON file
188
+ # contacts.json: [{ "email": "a@b.com" }, { "personId": "1260398587" }]
189
+ gtm contacts enrich --file contacts.json
190
+ ```
191
+
192
+ **Similar contacts** (find people who look like a reference person; optionally constrain to a target company):
193
+
194
+ ```bash
195
+ gtm contacts similar --person-id 1260398587
196
+ gtm contacts similar --person-id 1260398587 --company-id 239305146 # similar contacts within Salesforce
197
+ ```
198
+
199
+ **Recommended contacts** at a target company, based on your interaction history:
200
+
201
+ ```bash
202
+ gtm contacts recommended --company-id 344589814 --use-case PROSPECTING
203
+ gtm contacts recommended --company-id 344589814 --use-case DEAL_ACCELERATION
204
+ gtm contacts recommended --company-id 344589814 --use-case RENEWAL_AND_GROWTH
205
+ ```
206
+
207
+ ---
208
+
209
+ ### `gtm intent` — buyer intent signals
210
+
211
+ Every request needs `--topics` (1-50). Look up exact topic names first.
212
+
213
+ ```bash
214
+ gtm lookup --field intent-topics --fuzzy "data warehouse"
215
+
216
+ # Companies showing high intent for Cloud Applications + Java
217
+ gtm intent search --topics "Cloud Applications" "Java" --signal-score-min 70
218
+
219
+ # Strong intent in the last 30 days, mid-market US software companies
220
+ gtm intent search --topics "Mobile Apps" --signal-score-min 80 \
221
+ --signal-start 2026-05-01 --signal-end 2026-05-31 \
222
+ --industry software --country "United States" --employees "250to499,500to999"
223
+
224
+ # Audience strength A or B (largest groups researching)
225
+ gtm intent search --topics "AI Agents" --audience-strength-min B --audience-strength-max A
226
+ ```
227
+
228
+ **Enrich** — pull intent signals for a specific company:
229
+
230
+ ```bash
231
+ gtm intent enrich --company-id 344589814 --topics "Cloud Applications" "Java"
232
+ gtm intent enrich --name "ZoomInfo" --topics "AI Agents" --signal-score-min 70
233
+ gtm intent enrich --website https://www.stripe.com --topics "Payments"
234
+ ```
235
+
236
+ ---
237
+
238
+ ### `gtm scoops` — real-time business events
239
+
240
+ Scoops capture earnings, funding, M&A, leadership moves, layoffs, product launches, awards, partnerships, and more. Search requires at least one filter.
241
+
242
+ ```bash
243
+ # Funding announcements at SF software companies in May 2026
244
+ gtm scoops search --scoop-types Funding --industry software --metro "MA - Boston" \
245
+ --published-start 2026-05-01 --published-end 2026-05-31
246
+
247
+ # C-suite hires across all companies in the last 7 days
248
+ gtm scoops search --scoop-types "New Hire" "Executive Move" --department C-Suite --published-start 2026-05-27
249
+
250
+ # Layoffs at enterprise companies
251
+ gtm scoops search --scoop-types Layoffs --employees "10000plus" --published-start 2026-01-01
252
+
253
+ # Product launches in the AI space
254
+ gtm scoops search --scoop-types "Product Launch" --description "artificial intelligence" --published-start 2026-04-01
255
+ ```
256
+
257
+ **Enrich** — get scoops for a specific company:
258
+
259
+ ```bash
260
+ gtm scoops enrich --company-id 344589814 --scoop-types "New Hire" Promotion
261
+ gtm scoops enrich --name "Stripe" --published-start 2026-01-01
262
+ ```
263
+
264
+ ---
265
+
266
+ ### `gtm news` — news articles
267
+
268
+ `enrich_news` is currently the only news tool. Requires `--company-id`.
269
+
270
+ ```bash
271
+ # Recent funding/financial news for ZoomInfo
272
+ gtm news enrich --company-id 344589814 --categories FINANCIAL_RESULTS FUNDING
273
+
274
+ # Product news in the last quarter
275
+ gtm news enrich --company-id 344589814 --categories PRODUCT --publishing-start 2026-03-01 --publishing-end 2026-05-31
276
+
277
+ # Leadership news (appointments, departures)
278
+ gtm news enrich --company-id 344589814 --categories PERSON
279
+ ```
280
+
281
+ Valid `--categories`: `FINANCIAL_RESULTS`, `FUNDING`, `GENERAL_NEWS`, `GENERAL_PRESS_RELEASE`, `MERGER_OR_ACQUISITION`, `PERSON`, `PRODUCT`.
282
+
283
+ ---
284
+
285
+ ### `gtm gtm-context` — your organization's GTM configuration
286
+
287
+ This is the context that shapes how every other ZoomInfo tool interprets your queries — your offerings, ICPs, buyer personas, competitors, strategic priorities. Zero credits consumed.
288
+
289
+ ```bash
290
+ # Compressed view (~1k tokens)
291
+ gtm-context get
292
+
293
+ # Full expanded profiles
294
+ gtm-context get --detailed -f yaml
295
+
296
+ # Update — synthesizes unstructured content into structured records (admin only)
297
+ gtm-context update --query "Update competitive intelligence" --source "Our main competitors are X, Y, Z. X is strong in …"
298
+
299
+ # From a file (large inputs)
300
+ gtm-context update --query "Create buyer personas from these interviews" --source-file ./interview-notes.txt
301
+ ```
302
+
303
+ ---
304
+
305
+ ### `gtm feedback` — submit feedback to ZoomInfo
306
+
307
+ ```bash
308
+ gtm feedback submit --category DATA_QUALITY --message "Henry Schuck's company should be ZoomInfo Technologies, not ZoomInfo"
309
+ gtm feedback submit --category FEATURE_REQUEST --message "Want a --csv-headers flag to control column order"
310
+ ```
311
+
312
+ Categories: `DATA_QUALITY`, `FEATURE_REQUEST`, `ACCESS_ENTITLEMENT_ISSUE`, `OTHER`.
313
+
314
+ ---
315
+
316
+ ### `gtm research` — agentic account & contact research
317
+
318
+ Natural-language research that blends ZoomInfo market data with your CRM and conversation
319
+ history. Frame the goal in `--query` (the tool decides what to retrieve) rather than passing
320
+ keywords. Get the ZoomInfo IDs from `gtm companies search` / `gtm contacts search`.
321
+
322
+ ```bash
323
+ # Company/account research
324
+ gtm research account --company-id 344589814 \
325
+ --query "Prepping for a renewal call — relationship status, recent news, and open risks"
326
+
327
+ # Person/contact research
328
+ gtm research contact --contact-id 1260398587 \
329
+ --query "Who is this person, their role, and our history with them before I reach out"
330
+ ```
331
+
332
+ ---
333
+
334
+ ### `gtm raw` — universal escape hatch
335
+
336
+ Use this when you need a tool that doesn't have a curated wrapper yet.
337
+
338
+ ```bash
339
+ # What tools does the MCP server expose?
340
+ gtm raw list-tools -f table
341
+
342
+ # Call any tool by name with a JSON argument blob
343
+ gtm raw call find_similar_companies --args '{"companyName":"Stripe"}'
344
+ gtm raw call search_intent --args '{"topics":["Cloud Applications"],"signalScoreMin":80}'
345
+ ```
346
+
347
+ ---
348
+
349
+ ## Common workflows
350
+
351
+ ### Pipe to `jq` for field extraction
352
+
353
+ ```bash
354
+ # Just the company names from a search
355
+ gtm companies search --industry software --metro "CA - San Francisco" | jq '.data[].attributes.name'
356
+
357
+ # Email + phone for every result
358
+ gtm contacts search --company-id 344589814 -f jsonl | jq -r '[.attributes.email, .attributes.phone] | @tsv'
359
+
360
+ # Top intent signals sorted by score
361
+ gtm intent search --topics "Cloud Applications" --signal-score-min 80 | jq '.data | sort_by(-.attributes.score) | .[0:5]'
362
+ ```
363
+
364
+ ### Two-step: search companies, enrich top results
365
+
366
+ ```bash
367
+ # Get top 3 company IDs, then enrich each with full details
368
+ gtm companies search --industry software --metro "CA - San Francisco" --page-size 3 -f json \
369
+ | jq -r '.data[].id' \
370
+ | xargs -I{} gtm companies enrich --id {}
371
+ ```
372
+
373
+ ### Export contacts to CSV
374
+
375
+ ```bash
376
+ gtm contacts search --management-level "VP Level Exec" --department Sales --company-id 344589814 -f csv > vp-sales.csv
377
+ ```
378
+
379
+ ### Find lookalike companies, then enrich them
380
+
381
+ ```bash
382
+ gtm companies similar --id 344589814 -f json \
383
+ | jq -r '.data[0:10][].id' \
384
+ | xargs -I{} gtm companies enrich --id {} --fields name domain employeeCount revenue industries
385
+ ```
386
+
387
+ ---
388
+
389
+ ## Development
390
+
391
+ ```bash
392
+ npm install
393
+ npm run typecheck # tsc --noEmit
394
+ npm test # unit tests (Vitest, mocked)
395
+ npm run test:live # live MCP session (requires `gtm auth login`)
396
+
397
+ npx tsx src/index.ts <command> # run from source (no compile)
398
+ node dist/js/index.js <command> # run compiled output
399
+ ```
400
+
401
+ The live suite (`src/live/`) drives the built CLI against the real MCP server, covering every
402
+ read-only command end-to-end (it skips when you're not logged in). Run it against the compiled
403
+ output and opt into the mutating tier explicitly:
404
+
405
+ ```bash
406
+ GTM_CLI_CMD="node dist/js/index.js" npm run test:live # read-only (default)
407
+ GTM_LIVE_WRITES=1 GTM_CLI_CMD="node dist/js/index.js" npm run test:live # + feedback / gtm-context update
408
+ ```
409
+
410
+ Build standalone single-file binaries (requires [Bun](https://bun.sh)):
411
+
412
+ ```bash
413
+ npm run build # → dist/gtm (current platform)
414
+ npm run build:all # cross-compile macOS arm64/x64, Linux x64, Windows x64
415
+ ```
416
+
417
+ ## Agent integration
418
+
419
+ `.claude/skills/gtm-ai-cli/SKILL.md` is auto-discovered by Claude Code when this repo is opened. Agents in other repos can fetch the canonical version from:
420
+
421
+ ```
422
+ https://raw.githubusercontent.com/zoominfo/gtm-ai-cli/main/.claude/skills/gtm-ai-cli/SKILL.md
423
+ ```
424
+
425
+ ## License
426
+
427
+ TBD — pending ZoomInfo legal review.