scream-code 0.13.3 → 0.13.5

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,425 +1,145 @@
1
1
  <p align="center">
2
- <img width="200" height="200" alt="welcome_副本" src="https://github.com/user-attachments/assets/11d86774-b308-4cf7-857b-4c313670ade4" />
2
+ <a href="https://scream.chat">
3
+ <img width="280" alt="Scream Code" src="assets/logo-v2.svg" />
4
+ </a>
3
5
  </p>
4
6
 
7
+ <p align="center">A local agent with zero remote data behavior — write code, run tasks, research, code or work as you please.</p>
8
+
5
9
  <p align="center">
6
- <strong>Scream Code Your Local AI Agent Assistant</strong>
10
+ <a href="https://www.npmjs.com/package/scream-code"><img alt="npm" src="https://img.shields.io/npm/v/scream-code?style=flat-square&logo=npm&logoColor=white" /></a>
11
+ <a href="https://www.npmjs.com/package/scream-code"><img alt="downloads" src="https://img.shields.io/npm/dm/scream-code?style=flat-square" /></a>
12
+ <a href="https://github.com/LIUTod/scream-code/stargazers"><img alt="stars" src="https://img.shields.io/github/stars/LIUTod/scream-code?style=flat-square&logo=github" /></a>
13
+ <a href="https://github.com/LIUTod/scream-code/blob/main/LICENSE"><img alt="license" src="https://img.shields.io/github/license/LIUTod/scream-code?style=flat-square" /></a>
7
14
  </p>
8
15
 
9
16
  <p align="center">
10
- <a href="#中文说明"><img src="https://img.shields.io/badge/点击查看中文版说明-blue?style=for-the-badge" alt="Chinese README"></a>
17
+ <a href="README.md">English</a> |
18
+ <a href="README.zh.md">简体中文</a>
11
19
  </p>
12
20
 
13
21
  <p align="center">
14
- <a href="https://www.npmjs.com/package/scream-code"><img src="https://img.shields.io/npm/v/scream-code?style=flat-square&logo=npm&logoColor=white" alt="npm version"></a>
15
- <a href="https://www.npmjs.com/package/scream-code"><img src="https://img.shields.io/npm/dm/scream-code?style=flat-square&logo=npm&logoColor=white" alt="npm downloads"></a>
16
- <a href="https://github.com/LIUTod/scream-code/blob/main/LICENSE"><img src="https://img.shields.io/github/license/LIUTod/scream-code?style=flat-square" alt="license"></a>
17
- <a href="https://github.com/LIUTod/scream-code/stargazers"><img src="https://img.shields.io/github/stars/LIUTod/scream-code?style=flat-square&logo=github" alt="stars"></a>
18
- <a href="https://github.com/LIUTod/scream-code/network/members"><img src="https://img.shields.io/github/forks/LIUTod/scream-code?style=flat-square&logo=github" alt="forks"></a>
19
- <a href="https://github.com/LIUTod/scream-code/issues"><img src="https://img.shields.io/github/issues/LIUTod/scream-code?style=flat-square&logo=github" alt="issues"></a>
20
- <a href="https://scream.chat"><img src="https://img.shields.io/badge/website-scream.chat-blue?style=flat-square" alt="website"></a>
21
- <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D22.0.0-green?style=flat-square&logo=node.js&logoColor=white" alt="node version"></a>
22
- <a href="https://github.com/LIUTod/scream-code"><img src="https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat-square" alt="platform"></a>
22
+ <img width="861" height="550" alt="Scream Code" src="https://github.com/user-attachments/assets/874cbda7-11aa-41de-821f-e9390f62a765" />
23
23
  </p>
24
24
 
25
25
  ---
26
26
 
27
- Scream Code is a hassle-free, locally deployable, all-in-one AI Agent assistant. No remote calls, high security — just tell it what you need in natural language (Chinese or English). Vibe coding, write code, search papers, edit files, clean your machine, research, generate reports, search the web... You speak, it acts!
28
-
29
- ---
30
-
31
- ## ✨ Core Features
32
-
33
- <table>
34
- <tr>
35
- <td width="50%">
36
- <h3>🎯 Goal Loop</h3>
37
- <p>Not a useless loop — <strong>goal-driven autonomy</strong> with an independent judge Agent. Set a goal and it iterates automatically with budget control. No wasteful token-burning loops.</p>
38
- </td>
39
- <td width="50%">
40
- <h3>🐺 Wolfpack Mode</h3>
41
- <p><strong>Unlimited intelligent batch concurrency</strong> — multiple Agents collaborate in parallel. Built-in coder/explore/plan/verify/reviewer/oracle/writer/worker sub-agents. No item limit.</p>
42
- </td>
43
- </tr>
44
- <tr>
45
- <td width="50%">
46
- <h3>🧠 Persistent Memory</h3>
47
- <p><strong>Structured SQL extraction from pain points</strong>, FTS5 full-text + Tag semantic + vector triple retrieval. Shared across sessions — the more you use it, the smarter it gets.</p>
48
- </td>
49
- <td width="50%">
50
- <h3>📚 Local SAG Knowledge Base</h3>
51
- <p><strong>Based on paper: https://arxiv.org/abs/2606.15971 — SAG knowledge base</strong> (dramatically improves multi-hop reasoning), visual graph, import your local knowledge anytime.</p>
52
- </td>
53
- </tr>
54
- <tr>
55
- <td width="50%">
56
- <h3>🛡️ Efficient Lightweight Runtime</h3>
57
- <p><strong>Enterprise-grade security</strong>, fully local deployment, highly extensible with system-level capabilities. Zero remote behavior.</p>
58
- </td>
59
- <td width="50%">
60
- <h3>🔌 Multi-dimensional Extensions</h3>
61
- <p><strong>MCP / Skills / API providers</strong> — all freely configurable. 130+ built-in providers, or add your own via <code>/config diy</code>.</p>
62
- </td>
63
- </tr>
64
- <tr>
65
- <td width="50%">
66
- <h3>⚡️ Multi-Agent Orchestration</h3>
67
- <p><strong>Enable multi-agent orchestration for sub-Agents with custom model configs.</strong> Let each model do what it does best.</p>
68
- </td>
69
- <td width="50%">
70
- <h3>📱 Multi-channel Connectivity</h3>
71
- <p>Connect via cc-connect to <strong>WeChat, Feishu, WeCom, DingTalk, Slack</strong> and more. Remotely control your Scream from any chat app.</p>
72
- </td>
73
- </tr>
74
- <tr>
75
- <td width="50%">
76
- <h3>🐍 RLM Mode</h3>
77
- <p><strong>A persistent Python workspace for long-running tasks</strong> — state survives across calls, kernels self-heal from crashes, and <code>rlm()</code> spawns unlimited recursive subagents (parent → child → grandchild…). Opt-in via <code>/rlm</code>, zero impact when off.</p>
78
- </td>
79
- <td width="50%">
80
- <h3>🧩 /rlm-max-depth</h3>
81
- <p><strong>Configurable recursion cap</strong> — unlimited by default; set a positive integer to bound the recursion chain, <code>0</code> for unlimited again.</p>
82
- </td>
83
- </tr>
84
- </table>
85
-
86
- ---
87
-
88
- ## 🚀 Quick Start
89
-
90
- ### Step 1: Install
91
-
92
- Prerequisite: **Node.js >= 22**. Also recommended: **Git**.
93
-
94
- **Recommended: npm install (all platforms)**
27
+ ### Installation
95
28
 
96
29
  ```bash
97
30
  npm install -g scream-code
98
31
  ```
99
32
 
100
- After installation, the `scream` command is added to PATH. First install takes about 2-5 minutes.
101
-
102
- - Start TUI: `scream`
103
- - Start Web UI: `scream web`
104
- - Auto-permission mode: `scream --auto`
105
- - Auto-approve mode: `scream -y`
106
- - Switch language after startup: `/language`
107
-
108
- ### Step 2: Configure AI Service
109
-
110
- On first launch, if no model is configured, an interactive setup wizard (`/config`) starts automatically. Choose from built-in providers or use `/config diy` for custom APIs.
111
-
112
- **Multiple models supported** — switch anytime with `/model`:
33
+ > [!NOTE]
34
+ > Requires **Node.js >= 22**. Git recommended. Same command installs and updates.
113
35
 
114
- > Custom APIs supported (DeepSeek, OpenAI, Anthropic, MiniMax, Qwen, SiliconFlow, etc.) via `/config diy`.
115
-
116
- After configuration, use `/model` to switch or remove models without restarting. Use `/model diy` to configure sub-Agent models.
117
-
118
- ### Approval Panel
119
-
120
- When it needs to modify files or run commands, an approval panel appears. Press number keys to select, Enter to confirm.
121
-
122
- ---
123
-
124
- ## 📖 Features
125
-
126
- | Feature | Description |
127
- |---------|-------------|
128
- | 💬 **Conversational Interaction** | Describe what you need in natural language — it writes code, edits files, runs commands |
129
- | 🌐 **Web UI** | `scream web` — browser-based chat with multi-session, model switching, and full TUI parity |
130
- | 🔒 **Security First** | Must get approval before modifying files; `.env` and sensitive files are blocked by default |
131
- | 🛡️ **Permission Engine** | Fine-grained control over read/write/execute permissions |
132
- | ⚙️ **State Machine** | Prevents drift, enforces task granularity, reduces token waste |
133
- | 🤔 **FusionPlan** | Runs 3 plans from different angles and fuses them into one actionable plan |
134
- | 🧠 **Memory** | `/memory` — interactive memory notebook, shared across sessions, tag-based |
135
- | 📚 **SAG Knowledge Base** | `/knowledge` — interactive knowledge base with vector import and visual graph |
136
- | 💤 **Dream Cleanup** | `/dream` — periodically cleans duplicate and stale records (not available in auto mode) |
137
- | 🎯 **Goal System** | `/goal` — autonomous goal loop with budget control (iterations/tokens/time) |
138
- | 💾 **Session Recovery** | Interrupt anytime, resume later — conversation history auto-saved |
139
- | 🔄 **Multiple Modes** | Interactive mode, silent mode, plan mode, background task mode |
140
- | 🔌 **MCP Extensions** | Connect external tools (databases, browsers, APIs, etc.) |
141
- | 🤖 **Multi-Agent Parallel** | Complex tasks are automatically decomposed into parallel sub-Agents |
142
- | 🎨 **Skill Center** | Browse and install community skills, or create your own |
143
- | 🐺 **Wolfpack** | Multi-file, multi-task concurrent processing with auto-approval, unlimited sub-Agent concurrency |
144
- | 🌳 **Multi-Agent Orchestration** | `/config diy` — assign different models to different sub-Agents |
145
-
146
- ---
147
-
148
- ## 🌐 Web UI — Browser-Based Chat
149
-
150
- Launch the web interface with `scream web` — no terminal required. Full TUI parity in your browser.
36
+ ### Quick Start
151
37
 
152
38
  ```bash
153
- scream web # Start on default port 3210
154
- scream web --port 3222 # Custom port
155
- scream web -y # Auto-approve mode
156
- scream web --auto # Auto permission mode
157
- scream web --no-open # Don't auto-open browser
39
+ scream # terminal UI
40
+ scream web # browser UI (http://localhost:3210)
41
+ scream --auto # auto permission mode
42
+ scream -y # auto-approve mode
158
43
  ```
159
44
 
160
- **Features:**
161
- - 💬 **Full chat experience** — same agent-core as TUI, zero feature loss
162
- - 📂 **Multi-session** — sidebar with create/switch/delete/export, persistent across restarts
163
- - 🔄 **Model switching** — click model pill to switch models and thinking levels
164
- - ⌨️ **Slash commands** — `/compact` `/auto` `/yes` `/plan` `/fork` `/title` `/status` `/usage` `/btw` and more
165
- - 🎨 **Themes** — light/dark/system with smooth transitions
166
- - 📱 **Mobile responsive** — works on phones and tablets
167
- - 🔒 **Local only** — binds to 127.0.0.1, no external access
45
+ On first launch Scream walks you through model setup (`/config`). 130+ providers built in — or point it at any OpenAI-compatible endpoint with `/config diy`. Switch models anytime with `/model`, no restart needed — or use `/model diy` to give each sub-agent its own model, letting every model do what it does best.
168
46
 
169
- ---
47
+ When Scream wants to modify files or run commands, an approval panel pops up — pick a number, press Enter.
170
48
 
171
- ## 📱 cc-connect — Remote Control via Chat
49
+ ### Features
172
50
 
173
- Supports WeChat, Feishu, Slack, DingTalk, QQ, Telegram, and more. Install cc-connect after scream-code to control it remotely.
51
+ - **Goal Loop** autonomous, goal-driven execution with an independent judge agent and token/time budget control.
52
+ - **Wolfpack** — unlimited parallel sub-agents (coder / explore / plan / verify / reviewer / oracle / writer / worker).
53
+ - **Persistent Memory** — structured pain-point memory with FTS5 full-text + tag + vector retrieval, shared across sessions.
54
+ - **Local Knowledge Graph** — SAG-based visual knowledge base for multi-hop reasoning; import your own docs anytime.
55
+ - **RLM Mode** — persistent Python workspace for long-running tasks, with unlimited recursive sub-agents.
56
+ - **Session Trace** — `/trace` exports any session as a self-contained, offline interactive HTML timeline.
57
+ - **Context Search** — `/search` (Ctrl+Shift+F) full-screen keyword search over the conversation.
58
+ - **High Cache Hit Rate** — per-session HitR in the status bar, tuned across compatible protocols to maximize cache hits without compromising quality.
59
+ - **MCP / Skills / 130+ providers** — all DIY-configurable; ships with browser (46 tools) and macOS desktop automation.
60
+ - **Remote Control** — drive Scream from WeChat, Feishu, Slack, DingTalk, QQ, Telegram, Discord via cc-connect.
174
61
 
175
- ### Step 1: Install
62
+ ### Slash Commands
176
63
 
177
- ```bash
178
- npm install -g cc-connect
179
- ```
180
-
181
- ### Step 2: Configure Platform
182
-
183
- Open scream-code, type `/cc-connect`, and follow the prompts to select your platform.
184
-
185
- > ⚠️ **Note**: Do not reconfigure after initial setup — it will overwrite existing config.
64
+ Type `/` in the input to browse. All 47 commands:
186
65
 
187
- ### Step 3: Start Daemon
188
-
189
- Follow the steps to complete setup, then start the background daemon (scream-code can be closed while the daemon runs).
190
-
191
- **cc-connect remote chat quick commands (only the following are supported):**
66
+ <details>
67
+ <summary>Full command reference (click to expand)</summary>
192
68
 
193
69
  | Command | Description |
194
70
  |---------|-------------|
195
- | `/new` | Overwrite and create new session |
196
- | `/current` | View current session status |
197
- | `/mode [name]` | Switch mode |
198
- | `/reasoning [level]` | View or switch reasoning effort |
199
- | `/stop` | Stop current execution |
200
-
201
- ---
202
-
203
- ## 💡 Inspiration & Thanks
204
-
205
- Scream Code is a tool-oriented Agent framework I rebuilt from scratch based on my own usage habits and understanding of Agent systems. I started with Rust, but the maintenance overhead kept growing until I had to switch entirely to TypeScript. I've always believed that maximizing the model's own capabilities is the optimal path for Agent tools — in other words, I don't advocate excessive framework constraints, because model development will gradually reduce hallucinations.
206
-
207
- The overall logic borrows from the Agent harness approach, while referencing design decisions from many excellent open-source projects. Scream no longer pursues feature stacking — it's a lightweight Agent foundation that stably and efficiently executes intent.
208
-
209
- This project is completely free and open to use. Forks and modifications are welcome. Feedback, suggestions, and improvements are appreciated. I'll keep refining it within my capacity based on real-world usage.
210
-
211
- Thanks to these excellent projects for inspiration: pi, pi-tui, gork, kimicli, Gemini, ohmypi, zero, and others.
212
-
213
- ---
214
-
215
- ## 🔗 Links
216
-
217
- 🌐 **Website**: https://scream.chat
218
-
219
- ---
220
-
221
- ## 📄 License
222
-
223
- [MIT](LICENSE) © [LIUTod](https://github.com/LIUTod)
71
+ | **Modes & execution** | |
72
+ | `/auto` | Toggle auto permission mode |
73
+ | `/yes` (`/yolo`) | Toggle auto-approve mode |
74
+ | `/ask` | Toggle read-only Q&A mode |
75
+ | `/goal [objective]` | View/manage auto goals |
76
+ | `/wolfpack` (`/wp`) | Toggle wolfpack mode — auto-approve + batch concurrency |
77
+ | `/rlm` | RLM mode: persistent Python workspace, unlimited recursive subagents |
78
+ | `/rlm-max-depth [N]` | Set RLM recursion depth limit |
79
+ | `/plan` | Toggle plan mode |
80
+ | `/fusionplan` (`/fp`) | Fusion plan mode (multi-agent parallel planning) |
81
+ | `/btw` | Quick question without interrupting the conversation |
82
+ | `/eval` | Run end-to-end tests (agent health check) |
83
+ | **Session** | |
84
+ | `/new` (`/clear`) | Start a new session |
85
+ | `/sessions` (`/resume`) | Browse and restore sessions |
86
+ | `/compact` | Compact conversation context |
87
+ | `/fork` | Copy session into a new branch |
88
+ | `/title` (`/rename`) | Set or show session title |
89
+ | `/revoke [N]` | Undo the last N conversation rounds |
90
+ | `/export-md` (`/export`) | Export session as Markdown |
91
+ | `/export-debug-zip` | Export session as debug ZIP |
92
+ | `/status` | Show session and runtime status |
93
+ | `/usage` | Show token usage and context window |
94
+ | **Memory & knowledge** | |
95
+ | `/memory` (`/memo`, `/mem`) `[query]` | Browse, search, inject memory memos |
96
+ | `/knowledge` (`/know`) `[query]` | Manage local knowledge base |
97
+ | **Models & configuration** | |
98
+ | `/model [alias]` | Switch LLM model |
99
+ | `/config` | Browse and configure models |
100
+ | `/logout` (`/disconnect`) | Remove configured models |
101
+ | `/language` (`/lang`) | Switch interface language |
102
+ | `/theme` | Set terminal UI theme |
103
+ | `/permission` | Select permission mode |
104
+ | `/editor` | Set external editor |
105
+ | `/settings` | Open TUI settings |
106
+ | `/init` | Analyze codebase and generate AGENTS.md |
107
+ | `/update` | Update Scream Code |
108
+ | `/version` | Show version info |
109
+ | **Extensions** | |
110
+ | `/mcp` | Manage MCP servers |
111
+ | `/skill` (`/skills`, `/plugin`) | Skill center |
112
+ | `/make-skill` | Distill the session into a Skill |
113
+ | `/cc` | Control your cc daemon |
114
+ | `/cc-connect` | cc-connect quick channel setup |
115
+ | **Tools** | |
116
+ | `/search` | Search the conversation (Esc to close) |
117
+ | `/trace` | View the session working trajectory |
118
+ | `/hl` (`/highlight`) | Toggle user-message highlight block |
119
+ | `/snaptimer` (`/timer`) | Toggle per-turn elapsed timer |
120
+ | `/tasks` (`/task`) | Browse background tasks |
121
+ | `/like` | Set your preferences |
122
+ | `/help` (`/h`) | Show commands and shortcuts |
123
+ | `/exit` (`/quit`, `/q`) | Exit application |
124
+
125
+ </details>
126
+
127
+ **Shortcuts:** `Ctrl+S` interrupt · `Ctrl+C` cancel · `Ctrl+O` expand tool output · `Ctrl+Shift+F` search · `Shift+Tab` plan mode · `Shift+Enter` new line · `Tab` (empty) cycle thinking effort · `@` mention a file
128
+
129
+ ### Web UI
130
+
131
+ The browser UI shares the same agent-core as the TUI — zero feature loss. Multi-session sidebar, model & thinking-effort switching, light/dark/system themes, mobile-friendly. Binds `127.0.0.1` only — no external access.
132
+
133
+ ### Documentation
134
+
135
+ Website: [scream.chat](https://scream.chat)
136
+
137
+ ### Contributing
138
+
139
+ Free and open — forks, feedback and pull requests are welcome. Scream is a lightweight agent foundation: maximize the model's own capability, don't over-constrain it with framework. Inspired by pi, pi-tui, gork, kimicli, Gemini, ohmypi, zero and others.
224
140
 
225
141
  ---
226
142
 
227
143
  <p align="center">
228
- Made with ❤️ by <a href="https://github.com/LIUTod">LIUTod</a>
144
+ <a href="https://github.com/LIUTod/scream-code">GitHub</a> · <a href="https://scream.chat">scream.chat</a> · <a href="LICENSE">MIT License</a> · Made with ❤️ by <a href="https://github.com/LIUTod">LIUTod</a>
229
145
  </p>
230
-
231
- ---
232
-
233
- <h2 id="中文说明">Scream Code 你的本地 Agent 智能助手</h2>
234
-
235
- <p align="center">
236
- <a href="#readme"><img src="https://img.shields.io/badge/README-English-blue?style=for-the-badge" alt="English README"></a>
237
- </p>
238
-
239
- Scream Code 是一款省心的可在本地部署的全能 AI Agent 助手。你无需硬记代码,无任何远程行为,高安全,用户直接用中/英文下达指令,vibe coding、写代码、查论文、改文件、清理电脑、查资料、制作研报、搜全网信息……你动嘴,它动手!
240
-
241
- ---
242
-
243
- ## ✨ 核心特性
244
-
245
- <table>
246
- <tr>
247
- <td width="50%">
248
- <h3>🎯 Goal loop 循环</h3>
249
- <p>非无效loop,<strong>目标自主驱动</strong>,裁判Agent独立裁决目标达成。设定目标后自动多轮迭代执行,支持预算控制。拒绝浪费Token式无效Loop循环</p>
250
- </td>
251
- <td width="50%">
252
- <h3>🐺 Wolfpack 群狼模式</h3>
253
- <p><strong>无限制智能批量并发</strong>多Agent协同,并行处理大项目任务。内置coder/explore/plan/verify/reviewer/oracle/writer/worker 等多种子 Agent,精准识别任务类型,item 数量无上限。</p>
254
- </td>
255
- </tr>
256
- <tr>
257
- <td width="50%">
258
- <h3>🧠 永久记忆备忘录</h3>
259
- <p><strong>痛点记忆结构化SQL提取</strong>,FTS5全文+Tag语义+向量三重检索不漂移。跨会话共享,越用越懂你。</p>
260
- </td>
261
- <td width="50%">
262
- <h3>📚 本地SAG图谱知识库</h3>
263
- <p><strong>基于论文:https://arxiv.org/abs/2606.15971 构建复现SAG知识库</strong>(大幅提高多跳推理能力),可视化图谱,随时导入你的本地知识,让Agent更懂你</p>
264
- </td>
265
- </tr>
266
- <tr>
267
- <td width="50%">
268
- <h3>🛡️ 效率级轻量底层</h3>
269
- <p><strong>企业级安全</strong>,完全本地部署并运行,高度自由可拓展,系统级调用能力。无任何远程行为。</p>
270
- </td>
271
- <td width="50%">
272
- <h3>🔌 多维自定义拓展</h3>
273
- <p><strong>MCP / Skill / api模型商</strong> 均可自由DIY配置,拓展你Scream的能力,内设主流国内外模型商超130+,也可自由配置。</p>
274
- </td>
275
- </tr>
276
- <tr>
277
- <td width="50%">
278
- <h3>⚡️ 多代理编排引擎</h3>
279
- <p><strong>支持为子Agent开启多代理编排模式,可自定义配置子Agent模型。</strong>让不同模型,去做自己最擅长的工作。</p>
280
- </td>
281
- <td width="50%">
282
- <h3>📱 多渠道互联</h3>
283
- <p>通过 cc-connect 打通<strong>微信、飞书、企微、钉钉、slack</strong>等平台,随时随地在App上远程调用你的scream。</p>
284
- </td>
285
- </tr>
286
- <tr>
287
- <td width="50%">
288
- <h3>🐍 RLM 模式</h3>
289
- <p><strong>面向长任务的持久 Python 工作环境</strong>——状态跨调用保留,内核崩溃自动复活,<code>rlm()</code> 支持无限递归子代理(父→子→孙…)。<code>/rlm</code> 按需开启,关闭时零影响。</p>
290
- </td>
291
- <td width="50%">
292
- <h3>🧩 /rlm-max-depth</h3>
293
- <p><strong>可配置的递归深度上限</strong>——默认无限;设正整数可限制递归链层数,<code>0</code> 恢复无限。</p>
294
- </td>
295
- </tr>
296
- </table>
297
-
298
- ---
299
-
300
- ## 🚀 三分钟上手
301
-
302
- ### 第一步:安装
303
-
304
- 前置条件:**Node.js >= 22** 建议同步安装 **Git**。
305
-
306
- **推荐:npm 安装(全平台通用)更新安装都是这个指令**
307
-
308
- ```bash
309
- npm install -g scream-code
310
- ```
311
-
312
- 安装完成后,`scream` 命令自动加入 PATH。首次安装约需 2-5 分钟。
313
- TUI启动命令`scream`
314
- Web网页端启动命令`scream web`
315
- 自动权限模式启动`scream --auto`
316
- 自动批准模式启动`scream -y`
317
- 启动后切换语言`/language`
318
-
319
- ### 第二步:启动并配置 AI 服务
320
-
321
- 首次启动时,如果检测到没有配置模型,会自动进入交互式配置向导(`/config`),可选择市面模型商一键配置
322
- (`/config diy`) 支持自定义追加配置。按提示输入 API 地址、密钥、模型型号即可完成配置。
323
-
324
- **支持多个模型**(配置好后可用 `/model` 随时切换):
325
-
326
- > 支持自定义 API(DeepSeek、OpenAI、Anthropic、MiniMax、通义千问、硅基流动等(`/config diy`)需要输入隐藏指令)。
327
-
328
- 配置完成后,在交互模式下输入 `/model` 即可切换模型或删除模型,无需重启(`/model diy`)可以单独设置子Agent模型配置。
329
-
330
- ### 审批面板
331
-
332
- 当它要修改文件或执行命令时,会弹出审批面板:
333
-
334
- 按数字键选择,回车确认。
335
-
336
- ---
337
-
338
- ## 📖 核心功能
339
-
340
- | 功能 | 说明 |
341
- |------|------|
342
- | 💬 **对话式交互** | 用自然语言描述需求,它自动写代码、改文件、跑命令 |
343
- | 🌐 **Web网页端** | `scream web` 启动浏览器聊天,支持多会话、模型切换,与TUI功能对齐 |
344
- | 🔒 **安全第一** | 修改文件前必须征得同意,`.env` 等敏感文件默认禁止操作 |
345
- | 🛡️ **权限引擎** | 精细控制它能做什么(读取/写入/执行),防止误操作 |
346
- | ⚙️ **状态机机制** | 防漂移,强化任务颗粒度,不出错,任务完成度高,降低 Token 消耗 |
347
- | 🤔 **fusionplan** | 复杂需求规划时跑3个不同角度的方案并融合为真实可行的方案,提高方案正确率 |
348
- | 🧠 **记忆备忘录** | `/memory` 打开交互式记忆备忘录,跨会话共享,知识库tag分级 |
349
- | 📚 **SAG知识库** | `/knowledge` 打开交互式知识库,配置导入向量,可视化知识图谱 |
350
- | 💤 **dream 整理** | `/dream` 定期整理重复和过时记录(auto模式下不可用,避免误删) |
351
- | 🎯 **目标系统** | `/goal` 开启自主目标循环,支持预算控制(轮次/Token/时间) |
352
- | 💾 **会话恢复** | 随时中断,随时继续,对话历史自动保存 |
353
- | 🔄 **多模式** | 交互模式、静默模式、计划模式、后台任务模式 |
354
- | 🔌 **MCP扩展** | 连接外部工具(数据库、浏览器、API 等) |
355
- | 🤖 **多Agent并行** | 复杂任务自动拆解为多个子 Agent 同时执行 |
356
- | 🎨 **技能中心** | 搜罗多款技能可下载,用户也可以自行安装 skill 技能 |
357
- | 🐺 **wolfpack** | 群狼模式,适合多文件多任务同时处理,拥有自动审批权限,子 Agent 并发无上限 |
358
- | 🌳 **多代理编排** | `/config diy` 自定义给子Agent代理配置不同的模型,让最合适的模型做最适合的工作|
359
-
360
- ---
361
-
362
- ## 🌐 Web网页端 — 浏览器聊天
363
-
364
- 输入 `scream web` 启动网页端,无需终端,浏览器里直接使用。功能与TUI完全对齐。
365
-
366
- ```bash
367
- scream web # 默认端口 3210
368
- scream web --port 3222 # 自定义端口
369
- scream web -y # 自动批准模式
370
- scream web --auto # 自动权限模式
371
- scream web --no-open # 不自动打开浏览器
372
- ```
373
-
374
- **功能特性:**
375
- - 💬 **完整聊天体验** — 与TUI共用同一套 agent-core,功能零损失
376
- - 📂 **多会话管理** — 左侧栏新建/切换/删除/导出会话,重启后自动恢复
377
- - 🔄 **模型切换** — 点击模型标签即可切换模型和思考强度
378
- - ⌨️ **斜杠命令** — `/compact` `/auto` `/yes` `/plan` `/fork` `/title` `/status` `/usage` `/btw` 等
379
- - 🎨 **主题切换** — 亮色/暗色/跟随系统,平滑过渡
380
- - 📱 **移动端适配** — 手机平板也能用
381
- - 🔒 **仅本地访问** — 绑定 127.0.0.1,外部无法访问
382
-
383
- ---
384
-
385
- ## 📱 cc-connect 通过聊天远程控制
386
-
387
- 支持微信、飞书、Slack、钉钉、QQ、Telegram 等,你可以在安装 scream-code 后一键安装 cc-connect 来控制你的 screamcode。
388
-
389
- ### 第一步:一键安装
390
-
391
- ```bash
392
- npm install -g cc-connect
393
- ```
394
-
395
- ### 第二步:配置平台
396
-
397
- 打开 screamcode,输入 `/cc-connect` 按照提示选择你要接入的平台。
398
-
399
- > ⚠️ **注意**:配置完毕后不要再次配置,否则会覆盖原有配置。
400
-
401
- ### 第三步:启动守护进程
402
-
403
- 按照步骤完成配置与链接后,输入命令启动后台守护进程(关闭 screamcode 也可在后台聊天)。
404
-
405
- **cc-connect远程聊天常用快捷指令(仅支持以下指令):**
406
-
407
- | 指令 | 说明 |
408
- |------|------|
409
- | `/new` | 覆盖并创建新会话 |
410
- | `/current` | 查看当前会话状态 |
411
- | `/mode [名称]` | 切换模式 |
412
- | `/reasoning [等级]` | 查看或切换推理强度 |
413
- | `/stop` | 停止当前执行 |
414
-
415
- ---
416
-
417
- ## 💡 项目灵感与感谢支持
418
-
419
- Scream Code 是我基于自身使用习惯以及对 Agent 系统的理解,从零重构的一套工具型 Agent 框架。最早用 Rust 编写,但维护工程量越来越大,不得不彻底转向 TypeScript,我的始终认为,最大化释放模型本身的能力才是 Agent 工具未来发展的最优解,换句话说我并不提倡过度的框架约束,因为模型的发展会逐渐降低幻觉!
420
-
421
- 另外 Scream Code 的整体逻辑借鉴了 Agent harness 的思路,同时也参考了不少优秀开源项目的设计取舍与实现细节。现在的 Scream 不再追求功能堆叠,而是一个能稳定、高效执行意图的轻量化 Agent 底座。
422
-
423
- 这个项目完全免费,开放使用,欢迎魔改,也欢迎反馈,并给出建议和改进。我会在能力范围之内,持续根据实际使用场景继续打磨。
424
-
425
- 再次感谢其他优秀的项目给予灵感:pi、pi-tui、gork、kimicli、Gemini、ohmypi、zero 等优秀项目。