stigmergy 1.0.73 → 1.0.79

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
@@ -1,469 +1,190 @@
1
- # 🔧 Stigmergy CLI - Multi-Agents Cross-AI CLI Tool Collaboration System
2
-
3
- > **⚠️ Important Clarification: This is not a standalone CLI tool, but an enhancement system!**
4
- >
5
- > Stigmergy CLI enables existing AI CLI tools to collaborate with each other through a plugin system, rather than replacing them.
6
-
7
- [![Node.js](https://img.shields.io/badge/node-16+-green.svg)](https://nodejs.org)
8
- [![NPM](https://img.shields.io/badge/npm-stigmergy-blue.svg)](https://www.npmjs.com/package/stigmergy)
9
- [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
10
- [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)]()
11
-
12
- ## 🚀 Quick Start
13
-
14
- ### One-Click Deployment (Recommended)
15
-
16
- ```bash
17
- # One-click deployment of the complete collaboration system (detection + installation + configuration)
18
- npx -y git+https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git#main quick-deploy
19
- ```
20
-
21
- This command will:
22
- - Scan your system for available AI CLI tools
23
- - Install missing tools with your permission
24
- - Configure automatic cross-tool collaboration
25
- - Set up hook integrations for seamless communication
26
-
27
- **How It Works:** After deployment, each AI CLI tool gets a hook adapter that enables natural language cross-tool collaboration. Simply say "use [tool] to [task]" in any supported CLI.
28
-
29
- ### Manual Installation
30
-
31
- ```bash
32
- # Install globally via NPM
33
- npm install -g stigmergy
34
-
35
- # Initialize project
36
- stigmergy init
37
-
38
- # Intelligent deployment (scan environment + prompt + auto-install)
39
- stigmergy deploy
40
-
41
- # Or use npx (no installation required)
42
- npx stigmergy init
43
- npx stigmergy deploy
44
- ```
45
-
46
- ## Core Features
47
-
48
- ### Direct Cross-CLI Collaboration
49
- - **Natural Language Invocation**: Simply say "use gemini to translate" in any supported CLI
50
- - **Hook-Based Integration**: Each AI CLI gets transparent cross-tool capabilities
51
- - **Smart Intent Detection**: Automatically recognizes collaboration requests and routes them appropriately
52
- - **No Special Commands**: Collaboration happens naturally within normal CLI usage
53
-
54
- ### Enhanced CLI Help Information Parsing
55
- - **Real-time Extraction**: Dynamically parses actual CLI `--help` output to get latest command specifications
56
- - **Smart Options Detection**: Automatically identifies global options, subcommands, and parameters
57
- - **Graceful Fallback**: Falls back to preset templates when real-time parsing fails
58
- - **Persistent Updates**: Stores parsed results for future use, continuously improving accuracy
59
-
60
- ### Supported CLI Tools
61
-
62
- #### Core Tools (Required)
63
- - **Claude CLI** - Anthropic Claude CLI Tool
64
- - **Gemini CLI** - Google Gemini CLI Tool
65
-
66
- #### Extension Tools (Optional)
67
- - **QwenCode CLI** - Alibaba Cloud QwenCode CLI Tool
68
- - **iFlow CLI** - iFlow Workflow CLI Tool
69
- - **Qoder CLI** - Qoder Code Generation CLI Tool
70
- - **CodeBuddy CLI** - CodeBuddy Programming Assistant CLI Tool
71
- - **GitHub Copilot CLI** - GitHub Copilot CLI Tool
72
- - **Codex CLI** - OpenAI Codex Code Analysis CLI Tool
73
- - **Cline CLI** - Cline AI Assistant CLI Tool - Supports task lifecycle hooks and multi-agent orchestration
74
-
75
- ### Intelligent Deployment System
76
-
77
- ```bash
78
- # Intelligent deployment (recommended)
79
- stigmergy deploy
80
-
81
- # Sample output:
82
- 🔍 Scanning system CLI tool status...
83
-
84
- 🔴 ❌ Claude CLI | CLI: Not installed | Integration: Not installed
85
- 🟢 Gemini CLI | CLI: Available | Integration: Installed
86
- 🔴 QwenCode CLI | CLI: Not installed | Integration: Not installed
87
-
88
- 📋 Detected the following tools not installed:
89
-
90
- 🔴 CLI Tools Not Installed:
91
- - Claude CLI (Required) - Anthropic Claude CLI Tool
92
- - QwenCode CLI (Optional) - Alibaba Cloud QwenCode CLI Tool
93
-
94
- Would you like to try automatically installing 2 CLI tools? (Y/n): Y
95
- ```
96
-
97
- ## 🎯 Cross-CLI Collaboration Examples
98
-
99
- After installation, you can directly call other tools within any supported CLI:
100
-
101
- ### In Claude CLI
102
- ```bash
103
- # Cross-AI tool collaboration (natural language)
104
- Please use gemini to translate this code to Python
105
- Call qwen to analyze this requirement
106
- Use iflow to create a development workflow
107
- Ask qoder to generate Python code
108
- Have codebuddy assist with debugging
109
- ```
110
-
111
- ### In Gemini CLI
112
- ```bash
113
- # Natural language cross-CLI collaboration
114
- Use claude to review this code for security issues
115
- Call qwen for Chinese localization
116
- Let copilot suggest performance improvements
117
- Ask codex for architectural analysis
118
- ```
119
-
120
- ### In QwenCode CLI
121
- ```bash
122
- # Multi-tool orchestration with natural language
123
- Let claude check for security vulnerabilities
124
- Use gemini to optimize this algorithm
125
- Call iflow to automate the deployment process
126
- Ask copilot to improve code completion
127
- ```
128
-
129
- ## 🔧 Advanced Features
130
-
131
- ### Real-time CLI Help Parsing
132
- The system now includes advanced real-time CLI help parsing capabilities:
133
-
134
- ```python
135
- # Example of real-time help parsing
136
- specs = _parse_cli_help(cli_name)
137
- # Automatically extracts:
138
- # - Global options (--help, --version, --verbose, etc.)
139
- # - Subcommands (chat, file, config, auth, etc.)
140
- # - Parameters (input, output, model, temperature, etc.)
141
- # - Usage patterns and examples
142
- ```
143
-
144
- ### Persistent Storage Mechanism
145
- - **Dynamic Templates**: Updated CLI command specifications are stored persistently
146
- - **Continuous Improvement**: Each successful parse improves future accuracy
147
- - **Fallback Support**: Preset templates ensure functionality even when real-time parsing fails
148
-
149
- ### Internationalization
150
- - **Global Design**: Fully English-based interface for international users
151
- - **Multi-language Support**: Ready for expansion to multiple languages
152
- - **Cross-platform Compatibility**: Works seamlessly across Windows, Linux, and macOS
153
-
154
- ## 📊 Global Memory Documents
155
-
156
- The system generates comprehensive memory documents for each CLI tool:
157
-
158
- ### JSON Format
159
- ```json
160
- {
161
- "cli_name": "claude",
162
- "display_name": "Claude CLI",
163
- "command": "claude",
164
- "description": "Anthropic Claude CLI Tool",
165
- "version_info": "...",
166
- "command_specs": {
167
- "global_options": {
168
- "--help": "Show help information",
169
- "--version": "Show version information",
170
- "--verbose": "Detailed output"
171
- },
172
- "subcommands": {
173
- "chat": "Chat mode",
174
- "file": "File processing mode",
175
- "config": "Configuration management"
176
- },
177
- "parameters": {
178
- "input": "Input file or prompt",
179
- "output": "Output file path",
180
- "model": "Model selection",
181
- "temperature": "Creativity parameter (0.0-1.0)",
182
- "max_tokens": "Maximum tokens",
183
- "timeout": "Timeout (seconds)"
184
- }
185
- }
186
- }
187
- ```
188
-
189
- ### Markdown Documentation
190
- - **Comprehensive Guides**: Detailed documentation for each CLI tool
191
- - **Usage Examples**: Practical examples for common use cases
192
- - **Integration Patterns**: Best practices for cross-CLI collaboration
193
- - **Command Reference**: Complete command specifications and parameters
194
-
195
- ## 🛠️ Local Generation and Management
196
-
197
- ### Generate Global Memory Documents
198
- ```bash
199
- # Generate comprehensive memory documents for all tools
200
- python generate_global_memory.py
201
-
202
- # Creates:
203
- # - global_memory/claude_global_memory.json
204
- # - global_memory/claude_global_memory.md
205
- # - global_memory/gemini_global_memory.json
206
- # - global_memory/gemini_global_memory.md
207
- # ... and more for all supported CLIs
208
- ```
209
-
210
- ### Advanced Command Specification Generation
211
- The enhanced `generate_global_memory.py` script now includes:
212
-
213
- 1. **Real-time CLI Parsing**: Directly calls `--help` commands to extract accurate specifications
214
- 2. **Smart Pattern Recognition**: Uses regex and intelligent parsing to extract options, subcommands, and parameters
215
- 3. **Fallback Templates**: Provides comprehensive default templates when live parsing isn't available
216
- 4. **Dynamic Updates**: Continuously improves templates based on real-world CLI behavior
217
- 5. **Persistent Storage**: Saves parsed specifications for improved future accuracy
218
-
219
- ## 🌐 Cross-Platform Support
220
-
221
- ### Windows
222
- ```bash
223
- # Windows deployment
224
- npx stigmergy-cli deploy
225
- ```
226
-
227
- ### Linux/macOS
228
- ```bash
229
- # Unix-like systems
230
- npx stigmergy-cli deploy
231
- ```
232
-
233
- ## 📄 Global Memory Documentation
234
-
235
- ### CLI Command Specifications
236
- Each CLI tool gets detailed command specifications including:
237
- - **Global Options**: Common flags like `--help`, `--version`, `--verbose`
238
- - **Subcommands**: Specific modes like `chat`, `file`, `config`, `auth`
239
- - **Parameters**: Detailed parameter definitions with descriptions
240
- - **Usage Examples**: Practical usage patterns and best practices
241
-
242
- ### Collaboration Patterns
243
- - **Automatic Recognition**: Detects cross-CLI collaboration patterns
244
- - **Template Matching**: Matches natural language patterns to CLI commands
245
- - **Intelligent Routing**: Routes requests to the most appropriate CLI tool
246
-
247
- ## Complete Command List
248
-
249
- ```bash
250
- # Basic commands
251
- stigmergy init # Initialize project in current directory
252
- stigmergy status # Check system and adapter status
253
- stigmergy scan # Scan environment for available AI CLI tools
254
-
255
- # Project management
256
- stigmergy check-project # Check project configuration
257
- stigmergy validate [scope] # Validate configuration (project/global)
258
- stigmergy clean [options] # Clean cache and temporary files
259
-
260
- # Testing/debugging
261
- stigmergy call <cli> [args] # Direct CLI tool invocation (for testing)
262
-
263
- # Development commands
264
- npm run build # Build project
265
- npm run publish-to-npm # Publish to NPM
266
- npm run test # Run tests
267
- ```
268
-
269
- ## Project Structure
270
-
271
- ```
272
- stigmergy-CLI-Multi-Agents/
273
- ├── package.json # NPM Package Configuration
274
- ├── src/
275
- │ ├── main.js # Main Entry Point
276
- │ ├── deploy.js # Smart Deployment Script
277
- │ ├── adapters/ # CLI Adapters
278
- │ │ ├── claude/
279
- │ │ ├── gemini/
280
- │ │ ├── qwencode/
281
- │ │ └── ...
282
- │ └── core/ # Core Modules
283
- ├── adapters/ # CLI Installation Scripts
284
- │ ├── claude/install_claude_integration.py
285
- │ ├── gemini/install_gemini_integration.py
286
- │ └── ...
287
- └── templates/ # Configuration Templates
288
- ```
289
-
290
- ## 🔧 Automated CLI Tool Installation
291
-
292
- The smart deployment script supports automatic installation of all CLI tools:
293
-
294
- ### Core Tools
295
- ```bash
296
- npm install -g @anthropic-ai/claude-code
297
- npm install -g @google/gemini-cli
298
- ```
299
-
300
- ### Extension Tools
301
- ```bash
302
- npm install -g @qwen-code/qwen-code@latest
303
- npm install -g @iflow-ai/iflow-cli@latest
304
- npm install -g @qoder-ai/qodercli
305
- npm install -g @tencent-ai/codebuddy-code
306
- npm install -g @github/copilot
307
- npm i -g @openai/codex --registry=https://registry.npmmirror.com
308
- ```
309
-
310
- ## 🎯 Use Cases
311
-
312
- ### Case 1: Personal Developer Environment
313
- ```bash
314
- # Quick configuration for new development environment
315
- git clone my-project
316
- cd my-project
317
- stigmergy deploy
318
-
319
- # Now you can cross-CLI collaboration in any CLI
320
- claude "Please use gemini to help me optimize this code's performance"
321
- ```
322
-
323
- ### Case 2: Team Collaboration
324
- ```bash
325
- # Team shared project configuration
326
- git clone team-project
327
- cd team-project
328
- stigmergy init
329
-
330
- # All team members use the same collaboration context
331
- gemini "Use claude to check the design patterns of this module"
332
- ```
333
-
334
- ### Case 3: Multi-language Development
335
- ```bash
336
- # Different AI tools complement each other's strengths
337
- qwen "Use copilot to generate frontend components"
338
- iflow "Let gemini create API documentation"
339
- ```
340
-
341
- ## 🔧 Development Environment Setup
342
-
343
- ```bash
344
- # Clone project
345
- git clone https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git
346
- cd stigmergy-CLI-Multi-Agents
347
-
348
- # Install dependencies
349
- npm install
350
-
351
- # Development mode execution
352
- npm run start
353
- npm run status
354
- npm run scan
355
-
356
- # Build and publish
357
- npm run build
358
- npm run publish-to-npm
359
- ```
360
-
361
- ## 🚀 Publishing New Versions
362
-
363
- ```bash
364
- # Update version number
365
- npm version patch # Patch version
366
- npm version minor # Minor version
367
- npm version major # Major version
368
-
369
- # Publish to NPM
370
- npm run publish-to-npm
371
-
372
- # Validate publication
373
- npx stigmergy --version
374
- ```
375
-
376
- ## 🛠️ Troubleshooting
377
-
378
- ### Common Issues
379
-
380
- 1. **Node.js version incompatible**
381
- ```bash
382
- # Ensure using Node.js 16+
383
- node --version
384
- ```
385
-
386
- 2. **Permission errors**
387
- ```bash
388
- # Use administrator privileges
389
- sudo npm install -g stigmergy
390
- ```
391
-
392
- 3. **Network connection issues**
393
- ```bash
394
- # Set NPM mirror
395
- npm config set registry https://registry.npmmirror.com
396
- ```
397
-
398
- 4. **CLI tool installation failure**
399
- ```bash
400
- # Manually install specific tool
401
- npm install -g @anthropic-ai/claude-code
402
- ```
403
-
404
- ### Debug Mode
405
-
406
- ```bash
407
- # Verbose debug output
408
- DEBUG=stigmergy:* stigmergy deploy
409
-
410
- # Scan status only
411
- stigmergy scan
412
- ```
413
-
414
- ## 📚 More Information
415
-
416
- - **GitHub**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents
417
- - **NPM**: https://www.npmjs.com/package/stigmergy
418
- - **Documentation**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents#readme
419
- - **Issue Tracking**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents/issues
420
-
421
- ## 🚀 Getting Started
422
-
423
- ### Prerequisites
424
- - Node.js 16+ (for deployment scripts)
425
- - Python 3.8+ (for advanced features)
426
- - Git (for installation)
427
-
428
- ### Quick Setup
429
- 1. **Install the system**
430
- ```bash
431
- npm install -g stigmergy
432
- ```
433
-
434
- 2. **Initialize project**
435
- ```bash
436
- stigmergy init
437
- ```
438
-
439
- 3. **Deploy integrations**
440
- ```bash
441
- stigmergy deploy
442
- ```
443
-
444
- 4. **Start collaborating**
445
- ```bash
446
- claude "Please use gemini to help me analyze this code"
447
- gemini "Ask claude to review the security aspects"
448
- ```
449
-
450
- ## 🤝 Contributing
451
-
452
- 1. Fork the repository
453
- 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
454
- 3. Make your changes
455
- 4. Commit your changes (`git commit -m 'Add amazing feature'`)
456
- 5. Push to the branch (`git push origin feature/amazing-feature`)
457
- 6. Open a Pull Request
458
-
459
- ## 📄 License
460
-
461
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
462
-
463
- ## 📞 Support
464
-
465
- For support, please open an issue in the GitHub repository or contact the maintainers.
466
-
467
- ---
468
-
469
- **🎯 Stigmergy CLI - True Cross-CLI Collaboration, Making Every AI Tool Deliver Maximum Value!**
1
+ # Stigmergy CLI - Multi-Agents Cross-AI CLI Tool Collaboration System
2
+
3
+ > **Important: This is not a standalone CLI tool, but an enhancement system!**
4
+ >
5
+ > Stigmergy CLI enables existing AI CLI tools to collaborate with each other through a plugin system, rather than replacing them.
6
+
7
+ [![Node.js](https://img.shields.io/badge/node-16+-green.svg)](https://nodejs.org)
8
+ [![NPM](https://img.shields.io/badge/npm-stigmergy-blue.svg)](https://www.npmjs.com/package/stigmergy)
9
+ [![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
10
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey.svg)]()
11
+
12
+ ## Quick Start
13
+
14
+ ### One-Click Deployment (Recommended)
15
+
16
+ ```bash
17
+ # Install Stigmergy CLI globally
18
+ npm install -g stigmergy
19
+
20
+ # Run interactive setup
21
+ stigmergy
22
+ ```
23
+
24
+ This command will:
25
+ - Scan your system for available AI CLI tools
26
+ - Install missing tools with your permission
27
+ - Configure automatic cross-tool collaboration
28
+ - Set up hook integrations for seamless communication
29
+
30
+ ### Manual Installation
31
+
32
+ ```bash
33
+ npm install -g stigmergy
34
+ stigmergy --help
35
+ ```
36
+
37
+ ## Supported AI CLI Tools
38
+
39
+ Stigmergy CLI enhances the following AI CLI tools:
40
+
41
+ - **Claude CLI** - Anthropic's Claude assistant
42
+ - **Gemini CLI** - Google's Gemini AI
43
+ - **Qwen CLI** - Alibaba's Qwen model
44
+ - **iFlow CLI** - Intelligent workflow automation
45
+ - **Qoder CLI** - AI-powered code generation
46
+ - **CodeBuddy CLI** - Programming assistant
47
+ - **GitHub Copilot CLI** - Microsoft's Copilot
48
+ - **OpenAI Codex CLI** - OpenAI's code completion
49
+
50
+ ## Usage
51
+
52
+ ### Basic Commands
53
+
54
+ ```bash
55
+ # Show help
56
+ stigmergy --help
57
+
58
+ # Check version
59
+ stigmergy --version
60
+
61
+ # Scan for available AI CLI tools
62
+ stigmergy scan
63
+
64
+ # Check system status
65
+ stigmergy status
66
+
67
+ # Interactive installation mode
68
+ stigmergy install
69
+
70
+ # Deploy hooks to all tools
71
+ stigmergy deploy
72
+
73
+ # Complete setup (scan + install + deploy)
74
+ stigmergy setup
75
+ ```
76
+
77
+ ### Cross-CLI Collaboration
78
+
79
+ Once installed, you can use AI CLI tools to collaborate with each other:
80
+
81
+ ```bash
82
+ # Use Claude to analyze code
83
+ stigmergy call claude "analyze this function"
84
+
85
+ # Use Gemini for documentation
86
+ stigmergy call gemini "generate docs for this file"
87
+
88
+ # Use Qwen for translation
89
+ stigmergy call qwen "translate to English"
90
+
91
+ # Use Copilot for code suggestions
92
+ stigmergy call copilot "suggest improvements"
93
+ ```
94
+
95
+ ### Installation Workflow
96
+
97
+ 1. **Scan**: `stigmergy scan` - Detects installed AI CLI tools
98
+ 2. **Install**: `stigmergy install` - Interactive tool installation
99
+ 3. **Deploy**: `stigmergy deploy` - Sets up cross-tool communication
100
+ 4. **Use**: `stigmergy call <tool> <prompt>` - Start collaborating
101
+
102
+ ## Configuration
103
+
104
+ ### Global Configuration
105
+
106
+ Configuration is stored in `~/.stigmergy/config.json`:
107
+
108
+ ```json
109
+ {
110
+ "version": "1.0.76",
111
+ "installed": "2025-12-07T00:00:00.000Z",
112
+ "projectPath": "/path/to/project",
113
+ "availableTools": ["claude", "gemini", "qwen"],
114
+ "collaboration": {
115
+ "enabled": true,
116
+ "protocols": [
117
+ "Use {cli} to {task}",
118
+ "Call {cli} to {task}",
119
+ "Ask {cli} for {task}"
120
+ ]
121
+ }
122
+ }
123
+ ```
124
+
125
+ ### Project Configuration
126
+
127
+ Each project gets a `STIGMERGY.md` file with tool-specific usage instructions.
128
+
129
+ ## Features
130
+
131
+ - **Automated Detection**: Scans for installed AI CLI tools
132
+ - **Interactive Installation**: One-click installation of missing tools
133
+ - **Cross-Tool Communication**: Enables AI CLI tools to work together
134
+ - **Hook Integration**: Deploys integration hooks to each tool
135
+ - **International Support**: Pure ANSI character output for global compatibility
136
+ - **Auto-Setup**: Configures everything automatically on npm install
137
+
138
+ ## Development
139
+
140
+ ### Project Structure
141
+
142
+ ```
143
+ stigmergy-CLI-Multi-Agents/
144
+ ├── src/
145
+ │ ├── main.js # Main CLI logic
146
+ │ └── index.js # Entry point
147
+ ├── package.json # NPM configuration
148
+ └── README.md # This file
149
+ ```
150
+
151
+ ### Building from Source
152
+
153
+ ```bash
154
+ # Clone the repository
155
+ git clone https://github.com/ptreezh/stigmergy-CLI-Multi-Agents.git
156
+ cd stigmergy-CLI-Multi-Agents
157
+
158
+ # Install dependencies
159
+ npm install
160
+
161
+ # Install globally for testing
162
+ npm install -g .
163
+ ```
164
+
165
+ ## Contributing
166
+
167
+ 1. Fork the repository
168
+ 2. Create a feature branch
169
+ 3. Make your changes
170
+ 4. Test thoroughly
171
+ 5. Submit a pull request
172
+
173
+ ## License
174
+
175
+ MIT License - see [LICENSE](LICENSE) file for details.
176
+
177
+ ## Support
178
+
179
+ - **Documentation**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents
180
+ - **Issues**: https://github.com/ptreezh/stigmergy-CLI-Multi-Agents/issues
181
+ - **NPM**: https://www.npmjs.com/package/stigmergy
182
+
183
+ ## Changelog
184
+
185
+ ### Version 1.0.76
186
+ - Unified international version with pure ANSI characters
187
+ - Single source of truth for all CLI logic
188
+ - Automated installation and deployment system
189
+ - Enhanced error handling and validation
190
+ - Removed all redundant scripts and configurations