builtwith-official-cli 1.5.0 → 1.5.2

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 CHANGED
@@ -181,6 +181,19 @@ bw vector search "react framework"
181
181
  bw vector search "ecommerce platform" --limit 20
182
182
  ```
183
183
 
184
+ ### 🔐 Auth
185
+
186
+ Obtain a temporary `bw-` prefixed API token via browser approval — no API key needed to run this command.
187
+
188
+ ```bash
189
+ bw auth login
190
+ ```
191
+
192
+ Flow:
193
+ 1. Prints a `builtwith.com` URL — open it in your browser and click **Approve**
194
+ 2. Polls automatically every 5 seconds
195
+ 3. Prints the `access_token` (`bw-...`) on approval — use it as `BW_API_KEY`
196
+
184
197
  ### 💳 Payment
185
198
 
186
199
  Manage API credits autonomously.
@@ -391,6 +404,8 @@ If your API key isn't in an env var or `.builtwithrc`, pass it inline:
391
404
  | `payment_purchase` | 🛒 Purchase API credits (minimum 2000) |
392
405
  | `account_whoami` | 👤 Authenticated account identity |
393
406
  | `account_usage` | 📊 API usage statistics |
407
+ | `agent-auth-start` | 🔐 Start Device-Code Authorization (no API key required) |
408
+ | `agent-auth-token` | 🔐 Poll for authorization result and access token (no API key required) |
394
409
 
395
410
  ### 🔬 Implementation note
396
411
 
@@ -60,18 +60,18 @@ module.exports = function registerAuth(program) {
60
60
  process.exit(1);
61
61
  }
62
62
 
63
- if (tokenRes.status === 'approved' && tokenRes.access_token) {
63
+ if (tokenRes.access_token) {
64
64
  process.stderr.write('\n\n');
65
65
  output.print({ access_token: tokenRes.access_token, message: 'Authorization approved. Use this token as your BW_API_KEY.' }, { format: opts.format });
66
66
  return;
67
67
  }
68
68
 
69
- if (tokenRes.status === 'denied') {
69
+ if (tokenRes.error === 'access_denied') {
70
70
  process.stderr.write('\n');
71
71
  output.error('Authorization was denied by the user.');
72
72
  process.exit(1);
73
73
  }
74
- // status === 'pending' — keep polling
74
+ // error === 'authorization_pending' — keep polling
75
75
  }
76
76
 
77
77
  process.stderr.write('\n');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "builtwith-official-cli",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "description": "Non-interactive, scriptable CLI for the BuiltWith API",
5
5
  "main": "lib/cli.js",
6
6
  "bin": {