jinzd-ai-cli 0.2.1 → 0.2.3

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