github-llm-council 2.0.0 → 2.0.1

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 (2) hide show
  1. package/bin/cli.js +53 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -1,12 +1,64 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { spawn } from 'node:child_process';
3
+ import { spawn, execSync } from 'node:child_process';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import path from 'node:path';
6
6
 
7
7
  const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = path.dirname(__filename);
9
9
 
10
+ // Check for GitHub Copilot CLI before starting
11
+ function checkCopilotCLI() {
12
+ try {
13
+ execSync('gh copilot --version', { stdio: 'pipe' });
14
+ return true;
15
+ } catch {
16
+ return false;
17
+ }
18
+ }
19
+
20
+ function checkGitHubCLI() {
21
+ try {
22
+ execSync('gh --version', { stdio: 'pipe' });
23
+ return true;
24
+ } catch {
25
+ return false;
26
+ }
27
+ }
28
+
29
+ if (!checkGitHubCLI()) {
30
+ console.error(`
31
+ ╔════════════════════════════════════════════════════════════════════╗
32
+ ║ ERROR: GitHub CLI (gh) is not installed ║
33
+ ╠════════════════════════════════════════════════════════════════════╣
34
+ ║ This tool requires the GitHub CLI to access Copilot models. ║
35
+ ║ ║
36
+ ║ Install it from: https://cli.github.com/ ║
37
+ ║ ║
38
+ ║ After installing, authenticate with: ║
39
+ ║ gh auth login ║
40
+ ╚════════════════════════════════════════════════════════════════════╝
41
+ `);
42
+ process.exit(1);
43
+ }
44
+
45
+ if (!checkCopilotCLI()) {
46
+ console.error(`
47
+ ╔════════════════════════════════════════════════════════════════════╗
48
+ ║ ERROR: GitHub Copilot CLI extension is not installed ║
49
+ ╠════════════════════════════════════════════════════════════════════╣
50
+ ║ This tool requires the Copilot extension for the GitHub CLI. ║
51
+ ║ ║
52
+ ║ Install it with: ║
53
+ ║ gh extension install github/gh-copilot ║
54
+ ║ ║
55
+ ║ You also need an active GitHub Copilot subscription. ║
56
+ ║ Learn more: https://github.com/features/copilot ║
57
+ ╚════════════════════════════════════════════════════════════════════╝
58
+ `);
59
+ process.exit(1);
60
+ }
61
+
10
62
  const port = process.env.PORT || '3000';
11
63
  const noOpen = process.argv.includes('--no-open');
12
64
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "github-llm-council",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Watch multiple AI models debate side-by-side using GitHub Copilot",
5
5
  "type": "module",
6
6
  "main": "dist/src/server.js",