@xagent/x-cli 1.1.82 → 1.1.83

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@xagent/x-cli",
4
- "version": "1.1.82",
4
+ "version": "1.1.83",
5
5
  "description": "An open-source AI agent that brings advanced AI capabilities directly into your terminal.",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -13,37 +13,29 @@
13
13
  }
14
14
  },
15
15
  "bin": {
16
- "xcli": "dist/index.js"
16
+ "grok": "./dist/index.js"
17
17
  },
18
18
  "files": [
19
- "dist/**/*",
20
- ".xcli/**/*",
19
+ "dist",
21
20
  "README.md",
22
- "LICENSE",
23
- "docs/assets/logos/**/*"
21
+ "package.json"
24
22
  ],
25
23
  "scripts": {
26
- "build": "tsup",
27
- "build:tsc": "tsc",
28
- "dev": "npm run build && node dist/index.js --prompt 'Development test: Hello X-CLI!'",
29
- "dev:node": "tsx src/index.ts",
30
- "dev:watch": "npm run build && node --watch dist/index.js",
31
- "start": "node dist/index.js",
32
- "local": "node scripts/local.js",
33
- "test:workflow": "node scripts/test-workflow.js",
34
- "start:bun": "bun run dist/index.js",
35
- "lint": "eslint . --ext .js,.jsx,.ts,.tsx --ignore-pattern 'dist/**'",
24
+ "build": "tsup src/index.ts --format esm --dts",
25
+ "dev": "tsx watch src/index.ts",
26
+ "lint": "eslint src --ext .ts",
36
27
  "typecheck": "tsc --noEmit",
37
- "install:bun": "bun install",
38
- "preinstall": "echo '🤖 Installing X CLI...'",
39
- "postinstall": "echo '==================================================' && echo '✅ X CLI installed successfully!' && echo '==================================================' && echo '🚀 Try: xcli --help' && echo '💡 If \"command not found\", add to PATH:' && node -e \"const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shell=isMac?'zshrc':'bashrc';console.log((isMac?'🍎 Mac':'🐧 Linux')+': echo \\'export PATH=\\\"$(npm config get prefix)/bin:$PATH\\\"\\' >> ~/.'+shell+' && source ~/.'+shell);}\" && echo '📖 Docs: https://github.com/hinetapora/x-cli-hurry-mode#installation' && echo '🔑 Set API key: export GROK_API_KEY=your_key_here' && echo '==================================================' && echo '🔧 Auto-setup PATH? Press Enter to add (or Ctrl+C to skip)' && read -t 10 && node -e \"const fs=require('fs');const p=process.platform;const isMac=p==='darwin';const isLinux=p==='linux';if(isMac||isLinux){const shellFile=isMac?'.zshrc':'.bashrc';const rcPath=process.env.HOME+'/'+shellFile;const pathCmd='export PATH=\\\"$(npm config get prefix)/bin:$PATH\\\"';try{const content=fs.readFileSync(rcPath,'utf8');if(!content.includes(pathCmd)){fs.appendFileSync(rcPath,'\\n'+pathCmd+'\\n');console.log('✅ Added to ~/'+shellFile+' - restart terminal');}else{console.log('â„šī¸ Already in ~/'+shellFile);}}catch(e){console.log('âš ī¸ Could not modify ~/'+shellFile+' - add manually');}}\" && echo '🔍 Verifying: ' && xcli --version 2>/dev/null || echo 'âš ī¸ xcli not in PATH yet - follow above steps'",
40
28
  "prepare": "husky install",
41
29
  "dev:site": "cd apps/site && npm run start",
42
30
  "build:site": "cd apps/site && npm run build",
43
31
  "sync:docs": "cd apps/site && node src/scripts/sync-agent-docs.js",
44
- "smart-push": "./scripts/smart-push.sh"
32
+ "smart-push": "./scripts/smart-push.sh",
33
+ "push": "echo '🚨 BLOCKED: Use npm run smart-push instead' && echo '💡 Direct git push bypasses automation' && exit 1",
34
+ "git-push": "echo '🚨 BLOCKED: Use npm run smart-push instead' && echo '💡 Direct git push bypasses automation' && exit 1"
45
35
  },
46
36
  "lint-staged": {
37
+ ".agent/**/*.{md,mdx}": "prettier --write",
38
+ "apps/site/docs/**/*.{md,mdx}": [],
47
39
  "*.{ts,tsx}": [
48
40
  "eslint --fix --ignore-pattern 'dist/**'"
49
41
  ],
package/docs/README.md DELETED
@@ -1,212 +0,0 @@
1
- # X-CLI Workflow Documentation
2
-
3
- ## Overview
4
-
5
- This documentation directory contains comprehensive guides for X-CLI's revolutionary "Research → Recommend → Execute → Auto-Doc" workflow system. These documents explain how to effectively use and integrate with the complete AI-assisted development workflow.
6
-
7
- ## Documentation Structure
8
-
9
- ### 📚 User Guide (`workflow-user-guide.md`)
10
- **Primary guide for end users and developers**
11
-
12
- - **Complete workflow walkthrough** - Step-by-step guide through all phases
13
- - **Interactive examples** - Real console output and decision flows
14
- - **Best practices** - Task formulation, decision making, error recovery
15
- - **Advanced usage** - CLI flags, environment variables, configuration
16
- - **Troubleshooting** - Common issues and solutions
17
- - **Integration examples** - CI/CD, development workflows
18
-
19
- **Perfect for:**
20
- - New users learning the workflow
21
- - Developers implementing features
22
- - Teams adopting X-CLI workflows
23
-
24
- ### 🔧 API Reference (`api-reference.md`)
25
- **Technical documentation for developers and integrators**
26
-
27
- - **Complete type definitions** - All interfaces and data structures
28
- - **Service class documentation** - Methods, parameters, return values
29
- - **Configuration options** - Environment variables, config files
30
- - **Integration examples** - Programmatic usage, CI/CD integration
31
- - **Error handling** - Exception types and recovery patterns
32
- - **Performance optimization** - Memory management, caching strategies
33
-
34
- **Perfect for:**
35
- - Building custom integrations
36
- - Extending X-CLI with new tools
37
- - CI/CD pipeline development
38
- - Advanced configuration
39
-
40
- ### đŸ—ī¸ Architecture Overview (`.agent/system/workflow-overview.md`)
41
- **System design and technical architecture**
42
-
43
- - **Core principles** - Safety, operator-in-the-loop, context intelligence
44
- - **Workflow phases** - Detailed breakdown of each stage
45
- - **Integration points** - How components work together
46
- - **Safety guarantees** - Data protection and error boundaries
47
- - **Future extensions** - Planned features and integrations
48
-
49
- **Perfect for:**
50
- - Understanding system design
51
- - Planning integrations
52
- - Technical architecture reviews
53
-
54
- ## Quick Start
55
-
56
- ### For End Users
57
- 1. **Read the User Guide** - Start with `workflow-user-guide.md`
58
- 2. **Try basic examples** - Use the command examples provided
59
- 3. **Explore advanced features** - Check configuration and integration sections
60
-
61
- ### For Developers
62
- 1. **Review API Reference** - Understand available interfaces
63
- 2. **Check Architecture** - Learn system design principles
64
- 3. **Follow Integration Examples** - See real-world usage patterns
65
-
66
- ### For Teams
67
- 1. **Study User Guide** - Train team members on workflow usage
68
- 2. **Review Architecture** - Understand safety and reliability features
69
- 3. **Plan Integration** - Use API Reference for CI/CD and tool integration
70
-
71
- ## Key Concepts
72
-
73
- ### The Workflow
74
-
75
- X-CLI transforms complex tasks into safe, structured experiences through four phases:
76
-
77
- 1. **🤖 Research** - AI analyzes task with project context
78
- 2. **💡 Recommend** - Presents options with trade-offs for approval
79
- 3. **⚡ Execute** - Runs approved plan with safety guarantees
80
- 4. **📝 Auto-Doc** - Documents completion and learns lessons
81
-
82
- ### Safety First
83
-
84
- - **Zero data loss** - All changes have patches and backups
85
- - **Version control** - Automatic git commits for all modifications
86
- - **Error recovery** - Intelligent handling of execution failures
87
- - **Audit trail** - Complete record of all decisions and actions
88
-
89
- ### Context Intelligence
90
-
91
- - **Automatic loading** - Project docs provide AI context on startup
92
- - **Knowledge accumulation** - Past executions inform future recommendations
93
- - **Adaptive learning** - System improves through documented lessons
94
- - **Project memory** - Institutional knowledge preserved in `.agent/` files
95
-
96
- ## Usage Examples
97
-
98
- ### Simple Task
99
- ```bash
100
- $ xcli "add input validation to user registration form"
101
-
102
- 🔍 Researching and analyzing...
103
- [... structured analysis output ...]
104
- Proceed with recommendation? (Y/n) [R=revise] Y
105
-
106
- 🚀 Starting execution...
107
- ✅ Execution completed: 3/3 steps successful
108
- 📝 Documentation saved
109
- ```
110
-
111
- ### Complex Task with Recovery
112
- ```bash
113
- $ xcli "implement payment processing system"
114
-
115
- 🔍 Researching and analyzing...
116
- [... comprehensive analysis ...]
117
- Proceed with recommendation? (Y/n) [R=revise] Y
118
-
119
- 🚀 Starting execution...
120
- 🚨 ISSUE ENCOUNTERED: test failures detected
121
- 🔄 Initiating adaptive recovery...
122
- [... recovery analysis ...]
123
- Proceed with recovery plan? (Y/n) [R=revise] Y
124
-
125
- ✅ Recovery completed. Resuming execution...
126
- ✅ Execution completed: 8/8 steps successful
127
- ```
128
-
129
- ### CI/CD Integration
130
- ```yaml
131
- - name: Implement Feature
132
- run: |
133
- npx @xagent/x-cli@latest --headless "add error logging"
134
- env:
135
- X_API_KEY: ${{ secrets.X_API_KEY }}
136
- ```
137
-
138
- ## Configuration
139
-
140
- ### Environment Variables
141
- ```bash
142
- # Required
143
- X_API_KEY=your_api_key
144
-
145
- # Optional
146
- XCLI_PATCH_DIR=/custom/patches # Custom patch storage
147
- XCLI_CONTEXT_BUDGET=500 # Context size limit (KB)
148
- XCLI_MAX_RECOVERY_ATTEMPTS=3 # Recovery retry limit
149
- ```
150
-
151
- ### Configuration Files
152
- - **User settings**: `~/.xcli/config.json`
153
- - **Project settings**: `.xcli/project.json`
154
- - **Context docs**: `.agent/` directory structure
155
-
156
- ## Integration Points
157
-
158
- ### Programmatic Usage
159
- ```typescript
160
- import { ResearchRecommendService } from '@xagent/x-cli';
161
-
162
- const service = new ResearchRecommendService(agent);
163
- const result = await service.researchRecommendExecute(request);
164
- ```
165
-
166
- ### Tool Extensions
167
- - Add custom tools to the GrokAgent
168
- - Extend execution capabilities
169
- - Integrate with external systems
170
-
171
- ### CI/CD Pipelines
172
- - Headless mode for automation
173
- - Structured output for parsing
174
- - Patch file generation for reviews
175
-
176
- ## Support & Resources
177
-
178
- ### Getting Help
179
- - **User Guide** - Step-by-step walkthroughs and examples
180
- - **API Reference** - Technical details and integration guides
181
- - **Architecture Docs** - System design and principles
182
- - **Generated Docs** - Auto-created `.agent/tasks/` files
183
-
184
- ### Common Issues
185
- - **Context loading** - Check `.agent/` directory structure
186
- - **API errors** - Verify X_API_KEY configuration
187
- - **Execution failures** - Review patch files and backups
188
- - **Performance** - Adjust context budget and timeouts
189
-
190
- ### Community
191
- - **GitHub Issues** - Bug reports and feature requests
192
- - **Discord Community** - Usage questions and discussions
193
- - **Documentation PRs** - Help improve these guides
194
-
195
- ## Version History
196
-
197
- ### Current Version: Sprint Complete ✅
198
- - **5-stage implementation** complete
199
- - **Full workflow operational**
200
- - **Production-ready features**
201
- - **Comprehensive documentation**
202
-
203
- ### Key Features Delivered
204
- - ✅ Intelligent context loading (Stage 1)
205
- - ✅ Research → Recommend flow (Stage 2)
206
- - ✅ Safe execution with patches/backups (Stage 3)
207
- - ✅ Adaptive error recovery (Stage 4)
208
- - ✅ Auto-documentation & learning (Stage 5)
209
-
210
- ---
211
-
212
- *This documentation represents the complete guide to X-CLI's workflow system. Start with the User Guide for practical usage, then explore the API Reference for technical integration details.*
@@ -1,70 +0,0 @@
1
- # X CLI Logo Assets
2
-
3
- This directory contains all logo assets for the X CLI project.
4
-
5
- ## Files
6
-
7
- ### Core Logo Files
8
-
9
- - **`x-cli-logo.svg`** - Standard logo (100x100px)
10
- - **`x-cli-logo-small.svg`** - Small version (32x32px)
11
- - **`x-cli-logo-large.svg`** - Large version (200x200px)
12
-
13
- ### Specialized Assets
14
-
15
- - **`favicon.svg`** - Favicon for web use (32x32px)
16
- - **`github-social-preview.svg`** - GitHub repository social preview (1200x630px)
17
-
18
- ## Usage Guidelines
19
-
20
- ### Colors
21
-
22
- - **Red**: `#ea4335` (Google Red)
23
- - **Yellow**: `#fbbc04` (Google Yellow)
24
- - **Green**: `#34a853` (Google Green)
25
- - **Blue**: `#4285f4` (Google Blue)
26
- - **Center**: `#1a73e8` (Darker Blue)
27
-
28
- ### Design Elements
29
-
30
- - Chrome-inspired circular design with 4 color segments
31
- - Central blue circle with white inner circle
32
- - "X" symbol in center representing the CLI name
33
- - Clean, professional appearance suitable for terminal tools
34
-
35
- ### Recommended Usage
36
-
37
- - **README.md**: Use `x-cli-logo-large.svg` at 120px width
38
- - **Documentation**: Use `x-cli-logo.svg` at 100px width
39
- - **Icons**: Use `x-cli-logo-small.svg` or `favicon.svg`
40
- - **Social Media**: Use `github-social-preview.svg`
41
-
42
- ## Brand Guidelines
43
-
44
- ### Do's
45
-
46
- ✅ Use the logo with sufficient white space
47
- ✅ Maintain aspect ratio when scaling
48
- ✅ Use on light or dark backgrounds with proper contrast
49
- ✅ Use SVG format for crisp display at any size
50
-
51
- ### Don'ts
52
-
53
- ❌ Modify the colors or proportions
54
- ❌ Add effects, shadows, or outlines
55
- ❌ Use on busy backgrounds that reduce visibility
56
- ❌ Stretch or distort the logo
57
-
58
- ## Integration
59
-
60
- These assets are automatically included in NPM packages via the `files` field in `package.json`:
61
-
62
- ```json
63
- {
64
- "files": ["docs/assets/logos/**/*"]
65
- }
66
- ```
67
-
68
- ## Attribution
69
-
70
- Logo design inspired by Chrome's visual language, customized for X CLI branding.
@@ -1,8 +0,0 @@
1
- <svg width="32" height="32" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
2
- <!-- X CLI Logo - Black Fill - Favicon -->
3
- <g transform="translate(5, 12) scale(0.65, 0.65)">
4
- <path d="M0.00555015 7.77631L9.75248 22H14.085L4.33691 7.77631H0.00555015ZM4.33358 15.6762L0 22H4.3358L6.50092 18.8387L4.33358 15.6762ZM15.076 0L7.58515 10.9308L9.75248 14.0944L19.4118 0H15.076ZM15.8606 6.76374V22H19.4118V1.5818L15.8606 6.76374Z" fill="black"/>
5
- <path d="M21.0122 7.77826V22H25.348H32.924V18.8387H24.924V10.9328L29.5 10.9308L26.5 7.77631L24.924 7.77826H21.0122ZM30 11.9727V17.4727H33V11.9727H30Z" fill="black"/>
6
- <path d="M33 7.77631L32.924 10.9328L30 7.77631H33Z" fill="black"/>
7
- </g>
8
- </svg>
@@ -1,39 +0,0 @@
1
- <svg width="1200" height="630" viewBox="0 0 1200 630" xmlns="http://www.w3.org/2000/svg">
2
- <!-- GitHub Social Preview for X CLI -->
3
- <defs>
4
- <linearGradient id="backgroundGradient" x1="0%" y1="0%" x2="100%" y2="100%">
5
- <stop offset="0%" style="stop-color:#1e293b"/>
6
- <stop offset="100%" style="stop-color:#0f172a"/>
7
- </linearGradient>
8
- <radialGradient id="logoGradient" cx="50%" cy="50%" r="50%">
9
- <stop offset="0%" style="stop-color:#4285f4"/>
10
- <stop offset="100%" style="stop-color:#1a73e8"/>
11
- </radialGradient>
12
- </defs>
13
-
14
- <!-- Background -->
15
- <rect width="1200" height="630" fill="url(#backgroundGradient)"/>
16
-
17
- <!-- Logo (scaled and positioned) -->
18
- <g transform="translate(400, 200) scale(6, 6)">
19
- <path d="M0.00555015 7.77631L9.75248 22H14.085L4.33691 7.77631H0.00555015ZM4.33358 15.6762L0 22H4.3358L6.50092 18.8387L4.33358 15.6762ZM15.076 0L7.58515 10.9308L9.75248 14.0944L19.4118 0H15.076ZM15.8606 6.76374V22H19.4118V1.5818L15.8606 6.76374Z" fill="white"/>
20
- <path d="M21.0122 7.77826V22H25.348H32.924V18.8387H24.924V10.9328L29.5 10.9308L26.5 7.77631L24.924 7.77826H21.0122ZM30 11.9727V17.4727H33V11.9727H30Z" fill="white"/>
21
- <path d="M33 7.77631L32.924 10.9328L30 7.77631H33Z" fill="white"/>
22
- </g>
23
-
24
- <!-- Title -->
25
- <text x="550" y="280" font-family="Inter, Arial, sans-serif" font-size="64" font-weight="bold" fill="white">X CLI</text>
26
-
27
- <!-- Subtitle -->
28
- <text x="550" y="340" font-family="Inter, Arial, sans-serif" font-size="28" fill="#94a3b8">Claude Code-level intelligence in your terminal</text>
29
-
30
- <!-- Features -->
31
- <text x="550" y="390" font-family="Inter, Arial, sans-serif" font-size="20" fill="#64748b">🚀 Advanced File Operations â€ĸ 🧠 AI-Powered Tools â€ĸ 🔧 MCP Integration</text>
32
-
33
- <!-- Command -->
34
- <rect x="520" y="450" width="400" height="50" rx="8" fill="#1e293b" stroke="#334155" stroke-width="2"/>
35
- <text x="540" y="480" font-family="JetBrains Mono, monospace" font-size="18" fill="#10b981">npm install -g @xagent/x-cli</text>
36
-
37
- <!-- GitHub URL -->
38
- <text x="550" y="550" font-family="Inter, Arial, sans-serif" font-size="16" fill="#475569">github.com/x-cli-team/x-cli</text>
39
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="200" height="200" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
2
- <!-- X CLI Logo - Black Fill - Large -->
3
- <g transform="translate(17, 39) scale(2, 2)">
4
- <path d="M0.00555015 7.77631L9.75248 22H14.085L4.33691 7.77631H0.00555015ZM4.33358 15.6762L0 22H4.3358L6.50092 18.8387L4.33358 15.6762ZM15.076 0L7.58515 10.9308L9.75248 14.0944L19.4118 0H15.076ZM15.8606 6.76374V22H19.4118V1.5818L15.8606 6.76374Z" fill="black"/>
5
- <path d="M21.0122 7.77826V22H25.348H32.924V18.8387H24.924V10.9328L29.5 10.9308L26.5 7.77631L24.924 7.77826H21.0122ZM30 11.9727V17.4727H33V11.9727H30Z" fill="black"/>
6
- <path d="M33 7.77631L32.924 10.9328L30 7.77631H33Z" fill="black"/>
7
- </g>
8
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="32" height="32" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
2
- <!-- X CLI Logo - Black Fill - Small -->
3
- <g transform="translate(17, 39) scale(2, 2)">
4
- <path d="M0.00555015 7.77631L9.75248 22H14.085L4.33691 7.77631H0.00555015ZM4.33358 15.6762L0 22H4.3358L6.50092 18.8387L4.33358 15.6762ZM15.076 0L7.58515 10.9308L9.75248 14.0944L19.4118 0H15.076ZM15.8606 6.76374V22H19.4118V1.5818L15.8606 6.76374Z" fill="black"/>
5
- <path d="M21.0122 7.77826V22H25.348H32.924V18.8387H24.924V10.9328L29.5 10.9308L26.5 7.77631L24.924 7.77826H21.0122ZM30 11.9727V17.4727H33V11.9727H30Z" fill="black"/>
6
- <path d="M33 7.77631L32.924 10.9328L30 7.77631H33Z" fill="black"/>
7
- </g>
8
- </svg>
@@ -1,8 +0,0 @@
1
- <svg width="100" height="100" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
2
- <!-- X CLI Logo - Black Fill -->
3
- <g transform="translate(17, 39) scale(2, 2)">
4
- <path d="M0.00555015 7.77631L9.75248 22H14.085L4.33691 7.77631H0.00555015ZM4.33358 15.6762L0 22H4.3358L6.50092 18.8387L4.33358 15.6762ZM15.076 0L7.58515 10.9308L9.75248 14.0944L19.4118 0H15.076ZM15.8606 6.76374V22H19.4118V1.5818L15.8606 6.76374Z" fill="black"/>
5
- <path d="M21.0122 7.77826V22H25.348H32.924V18.8387H24.924V10.9328L29.5 10.9308L26.5 7.77631L24.924 7.77826H21.0122ZM30 11.9727V17.4727H33V11.9727H30Z" fill="black"/>
6
- <path d="M33 7.77631L32.924 10.9328L30 7.77631H33Z" fill="black"/>
7
- </g>
8
- </svg>