@5n7/clv 0.1.0 → 0.2.0
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 +5 -2
- package/dist/cli.js +374 -374
- package/dist/template.html +316 -316
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# clv
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
`clv` turns Markdown that Claude Code writes into a rich, live preview you can read in any browser. Claude embeds small JSON blocks (`` ```clv:<type> ``) in its review or explanation output; `clv` parses them, validates each against a schema, and renders them as callouts, annotated code, diffs, charts, dependency graphs, step-by-step walkthroughs, and more.
|
|
4
6
|
|
|
5
7
|
- **Live preview** — `clv review.md` opens the document in your browser and live-reloads it on every save, preserving scroll position.
|
|
6
|
-
- **Multi-file** — point `clv` at several files or a directory and navigate them from a sidebar (flat/tree view, filename/heading-title toggle, search) at one localhost address.
|
|
8
|
+
- **Multi-file** — point `clv` at several files or a directory and navigate them from a sidebar (flat/tree view, filename/heading-title toggle, search) at one localhost address. Files are grouped by their GitHub `owner/repo` automatically, or under a name you pass with `-g`/`--group`. Hover a file row or group header for a `×` that closes it (dropping it from the session, never deleting it from disk).
|
|
7
9
|
- **Background daemon** — re-running `clv` adds files to the already-running session instead of starting a new server; the open files are persisted and restored on restart.
|
|
8
10
|
- **Static export** — `clv --output out.html` writes a single self-contained HTML file (all JS, CSS, fonts, and images inlined; no network calls). Open it offline, email it, or commit it.
|
|
9
11
|
- **Graceful** — unknown or malformed blocks render as a clearly marked fallback instead of failing the whole document.
|
|
@@ -38,7 +40,7 @@ bunx @5n7/clv notes.md design.md
|
|
|
38
40
|
bun run src/cli/index.ts review.md
|
|
39
41
|
```
|
|
40
42
|
|
|
41
|
-
`clv <paths...>` starts (or reuses) a background live preview server on `localhost:7421` and opens your browser to it. The paths may be files or directories; `clv` watches them and live-reloads the browser whenever a file changes, preserving scroll position. When more than one file is open, a sidebar lets you navigate between them and the active file is reflected in the URL (`?file=<id>`).
|
|
43
|
+
`clv <paths...>` starts (or reuses) a background live preview server on `localhost:7421` and opens your browser to it. The paths may be files or directories; `clv` watches them and live-reloads the browser whenever a file changes, preserving scroll position. When more than one file is open, a sidebar lets you navigate between them and the active file is reflected in the URL (`?file=<id>`). Files are organized into collapsible sidebar groups: by default each file is grouped by the GitHub `owner/repo` of the repository its own directory belongs to (files outside any repo fall under `"default"`), so opening files from several repos keeps them visually separated. Pass `-g`/`--group <name>` to put the files from that invocation under an explicit name instead. Hovering a file row or group header reveals a `×` that closes it — removing the file (or every file in the group) from the session. Nothing is deleted from disk, and the removal is persisted, so a closed file does not reappear when the daemon restarts.
|
|
42
44
|
|
|
43
45
|
The server runs as a detached daemon and outlives the command that launched it. Re-running `clv` with new paths registers them into the running session rather than spawning a second server, and the open files are persisted so they reappear if the daemon is restarted.
|
|
44
46
|
|
|
@@ -86,6 +88,7 @@ claude -p "review this PR" | bunx @5n7/clv
|
|
|
86
88
|
| `-w`, `--watch` | on | Watch files and live-reload. On by default; use `--no-watch` to disable. |
|
|
87
89
|
| `--no-watch` | — | Disable file watching / live-reload. |
|
|
88
90
|
| `-R`, `--recursive` | false | Recurse into subdirectories when a directory is given. |
|
|
91
|
+
| `-g`, `--group <name>` | auto | Group files under `<name>` in the sidebar. When omitted, each file is grouped by the GitHub `owner/repo` of its own repo, else `"default"`. |
|
|
89
92
|
| `--no-open` | false | Do not auto-launch the browser. |
|
|
90
93
|
| `--title <string>` | `"clv"` | HTML `<title>`. |
|
|
91
94
|
| `--theme <auto\|light\|dark>` | `auto` | Color scheme. `auto` follows `prefers-color-scheme`. |
|