stigmergy 1.0.70 → 1.0.71

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/package.json +3 -3
  2. package/src/main.js +80 -0
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "stigmergy",
3
- "version": "1.0.70",
3
+ "version": "1.0.71",
4
4
  "type": "commonjs",
5
5
  "description": "Stigmergy CLI - Multi-Agents Cross-AI CLI Tools Collaboration System",
6
- "main": "src/main.js",
6
+ "main": "src/index.js",
7
7
  "bin": {
8
- "stigmergy": "src/main.js"
8
+ "stigmergy": "src/index.js"
9
9
  },
10
10
  "scripts": {
11
11
  "start": "node src/main.js",
package/src/main.js ADDED
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Stigmergy CLI - Main Entry Point (CommonJS)
5
+ * Multi-Agents Cross-AI CLI Tools Collaboration System
6
+ */
7
+
8
+ const { spawn } = require('child_process');
9
+ const path = require('path');
10
+ const fs = require('fs');
11
+ const os = require('os');
12
+
13
+ // Main CLI functionality
14
+ function main() {
15
+ const args = process.argv.slice(2);
16
+
17
+ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
18
+ console.log('Stigmergy CLI - Multi-Agents Cross-AI CLI Tools Collaboration System');
19
+ console.log('Version: 1.0.70');
20
+ console.log('');
21
+ console.log('Usage: stigmergy [command] [options]');
22
+ console.log('');
23
+ console.log('Commands:');
24
+ console.log(' help, --help Show this help message');
25
+ console.log(' version, --version Show version information');
26
+ console.log(' status Check CLI tools status');
27
+ console.log(' scan Scan for available AI CLI tools');
28
+ console.log('');
29
+ console.log('Examples:');
30
+ console.log(' stigmergy --version');
31
+ console.log(' stigmergy status');
32
+ console.log('');
33
+ console.log('For more information, visit: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents');
34
+ return;
35
+ }
36
+
37
+ if (args.includes('--version') || args.includes('version')) {
38
+ console.log('1.0.70');
39
+ return;
40
+ }
41
+
42
+ if (args.includes('status')) {
43
+ console.log('Checking AI CLI tools status...');
44
+ console.log('Claude CLI:', checkCLI('claude'));
45
+ console.log('Gemini CLI:', checkCLI('gemini'));
46
+ console.log('Qwen CLI:', checkCLI('qwen'));
47
+ console.log('iFlow CLI:', checkCLI('iflow'));
48
+ console.log('Qoder CLI:', checkCLI('qodercli'));
49
+ return;
50
+ }
51
+
52
+ if (args.includes('scan')) {
53
+ console.log('Scanning for available AI CLI tools...');
54
+ const tools = ['claude', 'gemini', 'qwen', 'iflow', 'codebuddy', 'copilot', 'codex', 'qoder'];
55
+ const available = tools.filter(tool => checkCLI(tool === 'qoder' ? 'qodercli' : tool));
56
+ console.log(`Found ${available.length}/${tools.length} AI CLI tools:`, available.join(', '));
57
+ return;
58
+ }
59
+
60
+ console.log('Unknown command. Use --help for usage information.');
61
+ }
62
+
63
+ function checkCLI(command) {
64
+ try {
65
+ const result = require('child_process').spawnSync(command, ['--version'], {
66
+ stdio: 'ignore',
67
+ timeout: 5000
68
+ });
69
+ return result.status === 0 ? 'Available' : 'Not Available';
70
+ } catch (error) {
71
+ return 'Not Available';
72
+ }
73
+ }
74
+
75
+ // Execute main function
76
+ if (require.main === module) {
77
+ main();
78
+ }
79
+
80
+ module.exports = { main, checkCLI };