jinzd-ai-cli 0.4.42 → 0.4.44
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 +388 -388
- package/README.zh-CN.md +401 -401
- package/dist/{chunk-LU7HXPO6.js → chunk-5GC3IVW3.js} +19 -14
- package/dist/{chunk-ZE36SAKZ.js → chunk-ENOAIZ4K.js} +4 -2
- package/dist/{chunk-WTYDYRPD.js → chunk-L7R2LZMI.js} +4 -2
- package/dist/{chunk-SJVTPIZR.js → chunk-Q6SAWWSW.js} +1 -1
- package/dist/{hub-GVQRTUUZ.js → hub-XLTDDEB6.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/{run-tests-ARFAMDVH.js → run-tests-BTF54JC2.js} +1 -1
- package/dist/{run-tests-6SHMCMGJ.js → run-tests-I2EPN57R.js} +1 -1
- package/dist/{server-5Z5TLTUF.js → server-QWABC7FF.js} +4 -4
- package/dist/{task-orchestrator-O5242DVR.js → task-orchestrator-ZO37ZGR2.js} +2 -2
- package/package.json +164 -164
package/README.md
CHANGED
|
@@ -1,388 +1,388 @@
|
|
|
1
|
-
**English** | [中文](README.zh-CN.md)
|
|
2
|
-
|
|
3
|
-
# ai-cli
|
|
4
|
-
|
|
5
|
-
> A cross-platform AI coding assistant — CLI, Web UI, and Desktop App — with multi-provider support and agentic tool calling
|
|
6
|
-
|
|
7
|
-
[](https://www.npmjs.com/package/jinzd-ai-cli)
|
|
8
|
-
[](LICENSE)
|
|
9
|
-
[](https://nodejs.org)
|
|
10
|
-
[]()
|
|
11
|
-
[](https://github.com/jinzhengdong/ai-cli/releases)
|
|
12
|
-
[](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml)
|
|
13
|
-
|
|
14
|
-
**ai-cli** is a powerful AI assistant that connects to 8 providers (including local Ollama models) and executes tasks autonomously through agentic tool calling. Use it as a terminal REPL, a browser-based Web UI, or a standalone Electron desktop app.
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
<img src="https://img.shields.io/badge/CLI-Terminal-blue" alt="CLI" />
|
|
18
|
-
<img src="https://img.shields.io/badge/Web_UI-Browser-green" alt="Web UI" />
|
|
19
|
-
<img src="https://img.shields.io/badge/Desktop-Electron-purple" alt="Desktop" />
|
|
20
|
-
</p>
|
|
21
|
-
|
|
22
|
-
## Highlights
|
|
23
|
-
|
|
24
|
-
- **8 Built-in Providers** — Claude, Gemini, DeepSeek, OpenAI, Zhipu GLM, Kimi, OpenRouter (300+ models), **Ollama** (local models, no API key needed)
|
|
25
|
-
- **3 Interfaces** — Terminal CLI, browser Web UI (`aicli web`), Electron desktop app
|
|
26
|
-
- **Agentic Tool Calling** — AI autonomously runs shell commands, reads/writes files, searches code, fetches web, runs tests (up to 25 rounds)
|
|
27
|
-
- **Streaming Tool Use** — Real-time streaming of AI reasoning and tool calls as they happen
|
|
28
|
-
- **Sub-Agents** — Delegate complex subtasks to isolated child agents with independent tool loops
|
|
29
|
-
- **Extended Thinking** — Claude deep reasoning mode with `/think` toggle
|
|
30
|
-
- **Plan Mode** — Read-only planning phase (`/plan`) where AI analyzes before executing, with loop detection
|
|
31
|
-
- **Auto-Pause** — Automatically pauses every 10 rounds for user review and redirection
|
|
32
|
-
- **MCP Protocol** — Connect external MCP servers for dynamic tool discovery
|
|
33
|
-
- **Multi-User Auth** — Web UI supports multiple users with password authentication
|
|
34
|
-
- **PWA Support** — Install Web UI as a desktop/mobile app, accessible over LAN
|
|
35
|
-
- **Hierarchical Context** — 3-layer context files (global / project / subdirectory) auto-injected
|
|
36
|
-
- **Headless Mode** — `ai-cli -p "prompt"` for CI/CD pipelines and scripting
|
|
37
|
-
- **40 REPL Commands** — Session management, checkpointing, code review, security review, rewind, scaffolding, and more
|
|
38
|
-
- **GitHub Actions CI/CD** — Automated testing on Node 20/22 + npm publish on release tags
|
|
39
|
-
- **Cross-Platform** — Windows, macOS, Linux
|
|
40
|
-
|
|
41
|
-
## Installation
|
|
42
|
-
|
|
43
|
-
### npm (recommended)
|
|
44
|
-
|
|
45
|
-
```bash
|
|
46
|
-
npm install -g jinzd-ai-cli
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Requires Node.js >= 20. After installation, use `aicli` to start.
|
|
50
|
-
|
|
51
|
-
### Electron Desktop App (Windows)
|
|
52
|
-
|
|
53
|
-
Download the installer from [GitHub Releases](https://github.com/jinzhengdong/ai-cli/releases) — no Node.js required:
|
|
54
|
-
|
|
55
|
-
| Platform | Download |
|
|
56
|
-
|----------|----------|
|
|
57
|
-
| Windows x64 | [`ai-cli-setup.exe`](https://github.com/jinzhengdong/ai-cli/releases/latest) |
|
|
58
|
-
|
|
59
|
-
### Standalone CLI Executables
|
|
60
|
-
|
|
61
|
-
Pre-built CLI binaries (no Node.js required, ~56 MB):
|
|
62
|
-
|
|
63
|
-
| Platform | File |
|
|
64
|
-
|----------|------|
|
|
65
|
-
| Windows x64 | `ai-cli-win.exe` |
|
|
66
|
-
| macOS arm64 | `ai-cli-mac` |
|
|
67
|
-
| macOS x64 | `ai-cli-mac-x64` |
|
|
68
|
-
| Linux x64 | `ai-cli-linux` |
|
|
69
|
-
|
|
70
|
-
## Quick Start
|
|
71
|
-
|
|
72
|
-
### Terminal CLI
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
aicli
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
On first run, an interactive setup wizard guides you through setting up your profile and entering your API key. Your identity is persisted and injected into every AI conversation.
|
|
79
|
-
|
|
80
|
-
```
|
|
81
|
-
[deepseek] > Hello! Tell me about this project
|
|
82
|
-
[deepseek] > @src/main.ts Review this file for bugs
|
|
83
|
-
[deepseek] > @screenshot.png What's in this image?
|
|
84
|
-
[deepseek] > /help
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
Use `@filepath` to reference files or images directly in your prompt.
|
|
88
|
-
|
|
89
|
-
### Web UI
|
|
90
|
-
|
|
91
|
-
```bash
|
|
92
|
-
aicli web # Start on localhost:3456
|
|
93
|
-
aicli web --port 8080 # Custom port
|
|
94
|
-
aicli web --host 0.0.0.0 # LAN access (shows QR-friendly URL)
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
Features: multi-tab sessions, file tree panel, drag & drop images, prompt templates, 8 DaisyUI themes, PWA installable, keyboard shortcuts, diff syntax highlighting.
|
|
98
|
-
|
|
99
|
-
### User Management
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
aicli user create admin # Create user (enables auth)
|
|
103
|
-
aicli user list # List all users
|
|
104
|
-
aicli user reset-password x # Reset password
|
|
105
|
-
aicli user delete x # Delete user
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
## Supported Providers
|
|
109
|
-
|
|
110
|
-
| Provider | Models | Get API Key |
|
|
111
|
-
|----------|--------|-------------|
|
|
112
|
-
| **Claude** | Opus 4, Sonnet 4, Haiku 4 | [console.anthropic.com](https://console.anthropic.com) |
|
|
113
|
-
| **Gemini** | 2.5 Pro, 2.5 Flash | [aistudio.google.com](https://aistudio.google.com) |
|
|
114
|
-
| **DeepSeek** | DeepSeek-Chat (V3), Reasoner (R1) | [platform.deepseek.com](https://platform.deepseek.com) |
|
|
115
|
-
| **OpenAI** | GPT-5.4, GPT-4o, o3, o4-mini | [platform.openai.com](https://platform.openai.com) |
|
|
116
|
-
| **OpenRouter** | 300+ models (Claude, GPT, Gemini, Llama, Qwen, Mistral...) | [openrouter.ai](https://openrouter.ai) |
|
|
117
|
-
| **Zhipu** | GLM-4, GLM-5 | [open.bigmodel.cn](https://open.bigmodel.cn) |
|
|
118
|
-
| **Kimi** | Moonshot, Kimi-K2 | [platform.moonshot.cn](https://platform.moonshot.cn) |
|
|
119
|
-
| **Ollama** | Any locally installed model (Llama, Qwen, Gemma, Mistral...) | No API key — [ollama.com](https://ollama.com) |
|
|
120
|
-
|
|
121
|
-
Any OpenAI-compatible API can also be used via `customBaseUrls` in config.
|
|
122
|
-
|
|
123
|
-
### Ollama (Local Models)
|
|
124
|
-
|
|
125
|
-
Run AI models entirely on your own hardware — no API key, no usage fees, no data leaving your machine.
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
# Install Ollama from https://ollama.com, then pull a model:
|
|
129
|
-
ollama pull qwen3:4b # recommended: good tool-calling support
|
|
130
|
-
ollama pull gemma3:4b
|
|
131
|
-
ollama pull llama3.1:8b
|
|
132
|
-
|
|
133
|
-
# Start aicli and switch to Ollama:
|
|
134
|
-
aicli
|
|
135
|
-
[deepseek] > /provider ollama # auto-discovers installed models
|
|
136
|
-
[ollama] > /model # select from your local models
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
> **Note**: Use models 4B+ for best results with tool calling. Small models (<4B) may struggle with the tool definitions injected by MCP servers.
|
|
140
|
-
|
|
141
|
-
## Built-in Tools (Agentic)
|
|
142
|
-
|
|
143
|
-
AI autonomously invokes these 19 tools during conversations:
|
|
144
|
-
|
|
145
|
-
| Tool | Safety | Description |
|
|
146
|
-
|------|--------|-------------|
|
|
147
|
-
| `bash` | varies | Execute shell commands (PowerShell on Windows, $SHELL on Unix) |
|
|
148
|
-
| `read_file` | safe | Read file contents (10 MB limit, image support) |
|
|
149
|
-
| `write_file` | write | Create/overwrite files (diff preview + confirmation) |
|
|
150
|
-
| `edit_file` | write | Precise string replacement with fuzzy matching hints + `replaceAll` mode |
|
|
151
|
-
| `list_dir` | safe | List directory contents |
|
|
152
|
-
| `grep_files` | safe | Regex search across files |
|
|
153
|
-
| `glob_files` | safe | Match files by glob pattern |
|
|
154
|
-
| `web_fetch` | safe | Fetch web pages as Markdown (SSRF-protected) |
|
|
155
|
-
| `google_search` | safe | Google Custom Search API |
|
|
156
|
-
| `run_interactive` | safe | Run interactive programs with stdin input |
|
|
157
|
-
| `run_tests` | safe | Auto-detect and run project tests (JUnit XML parsing) |
|
|
158
|
-
| `spawn_agent` | safe | Delegate subtasks to isolated child agents |
|
|
159
|
-
| `ask_user` | safe | Pause and ask the user a question |
|
|
160
|
-
| `save_memory` | safe | Persist important info across sessions |
|
|
161
|
-
| `write_todos` | safe | Task breakdown with live progress rendering |
|
|
162
|
-
| `save_last_response` | write | Save AI response to file |
|
|
163
|
-
| `task_create` | write | Start a command running in the background |
|
|
164
|
-
| `task_list` | safe | List background tasks and their status/output |
|
|
165
|
-
| `task_stop` | write | Stop a running background task |
|
|
166
|
-
|
|
167
|
-
**Safety levels**: `safe` = auto-execute, `write` = diff preview + confirmation, `destructive` = prominent warning + confirmation.
|
|
168
|
-
|
|
169
|
-
## Key REPL Commands
|
|
170
|
-
|
|
171
|
-
| Command | Description |
|
|
172
|
-
|---------|-------------|
|
|
173
|
-
| `/provider` | Switch AI provider |
|
|
174
|
-
| `/model` | Switch model |
|
|
175
|
-
| `/plan` | Enter read-only planning mode |
|
|
176
|
-
| `/think` | Toggle Claude extended thinking |
|
|
177
|
-
| `/test` | Auto-detect and run project tests |
|
|
178
|
-
| `/review` | AI code review of current git diff |
|
|
179
|
-
| `/security-review` | Security vulnerability scan on git diff |
|
|
180
|
-
| `/rewind` | Rewind conversation + restore files to checkpoint state |
|
|
181
|
-
| `/scaffold <desc>` | AI generates project skeleton |
|
|
182
|
-
| `/init` | AI generates project context file (AICLI.md) |
|
|
183
|
-
| `/compact` | Compress conversation history |
|
|
184
|
-
| `/session` | Session management (new / list / load) |
|
|
185
|
-
| `/checkpoint` | Save/restore conversation checkpoints |
|
|
186
|
-
| `/fork` | Branch conversation from current point |
|
|
187
|
-
| `/search <keyword>` | Full-text search across all sessions |
|
|
188
|
-
| `/skill` | Manage agent skill packs |
|
|
189
|
-
| `/mcp` | View MCP server status and tools |
|
|
190
|
-
| `/cost` | Show token usage statistics |
|
|
191
|
-
| `/undo` | Undo last file operation |
|
|
192
|
-
| `/doctor` | Health check (API keys, MCP, context) |
|
|
193
|
-
| `/export` | Export session as Markdown or JSON |
|
|
194
|
-
| `/profile` | View/edit your identity (AI knows who you are across all providers) |
|
|
195
|
-
| `/config` | Open configuration wizard |
|
|
196
|
-
| `/help` | Show all available commands |
|
|
197
|
-
|
|
198
|
-
**Multi-line input**: Use `\` at end of line for continuation, or paste multi-line content directly (auto-detected and merged).
|
|
199
|
-
|
|
200
|
-
Type `/help` in the REPL to see all 40 commands.
|
|
201
|
-
|
|
202
|
-
## CLI Parameters
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
aicli [options]
|
|
206
|
-
|
|
207
|
-
Options:
|
|
208
|
-
--provider <name> Set AI provider
|
|
209
|
-
-m, --model <name> Set model
|
|
210
|
-
-p, --prompt <text> Headless mode: single prompt, then exit
|
|
211
|
-
--system <prompt> Override system prompt (headless)
|
|
212
|
-
--json Output JSON response (headless)
|
|
213
|
-
--output-format <fmt> text | streaming-json (NDJSON)
|
|
214
|
-
--resume <id> Resume a previous session
|
|
215
|
-
--allowed-tools <list> Comma-separated tool whitelist
|
|
216
|
-
--blocked-tools <list> Comma-separated tool blacklist
|
|
217
|
-
--no-stream Disable streaming output
|
|
218
|
-
|
|
219
|
-
Subcommands:
|
|
220
|
-
aicli web [options] Start Web UI server
|
|
221
|
-
aicli config Run configuration wizard
|
|
222
|
-
aicli providers List all providers and status
|
|
223
|
-
aicli sessions List recent sessions
|
|
224
|
-
aicli user <action> Manage Web UI users
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### Headless Mode
|
|
228
|
-
|
|
229
|
-
```bash
|
|
230
|
-
# Single prompt
|
|
231
|
-
aicli -p "Explain recursion in one sentence"
|
|
232
|
-
|
|
233
|
-
# Pipe stdin
|
|
234
|
-
cat src/main.ts | aicli -p "Review this code"
|
|
235
|
-
|
|
236
|
-
# JSON output for scripting
|
|
237
|
-
aicli -p "hello" --json
|
|
238
|
-
|
|
239
|
-
# Streaming JSON (NDJSON)
|
|
240
|
-
aicli -p "write a poem" --output-format streaming-json
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
## Configuration
|
|
244
|
-
|
|
245
|
-
Configuration is stored at `~/.aicli/config.json`. Run `aicli config` for the interactive wizard, or edit directly:
|
|
246
|
-
|
|
247
|
-
```json
|
|
248
|
-
{
|
|
249
|
-
"defaultProvider": "deepseek",
|
|
250
|
-
"apiKeys": {
|
|
251
|
-
"deepseek": "sk-...",
|
|
252
|
-
"claude": "sk-ant-...",
|
|
253
|
-
"openrouter": "sk-or-..."
|
|
254
|
-
},
|
|
255
|
-
"proxy": "http://127.0.0.1:10809",
|
|
256
|
-
"mcpServers": { },
|
|
257
|
-
"ui": {
|
|
258
|
-
"theme": "dark",
|
|
259
|
-
"wordWrap": 0,
|
|
260
|
-
"notificationThreshold": 10000
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Permission Rules
|
|
266
|
-
|
|
267
|
-
Control when tools require confirmation. Rules are checked in order — first match wins:
|
|
268
|
-
|
|
269
|
-
```json
|
|
270
|
-
{
|
|
271
|
-
"permissionRules": [
|
|
272
|
-
{ "tool": "read_file", "action": "auto-approve" },
|
|
273
|
-
{ "tool": "list_dir", "action": "auto-approve" },
|
|
274
|
-
{ "tool": "grep_files", "action": "auto-approve" },
|
|
275
|
-
{ "tool": "glob_files", "action": "auto-approve" },
|
|
276
|
-
{ "tool": "write_todos", "action": "auto-approve" },
|
|
277
|
-
{ "tool": "bash", "action": "auto-approve", "when": { "dangerLevel": "safe" } },
|
|
278
|
-
{ "tool": "write_file", "action": "auto-approve", "when": { "pathPattern": "src/" } },
|
|
279
|
-
{ "tool": "bash", "action": "deny", "when": { "pathPattern": "rm -rf" } },
|
|
280
|
-
{ "tool": "*", "action": "confirm" }
|
|
281
|
-
]
|
|
282
|
-
}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
| Field | Description |
|
|
286
|
-
|-------|-------------|
|
|
287
|
-
| `tool` | Tool name, or `*` for all tools |
|
|
288
|
-
| `action` | `auto-approve` (skip confirmation), `deny` (block), `confirm` (ask user) |
|
|
289
|
-
| `when.dangerLevel` | Only match when danger level is `safe`, `write`, or `destructive` |
|
|
290
|
-
| `when.pathPattern` | Substring match against tool's `path` or `command` argument |
|
|
291
|
-
|
|
292
|
-
**Recommended minimal config** — auto-approve all read-only tools to reduce y/N prompts:
|
|
293
|
-
|
|
294
|
-
```json
|
|
295
|
-
{
|
|
296
|
-
"permissionRules": [
|
|
297
|
-
{ "tool": "read_file", "action": "auto-approve" },
|
|
298
|
-
{ "tool": "list_dir", "action": "auto-approve" },
|
|
299
|
-
{ "tool": "grep_files", "action": "auto-approve" },
|
|
300
|
-
{ "tool": "glob_files", "action": "auto-approve" },
|
|
301
|
-
{ "tool": "web_fetch", "action": "auto-approve" },
|
|
302
|
-
{ "tool": "write_todos", "action": "auto-approve" },
|
|
303
|
-
{ "tool": "ask_user", "action": "auto-approve" },
|
|
304
|
-
{ "tool": "run_tests", "action": "auto-approve" }
|
|
305
|
-
]
|
|
306
|
-
}
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Environment Variables
|
|
310
|
-
|
|
311
|
-
Environment variables take precedence over config file values:
|
|
312
|
-
|
|
313
|
-
| Variable | Description |
|
|
314
|
-
|----------|-------------|
|
|
315
|
-
| `AICLI_API_KEY_CLAUDE` | Claude API Key |
|
|
316
|
-
| `AICLI_API_KEY_GEMINI` | Gemini API Key |
|
|
317
|
-
| `AICLI_API_KEY_DEEPSEEK` | DeepSeek API Key |
|
|
318
|
-
| `AICLI_API_KEY_OPENAI` | OpenAI API Key |
|
|
319
|
-
| `AICLI_API_KEY_OPENROUTER` | OpenRouter API Key |
|
|
320
|
-
| `AICLI_API_KEY_ZHIPU` | Zhipu API Key |
|
|
321
|
-
| `AICLI_API_KEY_KIMI` | Kimi API Key |
|
|
322
|
-
| `AICLI_PROVIDER` | Default provider ID |
|
|
323
|
-
| `AICLI_NO_STREAM` | Set to `1` to disable streaming |
|
|
324
|
-
| `HTTPS_PROXY` / `HTTP_PROXY` | Proxy URL |
|
|
325
|
-
|
|
326
|
-
### Hierarchical Context Files
|
|
327
|
-
|
|
328
|
-
ai-cli automatically discovers and injects context files into the system prompt:
|
|
329
|
-
|
|
330
|
-
| Layer | Path | Purpose |
|
|
331
|
-
|-------|------|---------|
|
|
332
|
-
| Global | `~/.aicli/AICLI.md` | Personal preferences across all projects |
|
|
333
|
-
| Project | `<git-root>/AICLI.md` | Project rules (commit to git for team sharing) |
|
|
334
|
-
| Subdirectory | `<cwd>/AICLI.md` | Directory-specific instructions |
|
|
335
|
-
|
|
336
|
-
Also supports `CLAUDE.md` as an alternative filename at each layer.
|
|
337
|
-
|
|
338
|
-
### MCP Integration
|
|
339
|
-
|
|
340
|
-
Connect external [MCP](https://modelcontextprotocol.io/) servers for dynamic tool discovery. Configuration is compatible with Claude Desktop format:
|
|
341
|
-
|
|
342
|
-
```json
|
|
343
|
-
{
|
|
344
|
-
"mcpServers": {
|
|
345
|
-
"filesystem": {
|
|
346
|
-
"command": "npx",
|
|
347
|
-
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"],
|
|
348
|
-
"timeout": 30000
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Project-level `.mcp.json` files are also supported and automatically merged with global config.
|
|
355
|
-
|
|
356
|
-
## Web UI Features
|
|
357
|
-
|
|
358
|
-
The Web UI (`aicli web`) provides a full-featured browser interface:
|
|
359
|
-
|
|
360
|
-
- **Multi-Tab Sessions** — parallel conversations in separate browser tabs
|
|
361
|
-
- **File Tree Panel** — browse project files, click to insert `@path` references
|
|
362
|
-
- **Image Upload** — drag & drop or Ctrl+V paste images into chat
|
|
363
|
-
- **Prompt Templates** — CRUD with tags, search, import/export
|
|
364
|
-
- **8 Themes** — DaisyUI themes with code highlight auto-sync
|
|
365
|
-
- **Diff Syntax Highlighting** — colored diff in tool confirm dialogs
|
|
366
|
-
- **Keyboard Shortcuts** — `Esc` stop, `Ctrl+L` clear, `↑↓` history
|
|
367
|
-
- **Export** — `/export md` or `/export json` browser download
|
|
368
|
-
- **PWA** — installable as desktop/mobile app
|
|
369
|
-
- **LAN Access** — `--host 0.0.0.0` for phone/tablet access
|
|
370
|
-
- **Multi-User Auth** — password authentication with per-user data isolation
|
|
371
|
-
- **Auto-Reconnect** — heartbeat + exponential backoff reconnection
|
|
372
|
-
|
|
373
|
-
## Testing
|
|
374
|
-
|
|
375
|
-
```bash
|
|
376
|
-
npm test # Run all 343 tests
|
|
377
|
-
npm run test:watch # Watch mode
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
21 test suites covering: authentication, sessions, tool types & danger levels, permissions, output truncation, diff rendering, edit-file similarity, error hierarchy, config management, env loading, provider registry, web-fetch, grep-files, hub renderer, hub discussion, hub presets, dev-state.
|
|
381
|
-
|
|
382
|
-
## Documentation
|
|
383
|
-
|
|
384
|
-
- [Chinese README](README.zh-CN.md) — 中文说明文档
|
|
385
|
-
|
|
386
|
-
## License
|
|
387
|
-
|
|
388
|
-
[MIT](LICENSE)
|
|
1
|
+
**English** | [中文](README.zh-CN.md)
|
|
2
|
+
|
|
3
|
+
# ai-cli
|
|
4
|
+
|
|
5
|
+
> A cross-platform AI coding assistant — CLI, Web UI, and Desktop App — with multi-provider support and agentic tool calling
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/jinzd-ai-cli)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](https://nodejs.org)
|
|
10
|
+
[]()
|
|
11
|
+
[](https://github.com/jinzhengdong/ai-cli/releases)
|
|
12
|
+
[](https://github.com/jinzhengdong/ai-cli/actions/workflows/ci.yml)
|
|
13
|
+
|
|
14
|
+
**ai-cli** is a powerful AI assistant that connects to 8 providers (including local Ollama models) and executes tasks autonomously through agentic tool calling. Use it as a terminal REPL, a browser-based Web UI, or a standalone Electron desktop app.
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<img src="https://img.shields.io/badge/CLI-Terminal-blue" alt="CLI" />
|
|
18
|
+
<img src="https://img.shields.io/badge/Web_UI-Browser-green" alt="Web UI" />
|
|
19
|
+
<img src="https://img.shields.io/badge/Desktop-Electron-purple" alt="Desktop" />
|
|
20
|
+
</p>
|
|
21
|
+
|
|
22
|
+
## Highlights
|
|
23
|
+
|
|
24
|
+
- **8 Built-in Providers** — Claude, Gemini, DeepSeek, OpenAI, Zhipu GLM, Kimi, OpenRouter (300+ models), **Ollama** (local models, no API key needed)
|
|
25
|
+
- **3 Interfaces** — Terminal CLI, browser Web UI (`aicli web`), Electron desktop app
|
|
26
|
+
- **Agentic Tool Calling** — AI autonomously runs shell commands, reads/writes files, searches code, fetches web, runs tests (up to 25 rounds)
|
|
27
|
+
- **Streaming Tool Use** — Real-time streaming of AI reasoning and tool calls as they happen
|
|
28
|
+
- **Sub-Agents** — Delegate complex subtasks to isolated child agents with independent tool loops
|
|
29
|
+
- **Extended Thinking** — Claude deep reasoning mode with `/think` toggle
|
|
30
|
+
- **Plan Mode** — Read-only planning phase (`/plan`) where AI analyzes before executing, with loop detection
|
|
31
|
+
- **Auto-Pause** — Automatically pauses every 10 rounds for user review and redirection
|
|
32
|
+
- **MCP Protocol** — Connect external MCP servers for dynamic tool discovery
|
|
33
|
+
- **Multi-User Auth** — Web UI supports multiple users with password authentication
|
|
34
|
+
- **PWA Support** — Install Web UI as a desktop/mobile app, accessible over LAN
|
|
35
|
+
- **Hierarchical Context** — 3-layer context files (global / project / subdirectory) auto-injected
|
|
36
|
+
- **Headless Mode** — `ai-cli -p "prompt"` for CI/CD pipelines and scripting
|
|
37
|
+
- **40 REPL Commands** — Session management, checkpointing, code review, security review, rewind, scaffolding, and more
|
|
38
|
+
- **GitHub Actions CI/CD** — Automated testing on Node 20/22 + npm publish on release tags
|
|
39
|
+
- **Cross-Platform** — Windows, macOS, Linux
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
### npm (recommended)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g jinzd-ai-cli
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Requires Node.js >= 20. After installation, use `aicli` to start.
|
|
50
|
+
|
|
51
|
+
### Electron Desktop App (Windows)
|
|
52
|
+
|
|
53
|
+
Download the installer from [GitHub Releases](https://github.com/jinzhengdong/ai-cli/releases) — no Node.js required:
|
|
54
|
+
|
|
55
|
+
| Platform | Download |
|
|
56
|
+
|----------|----------|
|
|
57
|
+
| Windows x64 | [`ai-cli-setup.exe`](https://github.com/jinzhengdong/ai-cli/releases/latest) |
|
|
58
|
+
|
|
59
|
+
### Standalone CLI Executables
|
|
60
|
+
|
|
61
|
+
Pre-built CLI binaries (no Node.js required, ~56 MB):
|
|
62
|
+
|
|
63
|
+
| Platform | File |
|
|
64
|
+
|----------|------|
|
|
65
|
+
| Windows x64 | `ai-cli-win.exe` |
|
|
66
|
+
| macOS arm64 | `ai-cli-mac` |
|
|
67
|
+
| macOS x64 | `ai-cli-mac-x64` |
|
|
68
|
+
| Linux x64 | `ai-cli-linux` |
|
|
69
|
+
|
|
70
|
+
## Quick Start
|
|
71
|
+
|
|
72
|
+
### Terminal CLI
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
aicli
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
On first run, an interactive setup wizard guides you through setting up your profile and entering your API key. Your identity is persisted and injected into every AI conversation.
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
[deepseek] > Hello! Tell me about this project
|
|
82
|
+
[deepseek] > @src/main.ts Review this file for bugs
|
|
83
|
+
[deepseek] > @screenshot.png What's in this image?
|
|
84
|
+
[deepseek] > /help
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Use `@filepath` to reference files or images directly in your prompt.
|
|
88
|
+
|
|
89
|
+
### Web UI
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
aicli web # Start on localhost:3456
|
|
93
|
+
aicli web --port 8080 # Custom port
|
|
94
|
+
aicli web --host 0.0.0.0 # LAN access (shows QR-friendly URL)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Features: multi-tab sessions, file tree panel, drag & drop images, prompt templates, 8 DaisyUI themes, PWA installable, keyboard shortcuts, diff syntax highlighting.
|
|
98
|
+
|
|
99
|
+
### User Management
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
aicli user create admin # Create user (enables auth)
|
|
103
|
+
aicli user list # List all users
|
|
104
|
+
aicli user reset-password x # Reset password
|
|
105
|
+
aicli user delete x # Delete user
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Supported Providers
|
|
109
|
+
|
|
110
|
+
| Provider | Models | Get API Key |
|
|
111
|
+
|----------|--------|-------------|
|
|
112
|
+
| **Claude** | Opus 4, Sonnet 4, Haiku 4 | [console.anthropic.com](https://console.anthropic.com) |
|
|
113
|
+
| **Gemini** | 2.5 Pro, 2.5 Flash | [aistudio.google.com](https://aistudio.google.com) |
|
|
114
|
+
| **DeepSeek** | DeepSeek-Chat (V3), Reasoner (R1) | [platform.deepseek.com](https://platform.deepseek.com) |
|
|
115
|
+
| **OpenAI** | GPT-5.4, GPT-4o, o3, o4-mini | [platform.openai.com](https://platform.openai.com) |
|
|
116
|
+
| **OpenRouter** | 300+ models (Claude, GPT, Gemini, Llama, Qwen, Mistral...) | [openrouter.ai](https://openrouter.ai) |
|
|
117
|
+
| **Zhipu** | GLM-4, GLM-5 | [open.bigmodel.cn](https://open.bigmodel.cn) |
|
|
118
|
+
| **Kimi** | Moonshot, Kimi-K2 | [platform.moonshot.cn](https://platform.moonshot.cn) |
|
|
119
|
+
| **Ollama** | Any locally installed model (Llama, Qwen, Gemma, Mistral...) | No API key — [ollama.com](https://ollama.com) |
|
|
120
|
+
|
|
121
|
+
Any OpenAI-compatible API can also be used via `customBaseUrls` in config.
|
|
122
|
+
|
|
123
|
+
### Ollama (Local Models)
|
|
124
|
+
|
|
125
|
+
Run AI models entirely on your own hardware — no API key, no usage fees, no data leaving your machine.
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
# Install Ollama from https://ollama.com, then pull a model:
|
|
129
|
+
ollama pull qwen3:4b # recommended: good tool-calling support
|
|
130
|
+
ollama pull gemma3:4b
|
|
131
|
+
ollama pull llama3.1:8b
|
|
132
|
+
|
|
133
|
+
# Start aicli and switch to Ollama:
|
|
134
|
+
aicli
|
|
135
|
+
[deepseek] > /provider ollama # auto-discovers installed models
|
|
136
|
+
[ollama] > /model # select from your local models
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
> **Note**: Use models 4B+ for best results with tool calling. Small models (<4B) may struggle with the tool definitions injected by MCP servers.
|
|
140
|
+
|
|
141
|
+
## Built-in Tools (Agentic)
|
|
142
|
+
|
|
143
|
+
AI autonomously invokes these 19 tools during conversations:
|
|
144
|
+
|
|
145
|
+
| Tool | Safety | Description |
|
|
146
|
+
|------|--------|-------------|
|
|
147
|
+
| `bash` | varies | Execute shell commands (PowerShell on Windows, $SHELL on Unix) |
|
|
148
|
+
| `read_file` | safe | Read file contents (10 MB limit, image support) |
|
|
149
|
+
| `write_file` | write | Create/overwrite files (diff preview + confirmation) |
|
|
150
|
+
| `edit_file` | write | Precise string replacement with fuzzy matching hints + `replaceAll` mode |
|
|
151
|
+
| `list_dir` | safe | List directory contents |
|
|
152
|
+
| `grep_files` | safe | Regex search across files |
|
|
153
|
+
| `glob_files` | safe | Match files by glob pattern |
|
|
154
|
+
| `web_fetch` | safe | Fetch web pages as Markdown (SSRF-protected) |
|
|
155
|
+
| `google_search` | safe | Google Custom Search API |
|
|
156
|
+
| `run_interactive` | safe | Run interactive programs with stdin input |
|
|
157
|
+
| `run_tests` | safe | Auto-detect and run project tests (JUnit XML parsing) |
|
|
158
|
+
| `spawn_agent` | safe | Delegate subtasks to isolated child agents |
|
|
159
|
+
| `ask_user` | safe | Pause and ask the user a question |
|
|
160
|
+
| `save_memory` | safe | Persist important info across sessions |
|
|
161
|
+
| `write_todos` | safe | Task breakdown with live progress rendering |
|
|
162
|
+
| `save_last_response` | write | Save AI response to file |
|
|
163
|
+
| `task_create` | write | Start a command running in the background |
|
|
164
|
+
| `task_list` | safe | List background tasks and their status/output |
|
|
165
|
+
| `task_stop` | write | Stop a running background task |
|
|
166
|
+
|
|
167
|
+
**Safety levels**: `safe` = auto-execute, `write` = diff preview + confirmation, `destructive` = prominent warning + confirmation.
|
|
168
|
+
|
|
169
|
+
## Key REPL Commands
|
|
170
|
+
|
|
171
|
+
| Command | Description |
|
|
172
|
+
|---------|-------------|
|
|
173
|
+
| `/provider` | Switch AI provider |
|
|
174
|
+
| `/model` | Switch model |
|
|
175
|
+
| `/plan` | Enter read-only planning mode |
|
|
176
|
+
| `/think` | Toggle Claude extended thinking |
|
|
177
|
+
| `/test` | Auto-detect and run project tests |
|
|
178
|
+
| `/review` | AI code review of current git diff |
|
|
179
|
+
| `/security-review` | Security vulnerability scan on git diff |
|
|
180
|
+
| `/rewind` | Rewind conversation + restore files to checkpoint state |
|
|
181
|
+
| `/scaffold <desc>` | AI generates project skeleton |
|
|
182
|
+
| `/init` | AI generates project context file (AICLI.md) |
|
|
183
|
+
| `/compact` | Compress conversation history |
|
|
184
|
+
| `/session` | Session management (new / list / load) |
|
|
185
|
+
| `/checkpoint` | Save/restore conversation checkpoints |
|
|
186
|
+
| `/fork` | Branch conversation from current point |
|
|
187
|
+
| `/search <keyword>` | Full-text search across all sessions |
|
|
188
|
+
| `/skill` | Manage agent skill packs |
|
|
189
|
+
| `/mcp` | View MCP server status and tools |
|
|
190
|
+
| `/cost` | Show token usage statistics |
|
|
191
|
+
| `/undo` | Undo last file operation |
|
|
192
|
+
| `/doctor` | Health check (API keys, MCP, context) |
|
|
193
|
+
| `/export` | Export session as Markdown or JSON |
|
|
194
|
+
| `/profile` | View/edit your identity (AI knows who you are across all providers) |
|
|
195
|
+
| `/config` | Open configuration wizard |
|
|
196
|
+
| `/help` | Show all available commands |
|
|
197
|
+
|
|
198
|
+
**Multi-line input**: Use `\` at end of line for continuation, or paste multi-line content directly (auto-detected and merged).
|
|
199
|
+
|
|
200
|
+
Type `/help` in the REPL to see all 40 commands.
|
|
201
|
+
|
|
202
|
+
## CLI Parameters
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
aicli [options]
|
|
206
|
+
|
|
207
|
+
Options:
|
|
208
|
+
--provider <name> Set AI provider
|
|
209
|
+
-m, --model <name> Set model
|
|
210
|
+
-p, --prompt <text> Headless mode: single prompt, then exit
|
|
211
|
+
--system <prompt> Override system prompt (headless)
|
|
212
|
+
--json Output JSON response (headless)
|
|
213
|
+
--output-format <fmt> text | streaming-json (NDJSON)
|
|
214
|
+
--resume <id> Resume a previous session
|
|
215
|
+
--allowed-tools <list> Comma-separated tool whitelist
|
|
216
|
+
--blocked-tools <list> Comma-separated tool blacklist
|
|
217
|
+
--no-stream Disable streaming output
|
|
218
|
+
|
|
219
|
+
Subcommands:
|
|
220
|
+
aicli web [options] Start Web UI server
|
|
221
|
+
aicli config Run configuration wizard
|
|
222
|
+
aicli providers List all providers and status
|
|
223
|
+
aicli sessions List recent sessions
|
|
224
|
+
aicli user <action> Manage Web UI users
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Headless Mode
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
# Single prompt
|
|
231
|
+
aicli -p "Explain recursion in one sentence"
|
|
232
|
+
|
|
233
|
+
# Pipe stdin
|
|
234
|
+
cat src/main.ts | aicli -p "Review this code"
|
|
235
|
+
|
|
236
|
+
# JSON output for scripting
|
|
237
|
+
aicli -p "hello" --json
|
|
238
|
+
|
|
239
|
+
# Streaming JSON (NDJSON)
|
|
240
|
+
aicli -p "write a poem" --output-format streaming-json
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Configuration
|
|
244
|
+
|
|
245
|
+
Configuration is stored at `~/.aicli/config.json`. Run `aicli config` for the interactive wizard, or edit directly:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"defaultProvider": "deepseek",
|
|
250
|
+
"apiKeys": {
|
|
251
|
+
"deepseek": "sk-...",
|
|
252
|
+
"claude": "sk-ant-...",
|
|
253
|
+
"openrouter": "sk-or-..."
|
|
254
|
+
},
|
|
255
|
+
"proxy": "http://127.0.0.1:10809",
|
|
256
|
+
"mcpServers": { },
|
|
257
|
+
"ui": {
|
|
258
|
+
"theme": "dark",
|
|
259
|
+
"wordWrap": 0,
|
|
260
|
+
"notificationThreshold": 10000
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Permission Rules
|
|
266
|
+
|
|
267
|
+
Control when tools require confirmation. Rules are checked in order — first match wins:
|
|
268
|
+
|
|
269
|
+
```json
|
|
270
|
+
{
|
|
271
|
+
"permissionRules": [
|
|
272
|
+
{ "tool": "read_file", "action": "auto-approve" },
|
|
273
|
+
{ "tool": "list_dir", "action": "auto-approve" },
|
|
274
|
+
{ "tool": "grep_files", "action": "auto-approve" },
|
|
275
|
+
{ "tool": "glob_files", "action": "auto-approve" },
|
|
276
|
+
{ "tool": "write_todos", "action": "auto-approve" },
|
|
277
|
+
{ "tool": "bash", "action": "auto-approve", "when": { "dangerLevel": "safe" } },
|
|
278
|
+
{ "tool": "write_file", "action": "auto-approve", "when": { "pathPattern": "src/" } },
|
|
279
|
+
{ "tool": "bash", "action": "deny", "when": { "pathPattern": "rm -rf" } },
|
|
280
|
+
{ "tool": "*", "action": "confirm" }
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
| Field | Description |
|
|
286
|
+
|-------|-------------|
|
|
287
|
+
| `tool` | Tool name, or `*` for all tools |
|
|
288
|
+
| `action` | `auto-approve` (skip confirmation), `deny` (block), `confirm` (ask user) |
|
|
289
|
+
| `when.dangerLevel` | Only match when danger level is `safe`, `write`, or `destructive` |
|
|
290
|
+
| `when.pathPattern` | Substring match against tool's `path` or `command` argument |
|
|
291
|
+
|
|
292
|
+
**Recommended minimal config** — auto-approve all read-only tools to reduce y/N prompts:
|
|
293
|
+
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"permissionRules": [
|
|
297
|
+
{ "tool": "read_file", "action": "auto-approve" },
|
|
298
|
+
{ "tool": "list_dir", "action": "auto-approve" },
|
|
299
|
+
{ "tool": "grep_files", "action": "auto-approve" },
|
|
300
|
+
{ "tool": "glob_files", "action": "auto-approve" },
|
|
301
|
+
{ "tool": "web_fetch", "action": "auto-approve" },
|
|
302
|
+
{ "tool": "write_todos", "action": "auto-approve" },
|
|
303
|
+
{ "tool": "ask_user", "action": "auto-approve" },
|
|
304
|
+
{ "tool": "run_tests", "action": "auto-approve" }
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Environment Variables
|
|
310
|
+
|
|
311
|
+
Environment variables take precedence over config file values:
|
|
312
|
+
|
|
313
|
+
| Variable | Description |
|
|
314
|
+
|----------|-------------|
|
|
315
|
+
| `AICLI_API_KEY_CLAUDE` | Claude API Key |
|
|
316
|
+
| `AICLI_API_KEY_GEMINI` | Gemini API Key |
|
|
317
|
+
| `AICLI_API_KEY_DEEPSEEK` | DeepSeek API Key |
|
|
318
|
+
| `AICLI_API_KEY_OPENAI` | OpenAI API Key |
|
|
319
|
+
| `AICLI_API_KEY_OPENROUTER` | OpenRouter API Key |
|
|
320
|
+
| `AICLI_API_KEY_ZHIPU` | Zhipu API Key |
|
|
321
|
+
| `AICLI_API_KEY_KIMI` | Kimi API Key |
|
|
322
|
+
| `AICLI_PROVIDER` | Default provider ID |
|
|
323
|
+
| `AICLI_NO_STREAM` | Set to `1` to disable streaming |
|
|
324
|
+
| `HTTPS_PROXY` / `HTTP_PROXY` | Proxy URL |
|
|
325
|
+
|
|
326
|
+
### Hierarchical Context Files
|
|
327
|
+
|
|
328
|
+
ai-cli automatically discovers and injects context files into the system prompt:
|
|
329
|
+
|
|
330
|
+
| Layer | Path | Purpose |
|
|
331
|
+
|-------|------|---------|
|
|
332
|
+
| Global | `~/.aicli/AICLI.md` | Personal preferences across all projects |
|
|
333
|
+
| Project | `<git-root>/AICLI.md` | Project rules (commit to git for team sharing) |
|
|
334
|
+
| Subdirectory | `<cwd>/AICLI.md` | Directory-specific instructions |
|
|
335
|
+
|
|
336
|
+
Also supports `CLAUDE.md` as an alternative filename at each layer.
|
|
337
|
+
|
|
338
|
+
### MCP Integration
|
|
339
|
+
|
|
340
|
+
Connect external [MCP](https://modelcontextprotocol.io/) servers for dynamic tool discovery. Configuration is compatible with Claude Desktop format:
|
|
341
|
+
|
|
342
|
+
```json
|
|
343
|
+
{
|
|
344
|
+
"mcpServers": {
|
|
345
|
+
"filesystem": {
|
|
346
|
+
"command": "npx",
|
|
347
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path"],
|
|
348
|
+
"timeout": 30000
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Project-level `.mcp.json` files are also supported and automatically merged with global config.
|
|
355
|
+
|
|
356
|
+
## Web UI Features
|
|
357
|
+
|
|
358
|
+
The Web UI (`aicli web`) provides a full-featured browser interface:
|
|
359
|
+
|
|
360
|
+
- **Multi-Tab Sessions** — parallel conversations in separate browser tabs
|
|
361
|
+
- **File Tree Panel** — browse project files, click to insert `@path` references
|
|
362
|
+
- **Image Upload** — drag & drop or Ctrl+V paste images into chat
|
|
363
|
+
- **Prompt Templates** — CRUD with tags, search, import/export
|
|
364
|
+
- **8 Themes** — DaisyUI themes with code highlight auto-sync
|
|
365
|
+
- **Diff Syntax Highlighting** — colored diff in tool confirm dialogs
|
|
366
|
+
- **Keyboard Shortcuts** — `Esc` stop, `Ctrl+L` clear, `↑↓` history
|
|
367
|
+
- **Export** — `/export md` or `/export json` browser download
|
|
368
|
+
- **PWA** — installable as desktop/mobile app
|
|
369
|
+
- **LAN Access** — `--host 0.0.0.0` for phone/tablet access
|
|
370
|
+
- **Multi-User Auth** — password authentication with per-user data isolation
|
|
371
|
+
- **Auto-Reconnect** — heartbeat + exponential backoff reconnection
|
|
372
|
+
|
|
373
|
+
## Testing
|
|
374
|
+
|
|
375
|
+
```bash
|
|
376
|
+
npm test # Run all 343 tests
|
|
377
|
+
npm run test:watch # Watch mode
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
21 test suites covering: authentication, sessions, tool types & danger levels, permissions, output truncation, diff rendering, edit-file similarity, error hierarchy, config management, env loading, provider registry, web-fetch, grep-files, hub renderer, hub discussion, hub presets, dev-state.
|
|
381
|
+
|
|
382
|
+
## Documentation
|
|
383
|
+
|
|
384
|
+
- [Chinese README](README.zh-CN.md) — 中文说明文档
|
|
385
|
+
|
|
386
|
+
## License
|
|
387
|
+
|
|
388
|
+
[MIT](LICENSE)
|