snow-ai 0.6.6 → 0.6.8

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
@@ -4,50 +4,70 @@
4
4
 
5
5
  # snow-ai
6
6
 
7
+ [![npm version](https://img.shields.io/npm/v/snow-ai.svg)](https://www.npmjs.com/package/snow-ai)
8
+ [![npm downloads](https://img.shields.io/npm/dm/snow-ai.svg)](https://www.npmjs.com/package/snow-ai)
9
+ [![license](https://img.shields.io/npm/l/snow-ai.svg)](https://github.com/MayDay-wpf/snow-cli/blob/main/LICENSE)
10
+ [![node](https://img.shields.io/node/v/snow-ai.svg)](https://nodejs.org/)
11
+
7
12
  **English** | [中文](README_zh.md)
8
13
 
9
14
  **QQ Group**: 910298558
10
15
 
11
- _An intelligent AI-powered CLI tool for developers_
16
+ _Agentic coding in your terminal_
12
17
 
13
18
  </div>
14
19
 
15
- ⚠️ Notice: If you want to use Snow to access domestic Claude Code or Codex relays, please [click here](#access-domestic-claude-code--codex-relay-snow-configuration) to see the corresponding configuration methods.
16
-
17
- ## Thanks Developer 💖
20
+ ## Thanks Developer
18
21
 
19
22
  <img alt="contributors" src="https://contrib.rocks/image?repo=MayDay-wpf/snow-cli"/>
20
23
 
21
- ## ❤️Thanks Support 💖
24
+ ## Thanks Support
25
+
26
+ - [UUCode](https://www.uucode.org)
27
+
28
+ ---
29
+
30
+ ![alt text](docs/images/image.png)
31
+
32
+ ## Documentation
22
33
 
23
- * [UUCode](https://www.uucode.org)
34
+ - [Installation Guide](docs/usage/en/01.Installation%20Guide.md) - System requirements, installation (update, uninstall) steps, IDE extension installation
35
+ - [First Time Configuration](docs/usage/en/02.First%20Time%20Configuration.md) - API configuration, model selection, basic settings
36
+ - [Startup Parameters Guide](docs/usage/en/19.Startup%20Parameters%20Guide.md) - Command-line parameters explained, quick start modes, headless mode, async tasks, developer mode
24
37
 
25
- ## << [Click to view the detailed complete document](docs/usage/en/0.Catalogue.md) >>
38
+ ### Advanced Configuration
26
39
 
40
+ - [Proxy and Browser Settings](docs/usage/en/03.Proxy%20and%20Browser%20Settings.md) - Network proxy configuration, browser usage settings
41
+ - [Codebase Setup](docs/usage/en/04.Codebase%20Setup.md) - Codebase integration, search configuration
42
+ - [Sub-Agent Configuration](docs/usage/en/05.Sub-Agent%20Configuration.md) - Sub-agent management, custom sub-agent configuration
43
+ - [Sensitive Commands Configuration](docs/usage/en/06.Sensitive%20Commands%20Configuration.md) - Sensitive command protection, custom command rules
44
+ - [Hooks Configuration](docs/usage/en/07.Hooks%20Configuration.md) - Workflow automation, hook types explanation, practical configuration examples
45
+ - [Theme Settings](docs/usage/en/08.Theme%20Settings.md) - Interface theme configuration, custom color schemes, simplified mode
46
+ - [Third-Party Relay Configuration](docs/usage/en/16.Third-Party%20Relay%20Configuration.md) - Claude Code relay, Codex relay, custom headers configuration
27
47
 
28
- ## Overview Catalog
48
+ ### Feature Guide
29
49
 
30
- - [System Requirements](#system-requirements)
31
- - [Installation](#installation)
32
- - [Access Domestic Claude Code & Codex Relay](#access-domestic-claude-code--codex-relay-snow-configuration)
33
- - [API & Model Settings](#api--model-settings)
34
- - [Proxy & Browser Settings](#proxy--browser-settings)
35
- - [System Prompt Settings](#system-prompt-settings)
36
- - [Custom Headers Settings](#custom-headers-settings)
37
- - [MCP Settings](#mcp-settings)
38
- - [Getting Started](#getting-started)
39
- - [Snow System Files](#snow-system-files)
50
+ - [Command Panel Guide](docs/usage/en/09.Command%20Panel%20Guide.md) - Detailed description of all available commands, usage tips, shortcut key reference
51
+ - [Command Injection Mode](docs/usage/en/10.Command%20Injection%20Mode.md) - Execute commands directly in messages, syntax explanation, security mechanisms, use cases
52
+ - [Vulnerability Hunting Mode](docs/usage/en/11.Vulnerability%20Hunting%20Mode.md) - Professional security analysis, vulnerability detection, verification scripts, detailed reports
53
+ - [Headless Mode](docs/usage/en/12.Headless%20Mode.md) - Command line quick conversations, session management, script integration, third-party tool integration
54
+ - [Keyboard Shortcuts Guide](docs/usage/en/13.Keyboard%20Shortcuts%20Guide.md) - All keyboard shortcuts, editing operations, navigation control, rollback functionality
55
+ - [MCP Configuration](docs/usage/en/14.MCP%20Configuration.md) - MCP service management, configure external services, enable/disable services, troubleshooting
56
+ - [Async Task Management](docs/usage/en/15.Async%20Task%20Management.md) - Background task creation, task management interface, sensitive command approval, task to session conversion
57
+ - [Skills Command Detailed Guide](docs/usage/en/18.Skills%20Command%20Detailed%20Guide.md) - Skill creation, usage methods, Claude Code Skills compatibility, tool restrictions
58
+ - [LSP Configuration and Usage](docs/usage/en/19.LSP%20Configuration.md) - LSP config file, language server installation, ACE tool usage (definition/outline)
59
+ - [SSE Service Mode](docs/usage/en/20.SSE%20Service%20Mode.md) - SSE server startup, API endpoints explanation, tool confirmation flow, permission configuration, YOLO mode, client integration examples
40
60
 
41
61
  ---
42
62
 
43
- # System Requirements
63
+ ## Development Guide
44
64
 
45
- Prerequisites for installing Snow:
65
+ ### Prerequisites
46
66
 
47
67
  - **Node.js >= 16.x** (Requires ES2020 features support)
48
68
  - npm >= 8.3.0
49
69
 
50
- Check your Node.js version
70
+ Check your Node.js version:
51
71
 
52
72
  ```bash
53
73
  node --version
@@ -64,17 +84,7 @@ nvm use 16
64
84
  # https://nodejs.org/
65
85
  ```
66
86
 
67
- # Installation
68
-
69
- ## Install Snow CLI
70
-
71
- You can install directly using npm:
72
-
73
- ```bash
74
- npm install -g snow-ai
75
- ```
76
-
77
- Or visit: [Official Repository](https://github.com/MayDay-wpf/snow-cli) to build from source, quick clone command:
87
+ ### Build from Source
78
88
 
79
89
  ```bash
80
90
  git clone https://github.com/MayDay-wpf/snow-cli.git
@@ -84,250 +94,59 @@ npm run link # builds and globally links snow
84
94
  # to remove the link later: npm run unlink
85
95
  ```
86
96
 
87
- ## Install VSCode Extension
88
-
89
- - Download [snow-cli-x.x.x.vsix](https://github.com/MayDay-wpf/snow-cli/releases/tag/vsix)
90
- - Open VSCode, click `Extensions` → `Install from VSIX...` → select the downloaded file
91
-
92
- ## Install JetBrains Plugin
93
-
94
- - Download [JetBrains plugin](https://github.com/MayDay-wpf/snow-cli/releases/tag/jetbrains)
95
- - Follow JetBrains plugin installation instructions
96
-
97
- ## Available Commands
98
-
99
- * Start: `$ snow`
100
- * Update: `$ snow --update`
101
- * Version query: `$ snow --version`
102
- * Restore the latest conversation history: `$ snow -c`
103
- * Headless mode: `$ snow --ask "Hello"`
104
- * Default yolo: `$ snow --yolo`
105
- * Restore the most recent conversation and enable yolo: `$ snow --c-yolo`
106
- * Asynchronous task: `$ snow --task "Hello"`
107
- * Asynchronous task panel: `$ snow --task-list`
108
-
109
- # API & Model Settings
110
-
111
- For detailed configuration instructions, please refer to: [First Configuration Documentation](docs/usage/zh/02.首次配置.md)
97
+ ### IDE Extension Development
112
98
 
113
- ![API & Model Settings in CLI](docs/images/image.png)
99
+ #### VSCode Extension
114
100
 
115
- # Proxy & Browser Settings
101
+ - Extension source located in `VSIX/` directory
102
+ - Download release: [mufasa.snow-cli](https://marketplace.visualstudio.com/items?itemName=mufasa.snow-cli)
116
103
 
117
- Configure system proxy port and search engine, usually no modifications needed.
104
+ #### JetBrains Plugin
118
105
 
119
- ![Proxy & Browser Settings in CLI](docs/images/image-1.png)
106
+ - Plugin source located in `Jetbrains/` directory
107
+ - Download release: [JetBrains plugin](https://plugins.jetbrains.com/plugin/28715-snow-cli/edit)
120
108
 
121
- # System Prompt Settings
122
-
123
- Customize system prompts to supplement Snow's built-in prompts.
124
-
125
- # Custom Headers Settings
126
-
127
- Add custom request headers, see [Relay Access Configuration](#access-domestic-claude-code--codex-relay-snow-configuration) for details.
128
-
129
- # MCP Settings
130
-
131
- Configure MCP services, JSON format compatible with Cursor.
132
-
133
- # Getting Started
134
-
135
- After startup, click **Start** to enter the conversation interface.
136
-
137
- ![IDE Connected notification](docs/images/image-2.png)
138
-
139
- ## Main Features
140
-
141
- - **File Selection**: Use `@` to select files
142
- - **Slash Commands**: Use `/` to view available commands
143
- - **Keyboard Shortcuts**:
144
- - `Alt+V` (Windows) / `Ctrl+V` (macOS/Linux) - Paste image
145
- - `Ctrl+L` / `Ctrl+R` - Clear input
146
- - `Shift+Tab` - Toggle Yolo mode
147
- - `ESC` - Stop generation
148
- - Double-click `ESC` - Rollback conversation
149
-
150
- ## Token Statistics
151
-
152
- Real-time Token usage is displayed below the input box.
153
-
154
- ![Token usage diagram](docs/images/image-3.png)
155
-
156
- # Snow System Files
157
-
158
- All configuration files are located in the `.snow` folder in the user directory.
159
-
160
- ![Configuration files overview](docs/images/image-4.png)
109
+ ### Project Structure
161
110
 
162
111
  ```
163
- .snow/
112
+ .snow/ # User configuration directory
164
113
  ├── log/ # Runtime logs (local, can be deleted)
165
- ├── profiles/ # Configuration files
114
+ ├── profiles/ # Configuration profiles
166
115
  ├── sessions/ # Conversation history
167
116
  ├── snapshots/ # File snapshots
168
- ├── todo/ # TODO lists
169
- ├── active-profile.txt # Current configuration
117
+ ├── todos/ # TODO lists
118
+ ├── tasks/ # Async tasks
119
+ ├── task-logs/ # Async task logs
120
+ ├── history/ # Command history
121
+ ├── commands/ # Custom commands
122
+ ├── hooks/ # Workflow hooks
123
+ ├── sse-daemons/ # SSE daemon processes
124
+ ├── sse-logs/ # SSE service logs
125
+ ├── usage/ # Usage statistics
126
+ ├── active-profile.json # Current active profile
170
127
  ├── config.json # API configuration
171
128
  ├── custom-headers.json # Custom request headers
172
129
  ├── mcp-config.json # MCP configuration
173
- └── system-prompt.txt # Custom prompts
130
+ ├── lsp-config.json # LSP configuration
131
+ ├── proxy-config.json # Proxy settings
132
+ ├── codebase.json # Codebase index settings
133
+ ├── sub-agents.json # Sub-agent configuration
134
+ ├── sensitive-commands.json # Sensitive command rules
135
+ ├── theme.json # Theme settings
136
+ ├── language.json # Language settings
137
+ ├── history.json # History settings
138
+ └── system-prompt.json # Custom system prompts
174
139
  ```
175
140
 
176
- # Access Domestic Claude Code & Codex Relay (Snow Configuration)
177
-
178
- Relay service providers set up interception measures for third-party clients, so you need to configure custom system prompts and request headers in Snow to disguise access:
179
-
180
- ## Claude Code
181
-
182
- Custom system prompt (**Note: No extra or missing characters allowed**), please enter the location shown below to copy and replace:
183
-
184
- ```
185
- You are Claude Code, Anthropic's official CLI for Claude.
186
- ```
187
-
188
- ![Entry diagram 1](docs/images/image-5.png)
189
-
190
- In addition, you need to add the following custom request headers:
191
-
192
- ```json
193
- {
194
- "anthropic-beta": "claude-code-20250219,interleaved-thinking-2025-05-14",
195
- "anthropic-dangerous-direct-browser-access":"true",
196
- "anthropic-version": "2023-06-01",
197
- "user-agent": "claude-cli/2.0.22 (external, cli",
198
- "x-app": "cli"
199
- }
200
- ```
201
-
202
- **Enable 1M context request header:**
203
-
204
- ```json
205
- {
206
- "anthropic-beta": "claude-code-20250219,context-1m-2025-08-07,interleaved-thinking-2025-05-14",
207
- "anthropic-dangerous-direct-browser-access":"true",
208
- "anthropic-version": "2023-06-01",
209
- "user-agent": "claude-cli/2.0.22 (external, cli",
210
- "x-app": "cli"
211
- }
212
- ```
213
-
214
- ![Entry diagram 2](docs/images/image-6.png)
215
-
216
- ## Codex
217
-
218
- Codex relay generally does not require header configuration. Similarly, please replace with the following custom system prompt (**Note: No extra or missing characters allowed**):
219
-
220
- ```markdown
221
- You are Codex, based on GPT-5. You are running as a coding agent in the Codex CLI on a user's computer.
222
-
223
- ## General
224
-
225
- - The arguments to `shell` will be passed to execvp(). Most terminal commands should be prefixed with ["bash", "-lc"].
226
- - Always set the `workdir` param when using the shell function. Do not use `cd` unless absolutely necessary.
227
- - When searching for text or files, prefer using `rg` or `rg --files` respectively because `rg` is much faster than alternatives like `grep`. (If the `rg` command is not found, then use alternatives.)
228
-
229
- ## Editing constraints
230
-
231
- - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
232
- - Add succinct code comments that explain what is going on if code is not self-explanatory. You should not add comments like "Assigns the value to the variable", but a brief comment might be useful ahead of a complex code block that the user would otherwise have to spend time parsing out. Usage of these comments should be rare.
233
- - Try to use apply_patch for single file edits, but it is fine to explore other options to make the edit if it does not work well. Do not use apply_patch for changes that are auto-generated (i.e. generating package.json or running a lint or format command like gofmt) or when scripting is more efficient (such as search and replacing a string across a codebase).
234
- - You may be in a dirty git worktree.
235
- - NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
236
- - If asked to make a commit or code edits and there are unrelated changes to your work or changes that you didn't make in those files, don't revert those changes.
237
- - If the changes are in files you've touched recently, you should read carefully and understand how you can work with the changes rather than reverting them.
238
- - If the changes are in unrelated files, just ignore them and don't revert them.
239
- - While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
240
- - **NEVER** use destructive commands like `git reset --hard` or `git checkout --` unless specifically requested or approved by the user.
241
-
242
- ## Plan tool
243
-
244
- When using the planning tool:
245
-
246
- - Skip using the planning tool for straightforward tasks (roughly the easiest 25%).
247
- - Do not make single-step plans.
248
- - When you made a plan, update it after having performed one of the sub-tasks that you shared on the plan.
249
-
250
- ## Codex CLI harness, sandboxing, and approvals
251
-
252
- The Codex CLI harness supports several different configurations for sandboxing and escalation approvals that the user can choose from.
253
-
254
- Filesystem sandboxing defines which files can be read or written. The options for `sandbox_mode` are:
255
-
256
- - **read-only**: The sandbox only permits reading files.
257
- - **workspace-write**: The sandbox permits reading files, and editing files in `cwd` and `writable_roots`. Editing files in other directories requires approval.
258
- - **danger-full-access**: No filesystem sandboxing - all commands are permitted.
259
-
260
- Network sandboxing defines whether network can be accessed without approval. Options for `network_access` are:
261
-
262
- - **restricted**: Requires approval
263
- - **enabled**: No approval needed
264
-
265
- Approvals are your mechanism to get user consent to run shell commands without the sandbox. Possible configuration options for `approval_policy` are
266
-
267
- - **untrusted**: The harness will escalate most commands for user approval, apart from a limited allowlist of safe "read" commands.
268
- - **on-failure**: The harness will allow all commands to run in the sandbox (if enabled), and failures will be escalated to the user for approval to run again without the sandbox.
269
- - **on-request**: Commands will be run in the sandbox by default, and you can specify in your tool call if you want to escalate a command to run without sandboxing. (Note that this mode is not always available. If it is, you'll see parameters for it in the `shell` command description.)
270
- - **never**: This is a non-interactive mode where you may NEVER ask the user for approval to run commands. Instead, you must always persist and work around constraints to solve the task for the user. You MUST do your utmost best to finish the task and validate your work before yielding. If this mode is paired with `danger-full-access`, take advantage of it to deliver the best outcome for the user. Further, in this mode, your default testing philosophy is overridden: Even if you don't see local patterns for testing, you may add tests and scripts to validate your work. Just remove them before yielding.
271
-
272
- When you are running with `approval_policy == on-request`, and sandboxing enabled, here are scenarios where you'll need to request approval:
273
-
274
- - You need to run a command that writes to a directory that requires it (e.g. running tests that write to /var)
275
- - You need to run a GUI app (e.g., open/xdg-open/osascript) to open browsers or files.
276
- - You are running sandboxed and need to run a command that requires network access (e.g. installing packages)
277
- - If you run a command that is important to solving the user's query, but it fails because of sandboxing, rerun the command with approval. ALWAYS proceed to use the `with_escalated_permissions` and `justification` parameters - do not message the user before requesting approval for the command.
278
- - You are about to take a potentially destructive action such as an `rm` or `git reset` that the user did not explicitly ask for
279
- - (for all of these, you should weigh alternative paths that do not require approval)
280
-
281
- When `sandbox_mode` is set to read-only, you'll need to request approval for any command that isn't a read.
282
-
283
- You will be told what filesystem sandboxing, network sandboxing, and approval mode are active in a developer or user message. If you are not told about this, assume that you are running with workspace-write, network sandboxing enabled, and approval on-failure.
284
-
285
- Although they introduce friction to the user because your work is paused until the user responds, you should leverage them when necessary to accomplish important work. If the completing the task requires escalated permissions, Do not let these settings or the sandbox deter you from attempting to accomplish the user's task unless it is set to "never", in which case never ask for approvals.
286
-
287
- When requesting approval to execute a command that will require escalated privileges:
288
-
289
- - Provide the `with_escalated_permissions` parameter with the boolean value true
290
- - Include a short, 1 sentence explanation for why you need to enable `with_escalated_permissions` in the justification parameter
291
-
292
- ## Special user requests
141
+ ---
293
142
 
294
- - If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as `date`), you should do so.
295
- - If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Findings must be the primary focus of the response - keep summaries or overviews brief and only after enumerating the issues. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
143
+ ## QQ Group
296
144
 
297
- ## Presenting your work and final message
145
+ ![alt text](docs/images/qq_group_qr.jpg)
298
146
 
299
- You are producing plain text that will later be styled by the CLI. Follow these rules exactly. Formatting should make results easy to scan, but not feel mechanical. Use judgment to decide how much structure adds value.
300
147
 
301
- - Default: be very concise; friendly coding teammate tone.
302
- - Ask only when needed; suggest ideas; mirror the user's style.
303
- - For substantial work, summarize clearly; follow final-answer formatting.
304
- - Skip heavy formatting for simple confirmations.
305
- - Don't dump large files you've written; reference paths only.
306
- - No "save/copy this file" - User is on the same machine.
307
- - Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
308
- - For code changes:
309
- - Lead with a quick explanation of the change, and then give more details on the context covering where and why a change was made. Do not start this explanation with "summary", just jump right in.
310
- - If there are natural next steps the user may want to take, suggest them at the end of your response. Do not make suggestions if there are no natural next steps.
311
- - When suggesting multiple options, use numeric lists for the suggestions so the user can quickly respond with a single number.
312
- - The user does not command execution outputs. When asked to show the output of a command (e.g. `git show`), relay the important details in your answer or summarize the key lines so the user understands the result.
148
+ ---
313
149
 
314
- ### Final answer structure and style guidelines
150
+ ## Star History
315
151
 
316
- - Plain text; CLI handles styling. Use structure only when it helps scanability.
317
- - Headers: optional; short Title Case (1-3 words) wrapped in **…**; no blank line before the first bullet; add only if they truly help.
318
- - Bullets: use - ; merge related points; keep to one line when possible; 4–6 per list ordered by importance; keep phrasing consistent.
319
- - Monospace: backticks for commands/paths/env vars/code ids and inline examples; use for literal keyword bullets; never combine with \*\*.
320
- - Code samples or multi-line snippets should be wrapped in fenced code blocks; include an info string as often as possible.
321
- - Structure: group related bullets; order sections general → specific → supporting; for subsections, start with a bolded keyword bullet, then items; match complexity to the task.
322
- - Tone: collaborative, concise, factual; present tense, active voice; self-contained; no "above/below"; parallel wording.
323
- - Don'ts: no nested bullets/hierarchies; no ANSI codes; don't cram unrelated keywords; keep keyword lists short—wrap/reformat if long; avoid naming formatting styles in answers.
324
- - Adaptation: code explanations → precise, structured with code refs; simple tasks → lead with outcome; big changes → logical walkthrough + rationale + next actions; casual one-offs → plain sentences, no headers/bullets.
325
- - File References: When referencing files in your response, make sure to include the relevant start line and always follow the below rules:
326
- - Use inline code to make file paths clickable.
327
- - Each reference should have a stand alone path. Even if it's the same file.
328
- - Accepted: absolute, workspace-relative, a/ or b/ diff prefixes, or bare filename/suffix.
329
- - Line/column (1-based, optional): :line[:column] or #Lline[Ccolumn] (column defaults to 1).
330
- - Do not use URIs like file://, vscode://, or https://.
331
- - Do not provide range of lines
332
- - Examples: src/app.ts, src/app.ts:42, b/server/index.js#L10, C:\repo\project\main.rs:12:5
333
- ```
152
+ [![Star History Chart](https://api.star-history.com/svg?repos=MayDay-wpf/snow-cli&type=Date)](https://star-history.com/#MayDay-wpf/snow-cli&Date)