builtwith-official-cli 1.5.1 → 1.5.3
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.
- package/README.md +13 -0
- package/lib/cli.js +1 -0
- package/lib/client.js +3 -2
- package/lib/commands/auth.js +2 -2
- package/lib/commands/change.js +35 -0
- package/lib/commands/mcp.js +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
```bash
|
|
6
6
|
bw domain lookup shopify.com --format table
|
|
7
7
|
bw domain lookup shopify.com --nopii | jq '.Results[0].Technologies[].Name'
|
|
8
|
+
bw change lookup shopify.com --since "last month"
|
|
8
9
|
bw live feed --duration 60 > events.ndjson
|
|
9
10
|
bw mcp # start MCP server for Claude Desktop, VS Code, etc.
|
|
10
11
|
```
|
|
@@ -86,6 +87,17 @@ bw domain lookup shopify.com --nopii --liveonly | jq '.Results[0].Technologies[]
|
|
|
86
87
|
bw domain lookup shopify.com --fdrange 20240101-20241231
|
|
87
88
|
```
|
|
88
89
|
|
|
90
|
+
### 🔄 Change
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
bw change lookup <domain[,domain2]> [--since <date>]
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
bw change lookup shopify.com
|
|
98
|
+
bw change lookup shopify.com,builtwith.com --since "last month"
|
|
99
|
+
```
|
|
100
|
+
|
|
89
101
|
### 📋 Lists
|
|
90
102
|
|
|
91
103
|
```bash
|
|
@@ -387,6 +399,7 @@ If your API key isn't in an env var or `.builtwithrc`, pass it inline:
|
|
|
387
399
|
| Tool | Description |
|
|
388
400
|
|---|---|
|
|
389
401
|
| `domain_lookup` | 🌐 Technology stack for a domain (supports `nopii`, `liveonly`, date ranges) |
|
|
402
|
+
| `change_lookup` | 🔄 Technology additions and removals for one or more domains |
|
|
390
403
|
| `lists_tech` | 📋 Domains currently using a technology |
|
|
391
404
|
| `relationships_lookup` | 🔗 Related domains (shared infra, ownership) |
|
|
392
405
|
| `free_lookup` | 🆓 Free-tier category counts for a domain |
|
package/lib/cli.js
CHANGED
|
@@ -24,6 +24,7 @@ function run() {
|
|
|
24
24
|
|
|
25
25
|
// Register all command modules
|
|
26
26
|
require('./commands/domain')(program);
|
|
27
|
+
require('./commands/change')(program);
|
|
27
28
|
require('./commands/lists')(program);
|
|
28
29
|
require('./commands/relationships')(program);
|
|
29
30
|
require('./commands/free')(program);
|
package/lib/client.js
CHANGED
|
@@ -25,6 +25,7 @@ function scanForInjection(data) {
|
|
|
25
25
|
|
|
26
26
|
const BASE_URLS = {
|
|
27
27
|
domain: 'https://api.builtwith.com/v22/api.json',
|
|
28
|
+
change: 'https://api.builtwith.com/change1/api.json',
|
|
28
29
|
lists: 'https://api.builtwith.com/lists12/api.json',
|
|
29
30
|
relationships: 'https://api.builtwith.com/rv4/api.json',
|
|
30
31
|
free: 'https://api.builtwith.com/free1/api.json',
|
|
@@ -43,8 +44,8 @@ const BASE_URLS = {
|
|
|
43
44
|
'payment-balance': 'https://payments.builtwith.com/v1/billing/api-discovery',
|
|
44
45
|
'payment-config': 'https://payments.builtwith.com/v1/billing/api-configuration',
|
|
45
46
|
'payment-purchase': 'https://payments.builtwith.com/v1/billing/api-purchase',
|
|
46
|
-
'agent-auth-start': 'https://api.builtwith.com/agent-auth
|
|
47
|
-
'agent-auth-token': 'https://api.builtwith.com/agent-auth
|
|
47
|
+
'agent-auth-start': 'https://api.builtwith.com/agent-auth/start',
|
|
48
|
+
'agent-auth-token': 'https://api.builtwith.com/agent-auth/token',
|
|
48
49
|
};
|
|
49
50
|
|
|
50
51
|
/**
|
package/lib/commands/auth.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const fetch = require('node-fetch');
|
|
4
4
|
const output = require('../output');
|
|
5
5
|
|
|
6
|
-
const AUTH_START_URL = 'https://api.builtwith.com/agent-auth
|
|
7
|
-
const AUTH_TOKEN_URL = 'https://api.builtwith.com/agent-auth
|
|
6
|
+
const AUTH_START_URL = 'https://api.builtwith.com/agent-auth/start';
|
|
7
|
+
const AUTH_TOKEN_URL = 'https://api.builtwith.com/agent-auth/token';
|
|
8
8
|
const POLL_INTERVAL_MS = 5000;
|
|
9
9
|
const TIMEOUT_MS = 5 * 60 * 1000;
|
|
10
10
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const { requireKey } = require('../config');
|
|
4
|
+
const { request } = require('../client');
|
|
5
|
+
const { validateInput } = require('../validate');
|
|
6
|
+
const output = require('../output');
|
|
7
|
+
const ora = require('ora');
|
|
8
|
+
|
|
9
|
+
module.exports = function registerChange(program) {
|
|
10
|
+
const change = program.command('change').description('Technology additions and removals');
|
|
11
|
+
|
|
12
|
+
change
|
|
13
|
+
.command('lookup <domains>')
|
|
14
|
+
.description('Get technology additions and removals for one or more comma-separated domains')
|
|
15
|
+
.option('--since <date>', 'Natural language date window (default: 3 months, e.g. "last month")')
|
|
16
|
+
.action(async (domainsArg, cmdOpts) => {
|
|
17
|
+
const opts = program.opts();
|
|
18
|
+
if (opts.noColor) output.setNoColor(true);
|
|
19
|
+
const key = requireKey(opts.key);
|
|
20
|
+
validateInput(domainsArg, 'domains');
|
|
21
|
+
if (cmdOpts.since) validateInput(cmdOpts.since, 'since');
|
|
22
|
+
|
|
23
|
+
const params = { KEY: key, LOOKUP: domainsArg };
|
|
24
|
+
if (cmdOpts.since) params.SINCE = cmdOpts.since;
|
|
25
|
+
|
|
26
|
+
const spinner = opts.quiet ? null : ora({ text: `Fetching changes for ${domainsArg}...`, stream: process.stderr }).start();
|
|
27
|
+
try {
|
|
28
|
+
const data = await request('change', params, { dryRun: opts.dryRun, debug: opts.debug, spinner });
|
|
29
|
+
output.print(data, { format: opts.format, fields: opts.fields });
|
|
30
|
+
} catch (err) {
|
|
31
|
+
if (spinner) spinner.stop();
|
|
32
|
+
throw err;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
};
|
package/lib/commands/mcp.js
CHANGED
|
@@ -32,6 +32,18 @@ const TOOLS = [
|
|
|
32
32
|
required: ['domain'],
|
|
33
33
|
},
|
|
34
34
|
},
|
|
35
|
+
{
|
|
36
|
+
name: 'change_lookup',
|
|
37
|
+
description: 'Get technology additions and removals for one or more domains using the BuiltWith Change API.',
|
|
38
|
+
inputSchema: {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
domains: { type: 'string', description: 'Domain or comma-separated domains to look up' },
|
|
42
|
+
since: { type: 'string', description: 'Natural language date window, e.g. "last month"' },
|
|
43
|
+
},
|
|
44
|
+
required: ['domains'],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
35
47
|
{
|
|
36
48
|
name: 'lists_tech',
|
|
37
49
|
description: 'Get a list of domains currently using a specific technology.',
|
|
@@ -191,6 +203,11 @@ async function callTool(name, args, key, debug) {
|
|
|
191
203
|
if (args.ldrange) params.LDRANGE = args.ldrange;
|
|
192
204
|
return request('domain', params, opts);
|
|
193
205
|
}
|
|
206
|
+
case 'change_lookup': {
|
|
207
|
+
const params = { KEY: key, LOOKUP: args.domains };
|
|
208
|
+
if (args.since) params.SINCE = args.since;
|
|
209
|
+
return request('change', params, opts);
|
|
210
|
+
}
|
|
194
211
|
case 'lists_tech':
|
|
195
212
|
return request('lists', { KEY: key, TECH: args.tech, OFFSET: args.offset || 0, LIMIT: args.limit || 20 }, opts);
|
|
196
213
|
case 'relationships_lookup':
|