unbound-cli 0.9.2 → 0.9.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 +3 -1
- package/package.json +1 -1
- package/src/commands/setup.js +26 -12
- package/src/index.js +4 -2
package/README.md
CHANGED
|
@@ -72,6 +72,7 @@ Automated setup (downloads scripts, sets env vars, configures tool):
|
|
|
72
72
|
| Command | Description |
|
|
73
73
|
|---------|-------------|
|
|
74
74
|
| `unbound setup cursor` | Download hooks, set env, restart Cursor |
|
|
75
|
+
| `unbound setup copilot` | Download hooks, set env, configure GitHub Copilot |
|
|
75
76
|
| `unbound setup claude-code` | Interactive mode selection (subscription or gateway) |
|
|
76
77
|
| `unbound setup claude-code --subscription` | Hooks only (keep your Claude subscription) |
|
|
77
78
|
| `unbound setup claude-code --gateway` | Use Unbound as the AI provider |
|
|
@@ -94,6 +95,7 @@ Remove configuration:
|
|
|
94
95
|
| Command | Description |
|
|
95
96
|
|---------|-------------|
|
|
96
97
|
| `unbound setup cursor --clear` | Remove Unbound config for Cursor |
|
|
98
|
+
| `unbound setup copilot --clear` | Remove Unbound config for GitHub Copilot |
|
|
97
99
|
| `unbound setup claude-code --clear` | Remove Unbound config for Claude Code |
|
|
98
100
|
| `unbound setup gemini-cli --clear` | Remove Unbound config for Gemini CLI |
|
|
99
101
|
| `unbound setup codex --clear` | Remove Unbound config for Codex |
|
|
@@ -108,7 +110,7 @@ Configure all users on a device via MDM. Requires root.
|
|
|
108
110
|
| `sudo unbound setup mdm --admin-api-key KEY cursor codex-subscription` | Set up specific tools |
|
|
109
111
|
| `sudo unbound setup mdm --admin-api-key KEY --clear cursor` | Remove config for specific tools |
|
|
110
112
|
|
|
111
|
-
Available tools: `cursor`, `claude-code-subscription`, `claude-code-gateway`, `gemini-cli`, `codex-subscription`, `codex-gateway`
|
|
113
|
+
Available tools: `cursor`, `copilot`, `claude-code-subscription`, `claude-code-gateway`, `gemini-cli`, `codex-subscription`, `codex-gateway`
|
|
112
114
|
|
|
113
115
|
`claude-code-subscription` and `claude-code-gateway` are mutually exclusive. `codex-subscription` and `codex-gateway` are mutually exclusive. When using `--all`, subscription mode is used by default for Claude Code and Codex.
|
|
114
116
|
|
package/package.json
CHANGED
package/src/commands/setup.js
CHANGED
|
@@ -18,6 +18,7 @@ function isWindowsNative() {
|
|
|
18
18
|
|
|
19
19
|
const SETUP_TOOLS = [
|
|
20
20
|
{ label: 'Cursor', value: 'cursor', script: 'cursor/setup.py' },
|
|
21
|
+
{ label: 'GitHub Copilot', value: 'copilot', script: 'copilot/hooks/setup.py' },
|
|
21
22
|
{ label: 'Claude Code \u2014 subscription (hooks)', value: 'claude-sub', script: 'claude-code/hooks/setup.py', group: 'claude-code' },
|
|
22
23
|
{ label: 'Claude Code \u2014 gateway (gateway)', value: 'claude-gw', script: 'claude-code/gateway/setup.py', group: 'claude-code' },
|
|
23
24
|
{ label: 'Gemini CLI', value: 'gemini', script: 'gemini-cli/gateway/setup.py' },
|
|
@@ -27,6 +28,7 @@ const SETUP_TOOLS = [
|
|
|
27
28
|
|
|
28
29
|
const MDM_TOOLS = {
|
|
29
30
|
'cursor': { label: 'Cursor', script: 'cursor/mdm/setup.py' },
|
|
31
|
+
'copilot': { label: 'GitHub Copilot', script: 'copilot/hooks/mdm/setup.py' },
|
|
30
32
|
'claude-code-subscription': { label: 'Claude Code (subscription)', script: 'claude-code/hooks/mdm/setup.py' },
|
|
31
33
|
'claude-code-gateway': { label: 'Claude Code (gateway)', script: 'claude-code/gateway/mdm/setup.py' },
|
|
32
34
|
'gemini-cli': { label: 'Gemini CLI', script: 'gemini-cli/gateway/mdm/setup.py' },
|
|
@@ -34,16 +36,22 @@ const MDM_TOOLS = {
|
|
|
34
36
|
'codex-gateway': { label: 'Codex (gateway)', script: 'codex/gateway/mdm/setup.py' },
|
|
35
37
|
};
|
|
36
38
|
|
|
37
|
-
// Default tools for
|
|
39
|
+
// Default MDM tools for `unbound onboard-mdm` (subscription mode for Claude Code/Codex since only one can be active)
|
|
38
40
|
const MDM_ALL_TOOLS = ['cursor', 'claude-code-subscription', 'gemini-cli', 'codex-subscription'];
|
|
39
41
|
|
|
40
|
-
//
|
|
41
|
-
|
|
42
|
+
// Tools for `unbound setup mdm --all` — same as the onboard-mdm bundle plus Copilot.
|
|
43
|
+
const MDM_SETUP_ALL_TOOLS = ['cursor', 'claude-code-subscription', 'gemini-cli', 'codex-subscription', 'copilot'];
|
|
44
|
+
|
|
45
|
+
// Default tools for `unbound onboard` (Cursor, Claude Code hooks, Codex hooks; no Gemini CLI).
|
|
42
46
|
const ALL_TOOLS = ['cursor', 'claude-code-subscription', 'codex-subscription'];
|
|
43
47
|
|
|
48
|
+
// Tools for `unbound setup --all` — same as the onboard bundle plus Copilot.
|
|
49
|
+
const SETUP_ALL_TOOLS = ['cursor', 'claude-code-subscription', 'codex-subscription', 'copilot'];
|
|
50
|
+
|
|
44
51
|
// Tool name → script mapping for automated tools
|
|
45
52
|
const SETUP_TOOL_MAP = {
|
|
46
53
|
'cursor': { label: 'Cursor', script: 'cursor/setup.py' },
|
|
54
|
+
'copilot': { label: 'GitHub Copilot', script: 'copilot/hooks/setup.py' },
|
|
47
55
|
'claude-code-subscription': { label: 'Claude Code (subscription)', script: 'claude-code/hooks/setup.py' },
|
|
48
56
|
'claude-code-gateway': { label: 'Claude Code (gateway)', script: 'claude-code/gateway/setup.py' },
|
|
49
57
|
'gemini-cli': { label: 'Gemini CLI', script: 'gemini-cli/gateway/setup.py' },
|
|
@@ -233,14 +241,16 @@ function scriptSupportsBackfill(scriptPath) {
|
|
|
233
241
|
// Surfaces an early note when --backfill was requested for a tool that can't
|
|
234
242
|
// use it. The setup scripts no-op safely too, but earlier user signal is better UX.
|
|
235
243
|
function noteBackfillUnsupported(label, scriptPath) {
|
|
236
|
-
if (scriptPath
|
|
237
|
-
output.info(`${label} backfill is not supported (no historical transcript data on disk). Continuing without backfill for ${label}.`);
|
|
238
|
-
return;
|
|
239
|
-
}
|
|
244
|
+
if (scriptSupportsBackfill(scriptPath)) return;
|
|
240
245
|
if (scriptPath.includes('/gateway/')) {
|
|
241
246
|
output.info(`--backfill is not supported in gateway mode for ${label}. Continuing without backfill for ${label}.`);
|
|
242
247
|
return;
|
|
243
248
|
}
|
|
249
|
+
if (scriptPath.startsWith('cursor/')) {
|
|
250
|
+
output.info(`${label} backfill is not supported (no historical transcript data on disk). Continuing without backfill for ${label}.`);
|
|
251
|
+
return;
|
|
252
|
+
}
|
|
253
|
+
output.info(`${label} does not support --backfill. Continuing without backfill for ${label}.`);
|
|
244
254
|
}
|
|
245
255
|
|
|
246
256
|
/**
|
|
@@ -339,14 +349,15 @@ function register(program) {
|
|
|
339
349
|
.option('--clear', 'Remove Unbound configuration for the specified tools')
|
|
340
350
|
.option('--subscription', 'Use subscription mode for Claude Code / Codex (hooks only)')
|
|
341
351
|
.option('--gateway', 'Use gateway mode for Claude Code / Codex (Unbound as AI provider)')
|
|
342
|
-
.option('--all', 'Set up the default bundle: Cursor, Claude Code (hooks), Codex (hooks)')
|
|
343
|
-
.option('--backfill', 'Seed historical Claude Code / Codex sessions from local transcripts into Unbound analytics (subscription/hooks mode only; Cursor unsupported)')
|
|
352
|
+
.option('--all', 'Set up the default bundle: Cursor, Copilot, Claude Code (hooks), Codex (hooks)')
|
|
353
|
+
.option('--backfill', 'Seed historical Claude Code / Codex sessions from local transcripts into Unbound analytics (subscription/hooks mode only; Cursor and Copilot unsupported)')
|
|
344
354
|
.addOption(new Option('--backend-url <url>', 'Override backend URL for setup scripts (dev only)').hideHelp())
|
|
345
355
|
.addOption(new Option('--frontend-url <url>', 'Override frontend URL for setup scripts (dev only)').hideHelp())
|
|
346
356
|
.addOption(new Option('--gateway-url <url>', 'Override gateway URL for setup scripts (dev only)').hideHelp())
|
|
347
357
|
.addHelpText('after', `
|
|
348
358
|
Available tools:
|
|
349
359
|
cursor Cursor IDE
|
|
360
|
+
copilot GitHub Copilot
|
|
350
361
|
claude-code Claude Code (use --subscription or --gateway)
|
|
351
362
|
gemini-cli Gemini CLI
|
|
352
363
|
codex Codex (use --subscription or --gateway)
|
|
@@ -364,11 +375,12 @@ For multi-tool setup, use explicit mode names:
|
|
|
364
375
|
Examples:
|
|
365
376
|
Single tool:
|
|
366
377
|
$ unbound setup cursor Set up Cursor
|
|
378
|
+
$ unbound setup copilot Set up GitHub Copilot
|
|
367
379
|
$ unbound setup claude-code --gateway Claude Code gateway mode
|
|
368
380
|
$ unbound setup claude-code --subscription Claude Code hooks only
|
|
369
381
|
$ unbound setup codex --gateway Codex gateway mode
|
|
370
382
|
|
|
371
|
-
Install the default bundle (Cursor + Claude Code hooks + Codex hooks):
|
|
383
|
+
Install the default bundle (Cursor + Copilot + Claude Code hooks + Codex hooks):
|
|
372
384
|
$ unbound setup --all Set up the default bundle
|
|
373
385
|
$ unbound setup --all --api-key <key> Login + set up the bundle
|
|
374
386
|
|
|
@@ -383,6 +395,7 @@ Examples:
|
|
|
383
395
|
|
|
384
396
|
Remove configuration:
|
|
385
397
|
$ unbound setup cursor --clear Remove Cursor config
|
|
398
|
+
$ unbound setup copilot --clear Remove GitHub Copilot config
|
|
386
399
|
$ unbound setup claude-code --clear Remove Claude Code config
|
|
387
400
|
|
|
388
401
|
Interactive:
|
|
@@ -423,7 +436,7 @@ automatically to authenticate before proceeding.
|
|
|
423
436
|
process.exitCode = 1;
|
|
424
437
|
return;
|
|
425
438
|
}
|
|
426
|
-
tools = [...
|
|
439
|
+
tools = [...SETUP_ALL_TOOLS];
|
|
427
440
|
}
|
|
428
441
|
|
|
429
442
|
// No tools specified → interactive multi-select (existing flow)
|
|
@@ -626,6 +639,7 @@ automatically to authenticate before proceeding.
|
|
|
626
639
|
.addHelpText('after', `
|
|
627
640
|
Available tools:
|
|
628
641
|
cursor Cursor IDE
|
|
642
|
+
copilot GitHub Copilot
|
|
629
643
|
claude-code-subscription Claude Code with your own subscription (hooks only)
|
|
630
644
|
claude-code-gateway Claude Code with Unbound as AI provider
|
|
631
645
|
gemini-cli Gemini CLI
|
|
@@ -670,7 +684,7 @@ Examples:
|
|
|
670
684
|
|
|
671
685
|
let toolNames;
|
|
672
686
|
if (globalOpts.all) {
|
|
673
|
-
toolNames =
|
|
687
|
+
toolNames = MDM_SETUP_ALL_TOOLS;
|
|
674
688
|
} else if (tools.length > 0) {
|
|
675
689
|
toolNames = tools;
|
|
676
690
|
} else {
|
package/src/index.js
CHANGED
|
@@ -50,8 +50,9 @@ ONBOARDING (one-step install + discover)
|
|
|
50
50
|
|
|
51
51
|
TOOL SETUP
|
|
52
52
|
$ unbound setup Select and install multiple tools interactively
|
|
53
|
-
$ unbound setup --all Set up the default bundle (Cursor + Claude Code hooks + Codex hooks)
|
|
53
|
+
$ unbound setup --all Set up the default bundle (Cursor + Copilot + Claude Code hooks + Codex hooks)
|
|
54
54
|
$ unbound setup cursor Set up Cursor
|
|
55
|
+
$ unbound setup copilot Set up GitHub Copilot
|
|
55
56
|
$ unbound setup claude-code Set up Claude Code (interactive mode selection)
|
|
56
57
|
$ unbound setup claude-code --gateway Use Unbound as AI provider
|
|
57
58
|
$ unbound setup claude-code --subscription Hooks only (keep your subscription)
|
|
@@ -74,13 +75,14 @@ TOOL SETUP
|
|
|
74
75
|
|
|
75
76
|
Remove configuration:
|
|
76
77
|
$ unbound setup cursor --clear Remove Unbound config for Cursor
|
|
78
|
+
$ unbound setup copilot --clear Remove Unbound config for GitHub Copilot
|
|
77
79
|
$ unbound setup claude-code --clear Remove Unbound config for Claude Code
|
|
78
80
|
$ unbound setup gemini-cli --clear Remove Unbound config for Gemini CLI
|
|
79
81
|
$ unbound setup codex --clear Remove Unbound config for Codex
|
|
80
82
|
|
|
81
83
|
MDM SETUP (admin, requires root)
|
|
82
84
|
$ sudo unbound setup mdm --admin-api-key KEY --all
|
|
83
|
-
$ sudo unbound setup mdm --admin-api-key KEY cursor codex-subscription
|
|
85
|
+
$ sudo unbound setup mdm --admin-api-key KEY cursor copilot codex-subscription
|
|
84
86
|
$ sudo unbound setup mdm --admin-api-key KEY claude-code-subscription codex-subscription gemini-cli
|
|
85
87
|
$ sudo unbound setup mdm --admin-api-key KEY --clear cursor codex-subscription
|
|
86
88
|
|