weavr 1.1.0

Claude Code transcript exporter — beautiful, self-contained HTML and Markdown
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# weavr

[![CI](https://github.com/deepakkumardewani/weavr/actions/workflows/ci.yml/badge.svg)](https://github.com/deepakkumardewani/weavr/actions/workflows/ci.yml)
[![Crates.io](https://img.shields.io/crates/v/weavr.svg)](https://crates.io/crates/weavr)
[![Crates.io Downloads](https://img.shields.io/crates/d/weavr.svg)](https://crates.io/crates/weavr)
[![Rust](https://img.shields.io/badge/rust-1.80%2B-orange.svg)](https://www.rust-lang.org)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![100% local](https://img.shields.io/badge/100%25%20local-no%20AI-brightgreen.svg)]()

A fast, self-contained Rust CLI that converts Claude Code transcript JSONL files into beautiful HTML and Markdown.

`weavr` is a Rust reimplementation of [claude-code-log](https://github.com/daaain/claude-code-log), focused on speed, zero-dependency output artefacts, and a clean Material 3 design.

[![weavr in action](demo.gif)](demo.gif)

## Navigation

- [Why weavr?]#why-weavr
- [How it works]#how-it-works
- [Quickstart]#quickstart
- [Two modes]#two-modes
- [Key Features]#key-features
- [Installation]#installation
- [Usage]#usage
  - [Basic export]#basic-export
  - [Markdown export]#markdown-export
  - [All projects (batch)]#all-projects-batch
  - [Filtering]#filtering
  - [Pagination]#pagination
  - [Cache & output control]#cache--output-control
- [Output Formats]#output-formats
- [Performance]#performance
- [Roadmap]#roadmap
- [License]#license

## Why weavr?

[claude-code-log](https://github.com/daaain/claude-code-log) proved how useful it is to turn raw Claude Code transcripts into readable artefacts. weavr is a ground-up Rust rewrite around two goals:

- **Speed.** Single-pass JSONL parser, in-memory session DAG, and SQLite cache for incremental rebuilds. **18–46× faster** than the Python tool (see [Performance]#performance).
- **Design.** Material 3 light/dark theme, flat dot-timeline, rich inline tool rendering (Bash IN/OUT, diffs, modals for Skill/Agent). Every HTML file is **fully self-contained** — fonts, CSS, JS all embedded. A CI gate rejects any external URL.

Single static binary via `brew`, `cargo binstall`, or `cargo install`, with built-in `self-update`. No Python runtime needed.

### weavr vs. claude-code-log

|                                               | **weavr** (Rust)                               | **claude-code-log** (Python) |
| --------------------------------------------- | ---------------------------------------------- | ---------------------------- |
| Speed (all projects)                          | **~1.3 s**                                     | ~24 s                        |
| Speed (single session)                        | **~28 ms**                                     | ~1.3 s                       |
| Distribution                                  | single static binary (brew / binstall / cargo) | `uvx` / `pip` (needs Python) |
| Self-contained output                         | ✅ zero external URLs (CI-enforced)            | partial                      |
| Incremental rebuilds                          | ✅ SQLite cache                                | ⚠️ re-renders each run       |
| Theme                                         | Material 3 light/dark, dot-timeline            | minimalist HTML              |
| HTML export                                   |||
| Markdown export + detail levels + `--compact` |||
| Token usage tracking                          |||
| Date-range filtering (natural language)       |||
| Client-side filter chips + in-page search     || ✅ (runtime filtering)       |
| Multi-project hierarchy + master index        |||
| Self-update command                           |||

Both tools share the same JSONL input format. If you live in the terminal and want an interactive TUI today, claude-code-log is great. If you want the fastest possible export and offline-portable HTML, reach for weavr.

## How it works

```
 ~/.claude/projects/
   ├── my-project/session.jsonl          (Claude Code transcripts)
   └── other-app/session.jsonl
   ┌─────────────────────────────────────────────┐
   │  weavr                                      │
   │  ─────────────────────────────────────────  │
   │  JSONL parser → session DAG → SQLite cache  │
   │                     │                       │
   │              HTML renderer                  │
   │        (Material 3 · dot-timeline ·         │
   │         tool cards · diffs · search)        │
   └─────────────────────────────────────────────┘
   weavr-out/
   ├── index.html                        (master index, searchable)
   ├── my-project/combined_transcripts.html
   └── my-project/session.html           (fully self-contained)
```

Every output file is a **single portable HTML** — fonts, CSS, JS all embedded. No server, no CDN, no runtime. No AI involved — your transcripts never leave your machine.

## Quickstart

**1. Install**

```sh
brew install deepakkumardewani/weavr/weavr
# or: cargo binstall weavr
# or: cargo install weavr
```

**2. Export a session**

```sh
weavr -i ~/.claude/projects/my-project/session.jsonl
# → writes session.html
```

**3. Export everything**

```sh
weavr --all-projects --open-browser
# → walks ~/.claude/projects/, generates weavr-out/, opens index.html
```

## Two modes

weavr has two distinct operating modes:

| Mode            | Command                          | Produces                                  |
| --------------- | -------------------------------- | ----------------------------------------- |
| **Batch**       | `weavr` / `weavr --all-projects` | HTML index + per-session + combined pages |
| **Single-file** | `weavr export <INPUT>`           | one file (HTML or Markdown)               |

**Batch mode** walks `~/.claude/projects/` and generates a complete static site. It's HTML-only — no `--format` / `--detail` / `--compact` flags here.

**Single-file mode** (`weavr export`) gives you full control over format, detail level, and compactness. All format-related flags live on the `export` subcommand:

```sh
weavr export --help   # see all export options
```

The `-i` shorthand is a convenience alias for `export <INPUT>` (HTML only, full detail).

## Key Features

- **Self-Contained HTML** — fonts, CSS tokens, assets all embedded inline; CI-enforced
- **Light/Dark Themes** — Material 3 warm-neutral tokens; dark by default, toggle persisted to localStorage
- **Markdown Export**`--format md` with five `--detail` levels and `--compact` mode
- **Flat Dot-Timeline** — chronological event stream: user messages, assistant text, thinking, tool calls
- **Rich Tool Rendering** — Bash IN/OUT, Read/Edit/Write diffs with intra-line highlights, Skill/Agent modals
- **Token Usage Tracking** — per-message and per-session input/output/cache tokens
- **Multi-Project Export**`--all-projects` generates a navigable static site with master index
- **SQLite Cache** — fast incremental rebuilds; `--clear-cache` / `--no-cache` for control
- **Interactive HTML** — filter chips, in-page search (150ms debounce), theme toggle, project search, card/list view
- **Zero-Config** — sensible defaults; point at a JSONL file and go
- **100% Local** — pure offline tool; no AI used, no data sent anywhere, your transcripts stay on your machine

## Installation

### Via Homebrew (macOS)

```sh
brew install deepakkumardewani/weavr/weavr
```

### Via cargo-binstall

```sh
cargo binstall weavr
```

Fetches the latest prebuilt binary from GitHub Releases. Falls back to building from source if no matching binary is found.

### Via cargo install

```sh
cargo install weavr
```

Builds from source on crates.io. Requires Rust 1.80+.

### Direct download

Prebuilt binaries are on the [GitHub Releases](https://github.com/deepakkumardewani/weavr/releases) page. Download the `.tar.gz` for your platform, extract, and place `weavr` on your `PATH`.

| Platform              | Target triple              |
| --------------------- | -------------------------- |
| macOS (Apple Silicon) | `aarch64-apple-darwin`     |
| Linux (x86_64)        | `x86_64-unknown-linux-gnu` |

> Intel macOS has no prebuilt binary — install via `cargo install weavr`, or run the Apple Silicon build under Rosetta 2.

### From source

```sh
git clone https://github.com/deepakkumardewani/weavr.git
cd weavr
cargo build --release
# binary is at target/release/weavr
```

### Updating

```sh
weavr self-update       # update to the latest GitHub Release
```

A passive notice is printed when a newer version is available (throttled to once per 24 h). Set `WEAVR_NO_UPDATE_CHECK=1` to disable.

Package-manager installs should use their native update commands:

```sh
brew upgrade weavr                  # Homebrew
cargo install --force weavr         # cargo install
cargo binstall --force weavr        # cargo-binstall
```

### Requirements

- Rust 1.80+ (source builds only; prebuilt binaries have no dependencies)

## Usage

### Basic export

```sh
weavr export session.jsonl
# writes session.html
```

```sh
weavr export session.jsonl -o /tmp/review.html --open-browser
```

```sh
weavr -i session.jsonl
# shorthand — equivalent to `export <INPUT>` (HTML only, full detail)
```

```sh
weavr -i session.jsonl --output-dir ~/desktop
# places session.html in ~/desktop/
```

`--open-browser` is a global flag — it works with all modes (`export`, `-i`, and `--all-projects`).

**Example output:**

```
Exported → ~/desktop/session.html

  Format:    HTML
  Messages:  106
  Tokens:    43,950 in / 110,380 out
  Took:      8ms
```

Token counts display with thousands separators and switch to `M` notation above one million (e.g. `1.23M`, `12.5M`).

### Markdown export

```sh
weavr export session.jsonl --format md
# writes session.md
```

**Detail levels:**

```sh
weavr export session.jsonl --format md --detail full       # everything (default)
weavr export session.jsonl --format md --detail high       # messages + tool calls, no thinking
weavr export session.jsonl --format md --detail low        # messages only, no tool calls
weavr export session.jsonl --format md --detail minimal    # user + assistant text only
weavr export session.jsonl --format md --detail user-only  # user prompts only
```

| Level       | Includes                                                                |
| ----------- | ----------------------------------------------------------------------- |
| `user-only` | User prompts only — good input for an agent building a requirements doc |
| `minimal`   | User + assistant text                                                   |
| `low`       | + Key tool signals (WebSearch, WebFetch, Task delegations)              |
| `high`      | + All tool calls; drops thinking blocks and system metadata             |
| `full`      | Everything — thinking, system entries, all tool calls (default)         |

**Feeding a past session to an LLM:**

```sh
weavr export session.jsonl --format md --detail low --compact -o context.md
```

`--compact` strips timestamps, horizontal rules, and merges repeated same-type headings — significantly reducing token count.

### All projects (batch)

```sh
weavr --all-projects
# walks ~/.claude/projects/ and generates weavr-out/
#   index.html
#   <project>/combined_transcripts.html
#   <project>/<session>.html
```

```sh
weavr --all-projects --projects-dir /path/to/projects --output-dir ./out
```

```sh
weavr --all-projects --no-individual-sessions
# skip per-session HTML; only index + combined pages
```

```sh
weavr --all-projects --open-browser
# opens index.html in the default browser when done
```

**Example output:**

```
Exporting 160 sessions across 10 projects → ./weavr-out

  ✓ my-project    49 sessions
  ✓ other-app     13 sessions
  ✓ index.html

Done: 162 sessions

  Format:    HTML (full)
  Messages:  26,289
  Tokens:    17.7M in / 11.1M out
  Took:      673ms
```

### Filtering

<details><summary>Date-range, project, and session filtering</summary>

**By project:**

```sh
weavr --all-projects --project cclog
# exports only the project whose name contains "cclog" (case-insensitive)
```

```sh
weavr --all-projects --project addy --output-dir ./out --open-browser
# partial match — "addy" matches "addyosmaniskills", "addy-osmani", etc.
```

`--project` does a case-insensitive substring match against both the internal directory name and the display name. Multiple projects can match. Exits with an error if nothing matches.

**By date:**

```sh
weavr export session.jsonl --from-date yesterday --to-date today
weavr --all-projects --from-date 2025-06-01 --to-date 2025-06-30
```

Accepts: `today`, `yesterday`, `last week`, `last month`, and ISO dates (`YYYY-MM-DD`). Sessions whose timestamp range doesn't overlap the filter window are skipped.

**By session ID:**

```sh
weavr --all-projects --session-id 6162c547
# exports only the matching session (prefix match)
```

</details>

### Pagination

<details><summary>Split long sessions across multiple HTML files</summary>

```sh
weavr export session.jsonl --page-size 50
# splits into session-page-1.html, session-page-2.html, ...
```

`--page-size N` sets messages per page. The first page includes the full chrome; subsequent pages are content-only.

</details>

### Cache & output control

<details><summary>Cache, output directory, and debug flags</summary>

```sh
weavr --all-projects --no-cache      # skip cache entirely
weavr --all-projects --clear-cache   # drop and rebuild cache
```

```sh
weavr --all-projects --clear-output   # delete output dir before writing
```

```sh
weavr --debug export session.jsonl   # enable tracing output
weavr --debug --all-projects         # verbose logging for all-projects mode
```

</details>

## Output Formats

### HTML

- Warm-neutral light/dark theme with embedded design tokens
- Tool calls rendered as collapsible cards with syntax highlighting
- Unified diff view for `Edit` / `MultiEdit` tool calls
- Token usage displayed per message and as a session total
- Thinking blocks in expandable sections
- 100% self-contained — verified by a CI test that rejects any `http(s)://` URL in the output

### Markdown

- GitHub-Flavored Markdown compatible
- Tool calls collapse to fenced code blocks with the tool name and key parameters
- Diffs rendered as ` ```diff ` blocks with unified `+/-` hunks
- `--compact` and `--detail` work orthogonally

## Performance

Benchmarked with [`hyperfine`](https://github.com/sharkdp/hyperfine) (warmup + multiple runs, no cache) on Apple Silicon against `claude-code-log` over the same input. Re-run any time with `just bench`.

| Mode                               | weavr (Rust) | claude-code-log (Python) | Speedup   |
| ---------------------------------- | ------------ | ------------------------ | --------- |
| All projects (160 sessions, 97 MB) | **1.32 s**   | 24.10 s                  | **18.2×** |
| Single project (42 sessions)       | **466 ms**   | 9.68 s                   | **20.8×** |
| Single session (19 MB, ~500 msgs)  | **27.5 ms**  | 1.28 s                   | **46.5×** |

Full methodology and optimization details in [agent_docs/weavr-bench-results.md](agent_docs/weavr-bench-results.md).

## Roadmap

### Done (v1.0)

- [x] Single-session HTML export with rich tool rendering
- [x] Markdown export with detail levels (`full`/`high`/`low`/`minimal`/`user-only`) + `--compact`
- [x] Project hierarchy + master index + per-project combined pages
- [x] SQLite cache for fast incremental rebuilds
- [x] Material 3 light/dark theme with flat dot-timeline
- [x] Client-side interactivity — filter chips, in-page search, theme toggle, sidebar nav
- [x] Date-range filtering with natural language (`today`, `yesterday`, `last week`)
- [x] Pagination for long sessions
- [x] Self-contained output (zero external URLs, CI-enforced)
- [x] Multi-channel install (brew, binstall, cargo) + `self-update`

### Done (post-v1.0)

- [x] **Per-project export**`--project <name>` filters batch export to matching projects (case-insensitive partial match)
- [x] **`--output-dir` with `-i`** — single-session shorthand now places output in the specified directory
- [x] **Global `--open-browser`** — works with `export`, `-i`, and `--all-projects` (opens `index.html` in batch mode)
- [x] **Improved CLI output** — colored progress (`` per project), elapsed time (`Took:`), `M`-notation for large token counts, aligned stats block consistent across all modes

### Planned

- [ ] **Interactive TUI** — terminal-based transcript browser
- [ ] **Interactive timeline** — zoomable, time-grouped view of message activity
- [ ] **Image rendering** — inline display of images embedded in transcripts
- [ ] **JSON export**`--format json` for programmatic consumption
- [ ] **Windows support** — currently macOS and Linux only
- [ ] **Cost estimation** — per-session API cost breakdown
- [ ] **Live HTML sharing** — deploy generated output to a hosted URL for one-click viewing and sharing in the browser

## License

MIT