cc-viewer 1.6.262 → 1.6.263
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 +80 -81
- package/cli.js +1 -0
- package/dist/assets/{App-DfhQt_ed.js → App-CX6bF6ke.js} +1 -1
- package/dist/assets/{MdxEditorPanel-j9aQWwCJ.js → MdxEditorPanel--reKHew0.js} +1 -1
- package/dist/assets/{Mobile-0ZF71DQy.js → Mobile-YwIGAQWc.js} +1 -1
- package/dist/assets/{index-DX4SlYho.js → index-DHUf_c1w.js} +2 -2
- package/dist/assets/{index-Dzkxj8m_.css → index-_4BCXKKF.css} +1 -1
- package/dist/assets/seqResourceLoaders-B9D4RGth.js +2 -0
- package/dist/assets/{seqResourceLoaders-DSKrKxVy.css → seqResourceLoaders-DZvMjXCl.css} +2 -2
- package/dist/index.html +2 -2
- package/lib/ask-bridge.js +19 -1
- package/lib/sdk-manager.js +48 -5
- package/package.json +1 -1
- package/server.js +110 -11
- package/dist/assets/seqResourceLoaders-CH1DqmCg.js +0 -2
package/README.md
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
# CC-Viewer
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
Based on Claude Code, a Vibe Coding tool that distills and accumulates real development experience:
|
|
7
7
|
|
|
8
|
-
1.
|
|
9
|
-
2. Multi-device
|
|
10
|
-
3.
|
|
11
|
-
4.
|
|
12
|
-
5. Native experience preserved
|
|
13
|
-
6. Third-party model support
|
|
8
|
+
1. Raise your capability ceiling: run /ultraPlan and /ultraReview locally, while avoiding fully exposing your project code to Claude's cloud;
|
|
9
|
+
2. Multi-device compatibility: code on mobile devices (within your LAN), the web version adapts to all kinds of scenarios, easy to embed into browser extensions or OS split-screen, and native installers are provided;
|
|
10
|
+
3. Complete log tracing: full Claude Code payload interception and analysis — ideal for logging, troubleshooting, learning, and reverse engineering;
|
|
11
|
+
4. Shared learning and experience: lots of learning material and development know-how are baked in (see the "?" icons throughout the system);
|
|
12
|
+
5. Native experience preserved: only enhances Claude Code's capabilities without making any substantive changes to the core, keeping the native experience intact;
|
|
13
|
+
6. Third-party model support: compatible with deepseek-v4-\*, GLM 5.1, Kimi K2.6, with cc-switch built in so you can hot-swap third-party tools at any time;
|
|
14
14
|
|
|
15
15
|
English | [简体中文](./docs/README.zh.md) | [繁體中文](./docs/README.zh-TW.md) | [한국어](./docs/README.ko.md) | [日本語](./docs/README.ja.md) | [Deutsch](./docs/README.de.md) | [Español](./docs/README.es.md) | [Français](./docs/README.fr.md) | [Italiano](./docs/README.it.md) | [Dansk](./docs/README.da.md) | [Polski](./docs/README.pl.md) | [Русский](./docs/README.ru.md) | [العربية](./docs/README.ar.md) | [Norsk](./docs/README.no.md) | [Português (Brasil)](./docs/README.pt-BR.md) | [ไทย](./docs/README.th.md) | [Türkçe](./docs/README.tr.md) | [Українська](./docs/README.uk.md)
|
|
16
16
|
|
|
@@ -18,8 +18,8 @@ English | [简体中文](./docs/README.zh.md) | [繁體中文](./docs/README.zh-
|
|
|
18
18
|
|
|
19
19
|
### Prerequisites
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
* Make sure nodejs 20.0.0+ is installed; [Download and install](https://nodejs.org)
|
|
22
|
+
* Make sure claude code is installed; [Installation guide](https://github.com/anthropics/claude-code)
|
|
23
23
|
|
|
24
24
|
### Install ccv
|
|
25
25
|
|
|
@@ -34,64 +34,65 @@ npm install -g cc-viewer --registry=https://registry.npmjs.org
|
|
|
34
34
|
```bash
|
|
35
35
|
brew tap weiesky/cc-viewer
|
|
36
36
|
brew install cc-viewer
|
|
37
|
-
brew upgrade cc-viewer #
|
|
37
|
+
brew upgrade cc-viewer # use this to upgrade; do NOT use npm install -g to upgrade a brew-installed ccv
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
-
###
|
|
40
|
+
### How to start
|
|
41
41
|
|
|
42
|
-
ccv is a drop-in replacement for claude — all arguments are passed through to claude while
|
|
42
|
+
ccv is a drop-in replacement for claude — all arguments are passed through to claude while the Web Viewer is launched alongside it.
|
|
43
43
|
|
|
44
44
|
```bash
|
|
45
45
|
ccv # == claude (interactive mode)
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
The
|
|
48
|
+
The command I use most often is:
|
|
49
|
+
|
|
49
50
|
```
|
|
50
51
|
ccv -c --d # == claude --continue --dangerously-skip-permissions
|
|
51
|
-
# ccv passes through
|
|
52
|
+
# ccv passes through every Claude Code launch argument — feel free to combine them however you like
|
|
52
53
|
```
|
|
53
54
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
CC-Viewer also ships as a native desktop app: [Download page](https://github.com/weiesky/cc-viewer/releases)
|
|
55
|
+
Once started in programming mode, the web page opens automatically.
|
|
57
56
|
|
|
57
|
+
cc-viewer also ships as a native desktop app: [download page](https://github.com/weiesky/cc-viewer/releases)
|
|
58
58
|
|
|
59
|
-
### Logger
|
|
59
|
+
### Logger mode
|
|
60
60
|
|
|
61
61
|
If you still prefer the native claude tool or the VS Code extension, use this mode.
|
|
62
62
|
|
|
63
|
-
In this mode, launching `claude` will automatically start a logging process that records request logs to
|
|
63
|
+
In this mode, launching `claude` will automatically start a logging process that records request logs to \~/.claude/cc-viewer/*yourproject*/date.jsonl
|
|
64
64
|
|
|
65
65
|
Enable logger mode:
|
|
66
|
+
|
|
66
67
|
```bash
|
|
67
68
|
ccv -logger
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
When the console cannot print
|
|
71
|
+
When the console cannot print a specific port, the default first port is 127.0.0.1:7008. If multiple instances exist, ports increment sequentially — 7009, 7010, and so on.
|
|
71
72
|
|
|
72
73
|
Uninstall logger mode:
|
|
74
|
+
|
|
73
75
|
```bash
|
|
74
76
|
ccv --uninstall
|
|
75
77
|
```
|
|
76
78
|
|
|
77
79
|
### Troubleshooting
|
|
78
80
|
|
|
79
|
-
If you
|
|
80
|
-
|
|
81
|
-
Step 1: Open Claude Code in any directory.
|
|
82
|
-
|
|
81
|
+
If you run into start-up issues, here's the ultimate troubleshooting recipe:
|
|
82
|
+
Step 1: Open Claude Code in any directory;
|
|
83
83
|
Step 2: Give Claude Code the following instruction:
|
|
84
84
|
|
|
85
85
|
```
|
|
86
|
-
I have installed the cc-viewer npm package, but
|
|
86
|
+
I have installed the cc-viewer npm package, but running ccv still doesn't work properly. Check cc-viewer's cli.js and findcc.js and adapt them to the local Claude Code deployment based on the specific environment. Keep the scope of changes confined to findcc.js as much as possible.
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
Letting Claude Code diagnose the
|
|
89
|
+
Letting Claude Code diagnose the problem on its own is more effective than asking anyone or reading any documentation!
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Once the instruction is done, `findcc.js` will have been updated. If your project frequently needs local deployment, or your forked code often runs into installation issues, just keep this file — next time you can simply copy it over. At this stage many projects and companies use Claude Code on server-side hosted deployments rather than on Mac, so I split out `findcc.js` to make it easier to keep tracking upstream cc-viewer source updates.
|
|
92
92
|
|
|
93
|
+
Note: this app conflicts with claude-code-switch and claude-code-router — there is a proxy contention problem, so make sure you turn off claude-code-switch and claude-code-router when using it. cc-viewer provides built-in proxy hot-reload that can replace them.
|
|
93
94
|
|
|
94
|
-
### Other
|
|
95
|
+
### Other helper commands
|
|
95
96
|
|
|
96
97
|
See:
|
|
97
98
|
|
|
@@ -103,98 +104,96 @@ ccv -h
|
|
|
103
104
|
|
|
104
105
|
By default, `ccv` runs in silent mode when wrapping `claude`, keeping your terminal output clean and consistent with the native experience. All logs are captured in the background and can be viewed at `http://localhost:7008`.
|
|
105
106
|
|
|
106
|
-
Once configured, use the `claude` command as
|
|
107
|
-
|
|
107
|
+
Once configured, just use the `claude` command as usual. Visit `http://localhost:7008` to open the monitoring UI.
|
|
108
108
|
|
|
109
109
|
## Features
|
|
110
110
|
|
|
111
|
+
### Programming mode
|
|
111
112
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
After launching with ccv, you can see:
|
|
115
|
-
|
|
116
|
-
<img width="1500" height="765" alt="image" src="https://github.com/user-attachments/assets/ab353a2b-f101-409d-a28c-6a4e41571ea2" />
|
|
117
|
-
|
|
113
|
+
After launching with ccv you'll see:
|
|
118
114
|
|
|
119
|
-
|
|
115
|
+
<img height="765" width="1500" alt="image" src="https://github.com/user-attachments/assets/ab353a2b-f101-409d-a28c-6a4e41571ea2" />
|
|
120
116
|
|
|
121
|
-
|
|
117
|
+
You can view the code diff directly right after an edit:
|
|
122
118
|
|
|
123
|
-
|
|
119
|
+
<img height="728" width="1500" alt="image" src="https://github.com/user-attachments/assets/2a4acdaa-fc5f-4dc0-9e5f-f3273f0849b2" />
|
|
124
120
|
|
|
125
|
-
|
|
121
|
+
While you can open files and code by hand, that's not recommended — that's the old-school way!
|
|
126
122
|
|
|
127
|
-
|
|
123
|
+
### Mobile programming
|
|
128
124
|
|
|
129
|
-
|
|
130
|
-
<img width="1700" height="790" alt="image" src="https://github.com/user-attachments/assets/da3e519f-ff66-4cd2-81d1-f4e131215f6c" />
|
|
125
|
+
You can even scan a QR code and code from a mobile device:
|
|
131
126
|
|
|
132
|
-
|
|
127
|
+
<img height="1460" width="3018" alt="image" src="https://github.com/user-attachments/assets/8debf48e-daec-420c-b37a-609f8b81cd20" />
|
|
133
128
|
|
|
129
|
+
<img height="790" width="1700" alt="image" src="https://github.com/user-attachments/assets/da3e519f-ff66-4cd2-81d1-f4e131215f6c" />
|
|
134
130
|
|
|
135
|
-
|
|
131
|
+
Everything you imagined about mobile coding — plus a plugin mechanism: if you need to customize for your own coding habits, stay tuned for plugin hook updates.
|
|
136
132
|
|
|
137
|
-
|
|
133
|
+
### Logger mode (view the complete Claude Code session)
|
|
138
134
|
|
|
135
|
+
<img height="768" width="1500" alt="image" src="https://github.com/user-attachments/assets/a8a9f3f7-d876-4f6b-a64d-f323a05c4d21" />
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
* Captures every API request from Claude Code in real time, guaranteeing the raw payload rather than a censored log (this matters a lot!!!)
|
|
138
|
+
* Automatically identifies and labels Main Agent and Sub Agent requests (subtypes: Plan, Search, Bash)
|
|
139
|
+
* MainAgent requests support Body Diff JSON, showing only the diff against the previous MainAgent request (only changed/added fields) in a collapsed view
|
|
140
|
+
* Each request inlines Token usage stats (input/output tokens, cache creation/read, hit rate)
|
|
141
|
+
* Compatible with Claude Code Router (CCR) and other proxy scenarios — falls back to matching requests by API path pattern
|
|
145
142
|
|
|
146
|
-
### Conversation
|
|
143
|
+
### Conversation mode
|
|
147
144
|
|
|
148
|
-
Click the "Conversation Mode" button
|
|
145
|
+
Click the "Conversation Mode" button at the top right to parse the Main Agent's full conversation history into a chat interface:
|
|
149
146
|
|
|
150
|
-
<img
|
|
147
|
+
<img height="764" width="1500" alt="image" src="https://github.com/user-attachments/assets/725b57c8-6128-4225-b157-7dba2738b1c6" />
|
|
151
148
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
149
|
+
* Agent Team display is not yet supported
|
|
150
|
+
* User messages are right-aligned (blue bubbles), Main Agent replies are left-aligned (dark bubbles)
|
|
151
|
+
* `thinking` blocks are collapsed by default and rendered as Markdown — click to expand and view the reasoning; one-click translation is supported (still unstable)
|
|
152
|
+
* User-selection messages (AskUserQuestion) are displayed in Q&A form
|
|
153
|
+
* Two-way mode sync: switching to Conversation mode auto-scrolls to the conversation that matches the selected request; switching back to the raw mode auto-scrolls to the selected request
|
|
154
|
+
* Settings panel: toggle the default collapsed state of tool results and thinking blocks
|
|
155
|
+
* Mobile conversation browsing: in mobile CLI mode, tap the "Conversation Browse" button in the top bar to slide out a read-only conversation view and browse the full history on your phone
|
|
159
156
|
|
|
160
|
-
### Log
|
|
157
|
+
### Log management
|
|
161
158
|
|
|
162
|
-
|
|
159
|
+
From the CC-Viewer dropdown menu in the top-left:
|
|
163
160
|
|
|
164
|
-
<img
|
|
161
|
+
<img height="760" width="1500" alt="image" src="https://github.com/user-attachments/assets/33295e2b-f2e0-4968-a6f1-6f3d1404454e" />
|
|
165
162
|
|
|
166
|
-
**Log
|
|
167
|
-
Regarding logs,
|
|
163
|
+
**Log compression**
|
|
164
|
+
Regarding logs, I want to state clearly that I haven't modified Anthropic's official definition — log integrity is guaranteed.
|
|
165
|
+
However, individual log entries for the 1M Opus model can get extremely large in later stages. Thanks to some log optimizations applied to MainAgent, the size can be reduced by at least 66% even without gzip.
|
|
166
|
+
The parser for these compressed logs can be extracted from the current repository.
|
|
168
167
|
|
|
169
|
-
### More
|
|
168
|
+
### More handy useful features
|
|
170
169
|
|
|
171
|
-
<img
|
|
170
|
+
<img height="767" width="1500" alt="image" src="https://github.com/user-attachments/assets/add558c5-9c4d-468a-ac6f-d8d64759fdbd" />
|
|
172
171
|
|
|
173
|
-
You can quickly locate your prompts
|
|
172
|
+
You can quickly locate your prompts via the sidebar tools.
|
|
174
173
|
|
|
175
|
-
|
|
174
|
+
***
|
|
176
175
|
|
|
177
|
-
<img
|
|
176
|
+
<img height="765" width="1500" alt="image" src="https://github.com/user-attachments/assets/82b8eb67-82f5-41b1-89d6-341c95a047ed" />
|
|
178
177
|
|
|
179
|
-
The interesting KV-Cache-Text feature
|
|
178
|
+
The interesting KV-Cache-Text feature shows you exactly what Claude sees.
|
|
180
179
|
|
|
181
|
-
|
|
180
|
+
***
|
|
182
181
|
|
|
183
|
-
<img
|
|
182
|
+
<img height="765" width="1500" alt="image" src="https://github.com/user-attachments/assets/54cdfa4e-677c-4aed-a5bb-5fd946600c46" />
|
|
184
183
|
|
|
185
|
-
You can upload images and describe your needs — Claude's image understanding is
|
|
184
|
+
You can upload images and describe your needs — Claude's image understanding is remarkably strong, and as you know, you can paste images directly with Ctrl + V; the full content shows up in the conversation.
|
|
186
185
|
|
|
187
|
-
|
|
186
|
+
***
|
|
188
187
|
|
|
189
|
-
<img
|
|
188
|
+
<img height="370" width="600" alt="image" src="https://github.com/user-attachments/assets/87d332ea-3e34-4957-b442-f9d070211fbf" />
|
|
190
189
|
|
|
191
|
-
You can customize plugins, manage all
|
|
190
|
+
You can customize plugins directly, manage all cc-viewer processes, and cc-viewer supports hot-switching to third-party APIs (yes, you can use GLM, Kimi, MiniMax, Qwen, DeepSeek — though I think they're all rather weak at the moment).
|
|
192
191
|
|
|
193
|
-
|
|
192
|
+
***
|
|
194
193
|
|
|
195
|
-
<img
|
|
194
|
+
<img height="746" width="1500" alt="image" src="https://github.com/user-attachments/assets/b1f60c7c-1438-4ecc-8c64-193d21ee3445" />
|
|
196
195
|
|
|
197
|
-
More features waiting to
|
|
196
|
+
More features waiting for you to discover... for example: the system supports Agent Team and ships with a built-in Code Reviewer. Codex Code Reviewer integration is coming very soon (I strongly recommend using Codex to review Claude Code's code).
|
|
198
197
|
|
|
199
198
|
## License
|
|
200
199
|
|
package/cli.js
CHANGED
|
@@ -472,6 +472,7 @@ async function runSdkMode(extraClaudeArgs = [], cwd, noOpen = false) {
|
|
|
472
472
|
|
|
473
473
|
// 注册 SDK 回调到 server.js(WS 消息路由用)
|
|
474
474
|
serverMod.setSdkResolveApproval(sdkManager.resolveApproval);
|
|
475
|
+
serverMod.setSdkCancelApproval(sdkManager.cancelApproval);
|
|
475
476
|
serverMod.setSdkSendUserMessage(sdkManager.sendUserMessage);
|
|
476
477
|
|
|
477
478
|
// 自动打开浏览器
|