Session parsing, timeline generation, and HTML/video rendering
Find a file
Snider 5dc4078611 chore: bump go directive to 1.26.0
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 20:33:48 +00:00
docs docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
analytics.go feat(parser): Phase 1+2 — parse stats, truncation detection, session analytics 2026-02-20 07:40:52 +00:00
analytics_test.go feat(parser): Phase 1+2 — parse stats, truncation detection, session analytics 2026-02-20 07:40:52 +00:00
bench_test.go feat(parser): Phase 1+2 — parse stats, truncation detection, session analytics 2026-02-20 07:40:52 +00:00
CLAUDE.md docs: graduate TODO/FINDINGS into production documentation 2026-02-20 15:01:55 +00:00
go.mod chore: bump go directive to 1.26.0 2026-02-22 20:33:48 +00:00
go.sum test(phase0): add comprehensive test suite — 51 tests, 90.9% coverage 2026-02-20 00:42:11 +00:00
html.go feat: extract go-session from core/go pkg/session 2026-02-19 16:09:12 +00:00
html_test.go test: add comprehensive Phase 0 test suite — 67 tests, 90.9% coverage 2026-02-20 05:01:28 +00:00
parser.go feat(parser): add robustness for truncated JSONL and malformed lines 2026-02-20 14:34:43 +00:00
parser_test.go feat(parser): add robustness for truncated JSONL and malformed lines 2026-02-20 14:34:43 +00:00
README.md docs: add README with quick start and docs links 2026-02-20 15:11:20 +00:00
search.go feat(parser): Phase 1+2 — parse stats, truncation detection, session analytics 2026-02-20 07:40:52 +00:00
search_test.go test: add comprehensive Phase 0 test suite — 67 tests, 90.9% coverage 2026-02-20 05:01:28 +00:00
video.go feat: extract go-session from core/go pkg/session 2026-02-19 16:09:12 +00:00
video_test.go test: add comprehensive Phase 0 test suite — 67 tests, 90.9% coverage 2026-02-20 05:01:28 +00:00

go-session

Claude Code JSONL transcript parser, analytics engine, and HTML timeline renderer. Parses Claude Code session files into structured event arrays (tool calls with round-trip durations, user and assistant messages), computes per-tool analytics (call counts, error rates, average and peak latency, estimated token usage), renders self-contained HTML timelines with collapsible panels and client-side search, and generates VHS tape scripts for MP4 video output. No external runtime dependencies — stdlib only.

Module: forge.lthn.ai/core/go-session Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import "forge.lthn.ai/core/go-session"

sess, stats, err := session.ParseTranscript("/path/to/session.jsonl")
analytics := session.Analyse(sess)
fmt.Println(session.FormatAnalytics(analytics))

// Render interactive HTML timeline
err = session.RenderHTML(sess, "timeline.html")

// Search across all sessions in a directory
results, err := session.Search("~/.claude/projects/my-project", "git commit")

Documentation

  • Architecture — JSONL format, parsing pipeline, event types, analytics, HTML rendering, XSS protection
  • Development Guide — prerequisites, build, test patterns, coding standards
  • Project History — completed phases, known limitations, future considerations

Build & Test

go test ./...
go vet ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.