cc-plan-viewer 0.1.0 → 0.2.2
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 +47 -9
- package/dist/cli-bundle.mjs +28407 -0
- package/dist/client/assets/index-DjikHpVb.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server/bin/cc-plan-viewer.js +336 -66
- package/dist/server/server/app.js +171 -0
- package/dist/server/server/app.test.js +154 -0
- package/dist/server/server/index.js +18 -157
- package/dist/server/server/lifecycle.test.js +101 -0
- package/dist/server/server/planParser.test.js +104 -0
- package/dist/server/server/planWatcher.test.js +100 -0
- package/dist/server/server/reviewStore.test.js +88 -0
- package/dist/server-bundle.mjs +27988 -0
- package/hooks/plan-viewer-hook.cjs +19 -16
- package/package.json +30 -9
- package/dist/client/assets/index-CFUAZEOC.css +0 -1
- /package/dist/client/assets/{index-B9Ku0w1F.js → index-BRrHI1zG.js} +0 -0
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# cc-plan-viewer
|
|
2
2
|
|
|
3
|
-
A browser-based review UI for Claude Code plans. When Claude Code enters plan mode, a browser tab opens automatically showing the plan
|
|
3
|
+
A browser-based review UI for Claude Code plans. When Claude Code enters plan mode, a browser tab opens automatically showing the plan with proper markdown rendering, syntax highlighting, and inline commenting.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Select any text, add comments, copy your feedback to clipboard, and paste it back in the terminal.
|
|
6
|
+
|
|
7
|
+

|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -10,7 +12,23 @@ A browser-based review UI for Claude Code plans. When Claude Code enters plan mo
|
|
|
10
12
|
npx cc-plan-viewer install
|
|
11
13
|
```
|
|
12
14
|
|
|
13
|
-
This adds a PostToolUse hook to your Claude Code settings
|
|
15
|
+
This copies the viewer to `~/.cc-plan-viewer/` and adds a PostToolUse hook to your Claude Code settings. Everything persists — no dependency on npm cache.
|
|
16
|
+
|
|
17
|
+
### Custom settings path
|
|
18
|
+
|
|
19
|
+
If you use a custom Claude Code configuration (e.g. aliases like `claude-work` with a different settings file):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx cc-plan-viewer install --config ~/.claude-work/settings.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Update
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npx cc-plan-viewer@latest update
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Downloads the latest version from npm and updates the files in `~/.cc-plan-viewer/`. The hook in your settings stays the same — no reconfiguration needed.
|
|
14
32
|
|
|
15
33
|
## Uninstall
|
|
16
34
|
|
|
@@ -18,15 +36,35 @@ This adds a PostToolUse hook to your Claude Code settings that automatically ope
|
|
|
18
36
|
npx cc-plan-viewer uninstall
|
|
19
37
|
```
|
|
20
38
|
|
|
39
|
+
Removes the hook from settings and deletes `~/.cc-plan-viewer/`.
|
|
40
|
+
|
|
41
|
+
If you used a custom config path:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx cc-plan-viewer uninstall --config ~/.claude-work/settings.json
|
|
45
|
+
```
|
|
46
|
+
|
|
21
47
|
## How it works
|
|
22
48
|
|
|
23
|
-
1. Claude Code writes a plan file
|
|
24
|
-
2. A PostToolUse hook detects
|
|
25
|
-
3. The plan
|
|
26
|
-
4. Select any text to add inline comments
|
|
27
|
-
5. Copy
|
|
49
|
+
1. Claude Code writes a plan file (e.g. `~/.claude/plans/fancy-name.md`)
|
|
50
|
+
2. A PostToolUse hook detects the write and opens a browser tab
|
|
51
|
+
3. The plan renders with proper headings, code blocks, tables, and syntax highlighting
|
|
52
|
+
4. Select any text to add inline comments — they appear pinned to the right margin
|
|
53
|
+
5. Click **"Copy feedback to clipboard"** and paste it in the terminal when Claude asks
|
|
54
|
+
|
|
55
|
+
A lightweight local server runs on demand (port 3847) and auto-shuts down after 30 minutes of inactivity. No data leaves your machine.
|
|
56
|
+
|
|
57
|
+
## What gets installed
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
~/.cc-plan-viewer/
|
|
61
|
+
├── plan-viewer-hook.cjs # PostToolUse hook script
|
|
62
|
+
├── server/ # Express server (compiled)
|
|
63
|
+
├── client/ # React SPA (built)
|
|
64
|
+
└── version.json # Installed version info
|
|
65
|
+
```
|
|
28
66
|
|
|
29
|
-
|
|
67
|
+
Your `settings.json` gets one entry added to the `PostToolUse` hooks array. All existing settings are preserved.
|
|
30
68
|
|
|
31
69
|
## Requirements
|
|
32
70
|
|