Skip to content

Conversation

@mikaylathompson
Copy link

I really like having the full, browseable html for all sessions and wanted it to stay up to date as I worked so I could quickly refer back to recent sessions. Thought it might be useful for others!

Adding --watch keeps the process running and looking for changes to the source directory. If a change is relevant, the html of that transcript will be regenerated.

$ uv run claude-code-transcripts all --watch
Generating initial archive...
Scanning [...]/.claude/projects...
Found 10 projects with 131 sessions

Generating archive in [...]/claude-archive...
...
Generated archive with 10 projects, 131 sessions
Output: [...]/claude-archive

Watching [...]/.claude/projects for changes...
Press Ctrl+C to stop.

Regenerating 1 changed file(s)...
Generated page-001.html
Generated page-002.html
Generated page-003.html
Generated page-004.html
Generated [...]/claude-archive/hackathon/7656055b-d709-4241-ba15-6aa962b8b659/index.html (16 prompts, 4 pages)
Regenerated 1 session(s) (0.3s)

Signed-off-by: Mikayla Thompson <mikayla@ranger.net>
When using --watch, subsequent updates now only regenerate the individual
files that changed, rather than regenerating the entire dataset. This
significantly improves performance for large session archives.

Changes:
- TranscriptWatcher now tracks which files have changed
- New generate_incremental_html() function handles partial updates
- Only affected session HTML, project indexes, and master index are updated
- Initial generation still does a full rebuild

Test coverage added for all new functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant