@xagent-ai/cli 1.0.1 → 1.1.0
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/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/README.md +280 -280
- package/README_CN.md +3 -3
- package/dist/ai-client.d.ts.map +1 -1
- package/dist/ai-client.js +84 -82
- package/dist/ai-client.js.map +1 -1
- package/dist/auth.d.ts +0 -1
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +75 -105
- package/dist/auth.js.map +1 -1
- package/dist/cli.js +166 -13
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +48 -7
- package/dist/config.js.map +1 -1
- package/dist/context-compressor.d.ts +5 -5
- package/dist/context-compressor.js +8 -8
- package/dist/context-compressor.js.map +1 -1
- package/dist/gui-subagent/action-parser/actionParser.d.ts +7 -0
- package/dist/gui-subagent/action-parser/actionParser.d.ts.map +1 -1
- package/dist/gui-subagent/action-parser/actionParser.js +6 -3
- package/dist/gui-subagent/action-parser/actionParser.js.map +1 -1
- package/dist/gui-subagent/action-parser/constants.d.ts +6 -0
- package/dist/gui-subagent/action-parser/constants.d.ts.map +1 -1
- package/dist/gui-subagent/action-parser/constants.js +5 -3
- package/dist/gui-subagent/action-parser/constants.js.map +1 -1
- package/dist/gui-subagent/action-parser/index.d.ts +6 -0
- package/dist/gui-subagent/action-parser/index.d.ts.map +1 -1
- package/dist/gui-subagent/action-parser/index.js +5 -3
- package/dist/gui-subagent/action-parser/index.js.map +1 -1
- package/dist/gui-subagent/action-parser/types.d.ts +4 -0
- package/dist/gui-subagent/action-parser/types.d.ts.map +1 -1
- package/dist/gui-subagent/action-parser/types.js +3 -3
- package/dist/gui-subagent/agent/gui-agent.d.ts +39 -0
- package/dist/gui-subagent/agent/gui-agent.d.ts.map +1 -1
- package/dist/gui-subagent/agent/gui-agent.js +164 -89
- package/dist/gui-subagent/agent/gui-agent.js.map +1 -1
- package/dist/gui-subagent/agent/index.d.ts +1 -1
- package/dist/gui-subagent/agent/index.d.ts.map +1 -1
- package/dist/gui-subagent/agent/index.js.map +1 -1
- package/dist/gui-subagent/index.d.ts +27 -1
- package/dist/gui-subagent/index.d.ts.map +1 -1
- package/dist/gui-subagent/index.js +6 -0
- package/dist/gui-subagent/index.js.map +1 -1
- package/dist/logger.js +1 -1
- package/dist/logger.js.map +1 -1
- package/dist/mcp.d.ts +1 -0
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +140 -29
- package/dist/mcp.js.map +1 -1
- package/dist/remote-ai-client.d.ts +111 -0
- package/dist/remote-ai-client.d.ts.map +1 -0
- package/dist/remote-ai-client.js +558 -0
- package/dist/remote-ai-client.js.map +1 -0
- package/dist/sdk-output-adapter.d.ts +232 -0
- package/dist/sdk-output-adapter.d.ts.map +1 -0
- package/dist/sdk-output-adapter.js +636 -0
- package/dist/sdk-output-adapter.js.map +1 -0
- package/dist/sdk-session-v2.d.ts +13 -0
- package/dist/sdk-session-v2.d.ts.map +1 -0
- package/dist/sdk-session-v2.js +46 -0
- package/dist/sdk-session-v2.js.map +1 -0
- package/dist/sdk-session.d.ts +13 -0
- package/dist/sdk-session.d.ts.map +1 -0
- package/dist/sdk-session.js +48 -0
- package/dist/sdk-session.js.map +1 -0
- package/dist/session-manager.js +3 -3
- package/dist/session-manager.js.map +1 -1
- package/dist/session.d.ts +46 -3
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +539 -104
- package/dist/session.js.map +1 -1
- package/dist/skill-invoker.d.ts +40 -4
- package/dist/skill-invoker.d.ts.map +1 -1
- package/dist/skill-invoker.js +310 -1184
- package/dist/skill-invoker.js.map +1 -1
- package/dist/skill-loader.d.ts +15 -1
- package/dist/skill-loader.d.ts.map +1 -1
- package/dist/skill-loader.js +49 -32
- package/dist/skill-loader.js.map +1 -1
- package/dist/slash-commands.d.ts +4 -2
- package/dist/slash-commands.d.ts.map +1 -1
- package/dist/slash-commands.js +149 -15
- package/dist/slash-commands.js.map +1 -1
- package/dist/smart-approval.d.ts +2 -1
- package/dist/smart-approval.d.ts.map +1 -1
- package/dist/smart-approval.js +29 -3
- package/dist/smart-approval.js.map +1 -1
- package/dist/system-prompt-generator.d.ts +4 -5
- package/dist/system-prompt-generator.d.ts.map +1 -1
- package/dist/system-prompt-generator.js +131 -81
- package/dist/system-prompt-generator.js.map +1 -1
- package/dist/tools.d.ts +17 -6
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +264 -211
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/docs/architecture/mcp-integration-guide.md +194 -131
- package/docs/architecture/overview.md +169 -93
- package/docs/architecture/tool-system-design.md +56 -11
- package/docs/cli/commands.md +238 -189
- package/docs/smart-mode.md +281 -257
- package/docs/third-party-models.md +247 -256
- package/package.json +6 -2
- package/src/ai-client.ts +107 -105
- package/src/auth.ts +82 -116
- package/src/cancellation.ts +1 -1
- package/src/cli.ts +178 -13
- package/src/config.ts +57 -8
- package/src/context-compressor.ts +8 -8
- package/src/gui-subagent/action-parser/actionParser.ts +6 -3
- package/src/gui-subagent/action-parser/constants.ts +5 -3
- package/src/gui-subagent/action-parser/index.ts +5 -3
- package/src/gui-subagent/action-parser/types.ts +3 -3
- package/src/gui-subagent/agent/gui-agent.ts +210 -103
- package/src/gui-subagent/agent/index.ts +1 -1
- package/src/gui-subagent/index.ts +26 -2
- package/src/index.ts +18 -18
- package/src/logger.ts +1 -1
- package/src/mcp.ts +149 -30
- package/src/remote-ai-client.ts +671 -0
- package/src/session-manager.ts +3 -3
- package/src/session.ts +704 -156
- package/src/skill-invoker.ts +340 -1293
- package/src/skill-loader.ts +55 -34
- package/src/slash-commands.ts +165 -15
- package/src/smart-approval.ts +34 -3
- package/src/system-prompt-generator.ts +145 -88
- package/src/tools.ts +309 -224
- package/src/types.ts +0 -1
- package/scripts/init-skills-path.js +0 -58
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
package/README.md
CHANGED
|
@@ -1,280 +1,280 @@
|
|
|
1
|
-
# 🤖 xAgent CLI - Your Autonomous Life AI Assistant
|
|
2
|
-
|
|
3
|
-
<div align="center">
|
|
4
|
-
|
|
5
|
-

|
|
6
|
-

|
|
7
|
-

|
|
8
|
-

|
|
9
|
-

|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div align="center">
|
|
14
|
-
|
|
15
|
-

|
|
16
|
-
|
|
17
|
-
**[English](README.md)** | **[中文](README_CN.md)**
|
|
18
|
-
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
<div align="center">
|
|
24
|
-
|
|
25
|
-
### 🚀 The Future of AI Assistants is Here
|
|
26
|
-
|
|
27
|
-
**xAgent CLI** is not just another AI coding assistant — it's an **intelligent agent for personal PCs and autonomous living** that transforms how you interact with your digital life.
|
|
28
|
-
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
|
-
## ✨ Why xAgent CLI?
|
|
34
|
-
|
|
35
|
-
| 🎯 | Universal AI Companion |
|
|
36
|
-
|------|------------------------|
|
|
37
|
-
| 🏠 | **Life Automation** - From file organization to smart scheduling |
|
|
38
|
-
| 💻 | **Professional Development** - Code, debug, and deploy with AI |
|
|
39
|
-
| 🌐 | **Multi-Model Support** - Free access to Kimi K2, Qwen3 Coder, DeepSeek v3 |
|
|
40
|
-
| 🔧 | **GUI Automation** - Precise mouse/keyboard control for any task |
|
|
41
|
-
| 🔒 | **Flexible Security** - 5 execution modes from YOLO to DEFAULT |
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## ⚡ Quick Start
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
# Install
|
|
49
|
-
npm i -g xagent-cli
|
|
50
|
-
|
|
51
|
-
# Launch
|
|
52
|
-
xagent
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
**That's it!** Start automating your digital life in seconds.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 📊 Feature Comparison
|
|
60
|
-
|
|
61
|
-
| Feature | xAgent CLI | Claude Code | Gemini CLI |
|
|
62
|
-
|:--------|:----------:|:-----------:|:----------:|
|
|
63
|
-
| **Life Automation** | ✅ | ❌ | ❌ |
|
|
64
|
-
| **PC Smart Management** | ✅ | ❌ | ❌ |
|
|
65
|
-
| Todo Planning | ✅ | ✅ | ❌ |
|
|
66
|
-
| SubAgent System | ✅ | ✅ | ❌ |
|
|
67
|
-
| Plan Mode | ✅ | ✅ | ❌ |
|
|
68
|
-
| Task Tools | ✅ | ✅ | ❌ |
|
|
69
|
-
| Conversation Recovery | ✅ | ✅ | ❌ |
|
|
70
|
-
| Context Auto-compression | ✅ | ✅ | ✅ |
|
|
71
|
-
| Web Search | ✅ | ❌ | ⚠️ |
|
|
72
|
-
| Thinking Mode | ✅ | ✅ | ❌ |
|
|
73
|
-
| Workflow System | ✅ | ❌ | ❌ |
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## 🎯 What Can xAgent Do?
|
|
78
|
-
|
|
79
|
-
### 🏠 Life Assistant
|
|
80
|
-
```text
|
|
81
|
-
> Organize my desktop, categorize files by type
|
|
82
|
-
> Set up daily backup to cloud storage
|
|
83
|
-
> Remind me of meetings at 3 PM
|
|
84
|
-
> Find largest files eating disk space
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
### 💼 Productivity Booster
|
|
88
|
-
```text
|
|
89
|
-
> Batch rename files with date format
|
|
90
|
-
> Download all PDFs from a webpage
|
|
91
|
-
> Analyze Excel data, generate charts
|
|
92
|
-
> Translate documents preserving format
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### 👨💻 Developer Companion
|
|
96
|
-
```text
|
|
97
|
-
> Analyze project architecture
|
|
98
|
-
> Find and fix bug root causes
|
|
99
|
-
> Create RESTful APIs with auth
|
|
100
|
-
> Code review PRs automatically
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### 🔄 Automation Expert
|
|
104
|
-
```text
|
|
105
|
-
> Download stock prices, send email alerts
|
|
106
|
-
> Auto-update project dependencies
|
|
107
|
-
> Monitor websites, alert on downtime
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## 🛠️ Execution Modes
|
|
113
|
-
|
|
114
|
-
| Mode | Permissions | Best For |
|
|
115
|
-
|------|-------------|----------|
|
|
116
|
-
| 🟢 **YOLO** | Full control | Complete AI autonomy |
|
|
117
|
-
| 🟡 **ACCEPT_EDITS** | File only | Safe coding |
|
|
118
|
-
| 🔵 **PLAN** | Plan → Execute | Complex tasks |
|
|
119
|
-
| ⚪ **DEFAULT** | Approval required | Security-first |
|
|
120
|
-
| 🟣 **SMART** | Intelligent | Daily use (recommended) |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## 🔑 Free to Use
|
|
125
|
-
|
|
126
|
-
xAgent offers **completely free** access with multiple authentication options:
|
|
127
|
-
|
|
128
|
-
| Method | Description |
|
|
129
|
-
|--------|-------------|
|
|
130
|
-
| 🔐 **xAgent Account** | Browser-based login (recommended) |
|
|
131
|
-
| 🔑 **API Key** | Server environments |
|
|
132
|
-
| 🌐 **Third-Party APIs** | GLM-4, DeepSeek, Qwen, Kimi, and more |
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## 🏗️ Technology Stack
|
|
137
|
-
|
|
138
|
-
<div align="center">
|
|
139
|
-
|
|
140
|
-

|
|
141
|
-

|
|
142
|
-

|
|
143
|
-

|
|
144
|
-

|
|
145
|
-
|
|
146
|
-
</div>
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
## 📦 Project Structure
|
|
151
|
-
|
|
152
|
-
```
|
|
153
|
-
xagent-cli/
|
|
154
|
-
├── src/
|
|
155
|
-
│ ├── tools/ # 12+ built-in tools
|
|
156
|
-
│ ├── agents/ # SubAgent system
|
|
157
|
-
│ ├── gui-subagent/ # GUI automation
|
|
158
|
-
│ ├── workflow/ # Workflow engine
|
|
159
|
-
│ ├── checkpoint/ # State persistence
|
|
160
|
-
│ └── mcp/ # MCP integration
|
|
161
|
-
├── dist/ # Compiled output
|
|
162
|
-
├── docs/ # Documentation
|
|
163
|
-
├── test/ # Test suite
|
|
164
|
-
└── package.json
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## 🧪 Testing & Quality
|
|
170
|
-
|
|
171
|
-
```bash
|
|
172
|
-
npm test # Unit tests
|
|
173
|
-
npm run lint # ESLint
|
|
174
|
-
npm run format # Prettier
|
|
175
|
-
npm run typecheck # TypeScript
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## ⚙️ Configuration
|
|
181
|
-
|
|
182
|
-
Customize xAgent by editing `~/.xagent/settings.json`:
|
|
183
|
-
|
|
184
|
-
```json
|
|
185
|
-
{
|
|
186
|
-
"theme": "Default",
|
|
187
|
-
"selectedAuthType": "openai_compatible",
|
|
188
|
-
"apiKey": "your-api-key",
|
|
189
|
-
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
190
|
-
"modelName": "glm-4.7",
|
|
191
|
-
"guiSubagentModel": "doubao-1-5-ui-tars-250428",
|
|
192
|
-
"guiSubagentBaseUrl": "https://ark.cn-beijing.volces.com/api/v3",
|
|
193
|
-
"guiSubagentApiKey": "your-api-key",
|
|
194
|
-
"searchApiKey": "",
|
|
195
|
-
"executionMode": "smart",
|
|
196
|
-
"approvalMode": "smart",
|
|
197
|
-
"checkpointing": {
|
|
198
|
-
"enabled": false,
|
|
199
|
-
"autoCreate": true,
|
|
200
|
-
"maxCheckpoints": 10
|
|
201
|
-
},
|
|
202
|
-
"thinking": {
|
|
203
|
-
"enabled": true,
|
|
204
|
-
"mode": "normal",
|
|
205
|
-
"displayMode": "compact"
|
|
206
|
-
},
|
|
207
|
-
"contextCompression": {
|
|
208
|
-
"enabled": true,
|
|
209
|
-
"maxMessages": 30,
|
|
210
|
-
"maxContextSize": 1500000,
|
|
211
|
-
"preserveRecentMessages": 0,
|
|
212
|
-
"enableSummary": true
|
|
213
|
-
},
|
|
214
|
-
"contextFileName": "XAGENT.md",
|
|
215
|
-
"mcpServers": {},
|
|
216
|
-
"language": "en",
|
|
217
|
-
"autoUpdate": true,
|
|
218
|
-
"telemetryEnabled": true,
|
|
219
|
-
"showToolDetails": false,
|
|
220
|
-
"showAIDebugInfo": false,
|
|
221
|
-
"loggerLevel": "info",
|
|
222
|
-
"contextCompress": {
|
|
223
|
-
"enabled": false,
|
|
224
|
-
"autoTrigger": false,
|
|
225
|
-
"messageThreshold": 50,
|
|
226
|
-
"tokenThreshold": 100000,
|
|
227
|
-
"strategy": "summary",
|
|
228
|
-
"preserveRecent": 5
|
|
229
|
-
},
|
|
230
|
-
"type": "openai_compatible"
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
---
|
|
235
|
-
|
|
236
|
-
## 📚 Documentation
|
|
237
|
-
|
|
238
|
-
- 📖 [Architecture](docs/architecture/overview.md)
|
|
239
|
-
- 🔧 [Tool System](docs/architecture/tool-system-design.md)
|
|
240
|
-
- 🔌 [SKILL, Worflow and MCP Integration](docs/architecture/mcp-integration-guide.md)
|
|
241
|
-
- 💻 [CLI Commands](docs/cli/commands.md)
|
|
242
|
-
- 🤝 [Contributing](CONTRIBUTING.md)
|
|
243
|
-
- 🔑 [Third-Party Models](docs/third-party-models.md)
|
|
244
|
-
|
|
245
|
-
---
|
|
246
|
-
|
|
247
|
-
## 🤝 Contributing
|
|
248
|
-
|
|
249
|
-
We welcome contributions! Here's how to get started:
|
|
250
|
-
|
|
251
|
-
1. 🍴 Fork the repository
|
|
252
|
-
2. 🌿 Create a feature branch
|
|
253
|
-
3. ✅ Ensure tests pass
|
|
254
|
-
4. 📝 Submit a PR
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## 📄 License
|
|
259
|
-
|
|
260
|
-
MIT License - See [LICENSE](./LICENSE)
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## 🙏 Acknowledgments
|
|
265
|
-
|
|
266
|
-
<div align="center">
|
|
267
|
-
|
|
268
|
-
Built with ❤️ using [Ink](https://github.com/vadimdemedes/ink) • Powered by [xAgent Platform](https://platform.xagent.cn/)
|
|
269
|
-
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
---
|
|
273
|
-
|
|
274
|
-
<div align="center">
|
|
275
|
-
|
|
276
|
-
### 🌟 Star us on GitHub!
|
|
277
|
-
|
|
278
|
-
**Empowering Your Digital Life with AI**
|
|
279
|
-
|
|
280
|
-
</div>
|
|
1
|
+
# 🤖 xAgent CLI - Your Autonomous Life AI Assistant
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div align="center">
|
|
14
|
+
|
|
15
|
+

|
|
16
|
+
|
|
17
|
+
**[Official Website](http://154.8.140.52)** | **[English](README.md)** | **[中文](README_CN.md)**
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<div align="center">
|
|
24
|
+
|
|
25
|
+
### 🚀 The Future of AI Assistants is Here
|
|
26
|
+
|
|
27
|
+
**xAgent CLI** is not just another AI coding assistant — it's an **intelligent agent for personal PCs and autonomous living** that transforms how you interact with your digital life.
|
|
28
|
+
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## ✨ Why xAgent CLI?
|
|
34
|
+
|
|
35
|
+
| 🎯 | Universal AI Companion |
|
|
36
|
+
|------|------------------------|
|
|
37
|
+
| 🏠 | **Life Automation** - From file organization to smart scheduling |
|
|
38
|
+
| 💻 | **Professional Development** - Code, debug, and deploy with AI |
|
|
39
|
+
| 🌐 | **Multi-Model Support** - Free access to Kimi K2, Qwen3 Coder, DeepSeek v3 |
|
|
40
|
+
| 🔧 | **GUI Automation** - Precise mouse/keyboard control for any task |
|
|
41
|
+
| 🔒 | **Flexible Security** - 5 execution modes from YOLO to DEFAULT |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## ⚡ Quick Start
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
# Install
|
|
49
|
+
npm i -g @xagent-ai/cli
|
|
50
|
+
|
|
51
|
+
# Launch
|
|
52
|
+
xagent start
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**That's it!** Start automating your digital life in seconds.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## 📊 Feature Comparison
|
|
60
|
+
|
|
61
|
+
| Feature | xAgent CLI | Claude Code | Gemini CLI |
|
|
62
|
+
|:--------|:----------:|:-----------:|:----------:|
|
|
63
|
+
| **Life Automation** | ✅ | ❌ | ❌ |
|
|
64
|
+
| **PC Smart Management** | ✅ | ❌ | ❌ |
|
|
65
|
+
| Todo Planning | ✅ | ✅ | ❌ |
|
|
66
|
+
| SubAgent System | ✅ | ✅ | ❌ |
|
|
67
|
+
| Plan Mode | ✅ | ✅ | ❌ |
|
|
68
|
+
| Task Tools | ✅ | ✅ | ❌ |
|
|
69
|
+
| Conversation Recovery | ✅ | ✅ | ❌ |
|
|
70
|
+
| Context Auto-compression | ✅ | ✅ | ✅ |
|
|
71
|
+
| Web Search | ✅ | ❌ | ⚠️ |
|
|
72
|
+
| Thinking Mode | ✅ | ✅ | ❌ |
|
|
73
|
+
| Workflow System | ✅ | ❌ | ❌ |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🎯 What Can xAgent Do?
|
|
78
|
+
|
|
79
|
+
### 🏠 Life Assistant
|
|
80
|
+
```text
|
|
81
|
+
> Organize my desktop, categorize files by type
|
|
82
|
+
> Set up daily backup to cloud storage
|
|
83
|
+
> Remind me of meetings at 3 PM
|
|
84
|
+
> Find largest files eating disk space
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 💼 Productivity Booster
|
|
88
|
+
```text
|
|
89
|
+
> Batch rename files with date format
|
|
90
|
+
> Download all PDFs from a webpage
|
|
91
|
+
> Analyze Excel data, generate charts
|
|
92
|
+
> Translate documents preserving format
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 👨💻 Developer Companion
|
|
96
|
+
```text
|
|
97
|
+
> Analyze project architecture
|
|
98
|
+
> Find and fix bug root causes
|
|
99
|
+
> Create RESTful APIs with auth
|
|
100
|
+
> Code review PRs automatically
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 🔄 Automation Expert
|
|
104
|
+
```text
|
|
105
|
+
> Download stock prices, send email alerts
|
|
106
|
+
> Auto-update project dependencies
|
|
107
|
+
> Monitor websites, alert on downtime
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 🛠️ Execution Modes
|
|
113
|
+
|
|
114
|
+
| Mode | Permissions | Best For |
|
|
115
|
+
|------|-------------|----------|
|
|
116
|
+
| 🟢 **YOLO** | Full control | Complete AI autonomy |
|
|
117
|
+
| 🟡 **ACCEPT_EDITS** | File only | Safe coding |
|
|
118
|
+
| 🔵 **PLAN** | Plan → Execute | Complex tasks |
|
|
119
|
+
| ⚪ **DEFAULT** | Approval required | Security-first |
|
|
120
|
+
| 🟣 **SMART** | Intelligent | Daily use (recommended) |
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 🔑 Free to Use
|
|
125
|
+
|
|
126
|
+
xAgent offers **completely free** access with multiple authentication options:
|
|
127
|
+
|
|
128
|
+
| Method | Description |
|
|
129
|
+
|--------|-------------|
|
|
130
|
+
| 🔐 **xAgent Account** | Browser-based login (recommended) |
|
|
131
|
+
| 🔑 **API Key** | Server environments |
|
|
132
|
+
| 🌐 **Third-Party APIs** | GLM-4, DeepSeek, Qwen, Kimi, and more |
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 🏗️ Technology Stack
|
|
137
|
+
|
|
138
|
+
<div align="center">
|
|
139
|
+
|
|
140
|
+

|
|
141
|
+

|
|
142
|
+

|
|
143
|
+

|
|
144
|
+

|
|
145
|
+
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 📦 Project Structure
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
xagent-cli/
|
|
154
|
+
├── src/
|
|
155
|
+
│ ├── tools/ # 12+ built-in tools
|
|
156
|
+
│ ├── agents/ # SubAgent system
|
|
157
|
+
│ ├── gui-subagent/ # GUI automation
|
|
158
|
+
│ ├── workflow/ # Workflow engine
|
|
159
|
+
│ ├── checkpoint/ # State persistence
|
|
160
|
+
│ └── mcp/ # MCP integration
|
|
161
|
+
├── dist/ # Compiled output
|
|
162
|
+
├── docs/ # Documentation
|
|
163
|
+
├── test/ # Test suite
|
|
164
|
+
└── package.json
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🧪 Testing & Quality
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
npm test # Unit tests
|
|
173
|
+
npm run lint # ESLint
|
|
174
|
+
npm run format # Prettier
|
|
175
|
+
npm run typecheck # TypeScript
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## ⚙️ Configuration
|
|
181
|
+
|
|
182
|
+
Customize xAgent by editing `~/.xagent/settings.json`:
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"theme": "Default",
|
|
187
|
+
"selectedAuthType": "openai_compatible",
|
|
188
|
+
"apiKey": "your-api-key",
|
|
189
|
+
"baseUrl": "https://open.bigmodel.cn/api/coding/paas/v4",
|
|
190
|
+
"modelName": "glm-4.7",
|
|
191
|
+
"guiSubagentModel": "doubao-1-5-ui-tars-250428",
|
|
192
|
+
"guiSubagentBaseUrl": "https://ark.cn-beijing.volces.com/api/v3",
|
|
193
|
+
"guiSubagentApiKey": "your-api-key",
|
|
194
|
+
"searchApiKey": "",
|
|
195
|
+
"executionMode": "smart",
|
|
196
|
+
"approvalMode": "smart",
|
|
197
|
+
"checkpointing": {
|
|
198
|
+
"enabled": false,
|
|
199
|
+
"autoCreate": true,
|
|
200
|
+
"maxCheckpoints": 10
|
|
201
|
+
},
|
|
202
|
+
"thinking": {
|
|
203
|
+
"enabled": true,
|
|
204
|
+
"mode": "normal",
|
|
205
|
+
"displayMode": "compact"
|
|
206
|
+
},
|
|
207
|
+
"contextCompression": {
|
|
208
|
+
"enabled": true,
|
|
209
|
+
"maxMessages": 30,
|
|
210
|
+
"maxContextSize": 1500000,
|
|
211
|
+
"preserveRecentMessages": 0,
|
|
212
|
+
"enableSummary": true
|
|
213
|
+
},
|
|
214
|
+
"contextFileName": "XAGENT.md",
|
|
215
|
+
"mcpServers": {},
|
|
216
|
+
"language": "en",
|
|
217
|
+
"autoUpdate": true,
|
|
218
|
+
"telemetryEnabled": true,
|
|
219
|
+
"showToolDetails": false,
|
|
220
|
+
"showAIDebugInfo": false,
|
|
221
|
+
"loggerLevel": "info",
|
|
222
|
+
"contextCompress": {
|
|
223
|
+
"enabled": false,
|
|
224
|
+
"autoTrigger": false,
|
|
225
|
+
"messageThreshold": 50,
|
|
226
|
+
"tokenThreshold": 100000,
|
|
227
|
+
"strategy": "summary",
|
|
228
|
+
"preserveRecent": 5
|
|
229
|
+
},
|
|
230
|
+
"type": "openai_compatible"
|
|
231
|
+
}
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## 📚 Documentation
|
|
237
|
+
|
|
238
|
+
- 📖 [Architecture](docs/architecture/overview.md)
|
|
239
|
+
- 🔧 [Tool System](docs/architecture/tool-system-design.md)
|
|
240
|
+
- 🔌 [SKILL, Worflow and MCP Integration](docs/architecture/mcp-integration-guide.md)
|
|
241
|
+
- 💻 [CLI Commands](docs/cli/commands.md)
|
|
242
|
+
- 🤝 [Contributing](CONTRIBUTING.md)
|
|
243
|
+
- 🔑 [Third-Party Models](docs/third-party-models.md)
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
## 🤝 Contributing
|
|
248
|
+
|
|
249
|
+
We welcome contributions! Here's how to get started:
|
|
250
|
+
|
|
251
|
+
1. 🍴 Fork the repository
|
|
252
|
+
2. 🌿 Create a feature branch
|
|
253
|
+
3. ✅ Ensure tests pass
|
|
254
|
+
4. 📝 Submit a PR
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 📄 License
|
|
259
|
+
|
|
260
|
+
MIT License - See [LICENSE](./LICENSE)
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
## 🙏 Acknowledgments
|
|
265
|
+
|
|
266
|
+
<div align="center">
|
|
267
|
+
|
|
268
|
+
Built with ❤️ using [Ink](https://github.com/vadimdemedes/ink) • Powered by [xAgent Platform](https://platform.xagent.cn/)
|
|
269
|
+
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
<div align="center">
|
|
275
|
+
|
|
276
|
+
### 🌟 Star us on GitHub!
|
|
277
|
+
|
|
278
|
+
**Empowering Your Digital Life with AI**
|
|
279
|
+
|
|
280
|
+
</div>
|
package/README_CN.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|

|
|
16
16
|
|
|
17
|
-
**[English](README.md)** | **[中文](README_CN.md)**
|
|
17
|
+
**[官网](http://154.8.140.52)** | **[English](README.md)** | **[中文](README_CN.md)**
|
|
18
18
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
48
|
# 安装
|
|
49
|
-
npm i -g xagent-cli
|
|
49
|
+
npm i -g @xagent-ai/cli
|
|
50
50
|
|
|
51
51
|
# 启动
|
|
52
|
-
xagent
|
|
52
|
+
xagent start
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
**就这么简单!** 几秒钟内开始自动化你的数字生活。
|
package/dist/ai-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ai-client.d.ts","sourceRoot":"","sources":["../src/ai-client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ai-client.d.ts","sourceRoot":"","sources":["../src/ai-client.ts"],"names":[],"mappings":"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"}
|