For Claude Code — free · MIT · 100% local

Search and replay every Claude Code session you’ve ever run — locally.

Your ~/.claude/projects/ folder holds everything your agent ever did — every prompt, tool call, diff, and dollar — in files nobody can read.

Turnlog turns it into an index: full-text search, turn-by-turn replay, live — and your agent can query it too. All on your machine.

GitHub

No download · no account · no cloud

MIT licensed · no telemetry fifteen seconds to first search

About

Not a log viewer. An index.

Plenty of tools render a session transcript nicely. The problem isn’t rendering — a transcript has no structure, so finding anything means scrolling, same as scrolling your live chat.

Turnlog imposes structure: an FTS5 index across your entire history; inside each session an outline, folding, and go-to — the way an IDE makes a 5,000-line file navigable.

And because it’s an index, not a viewer, other things can ask it questions: your searches, your spend queries, your agent.

More on GitHub
  1. 01Search everythingFTS5 · operators
  2. 02Turn spineoutline
  3. 03File historyblame
  4. 04Spend & tokens$ / day
  5. 05Live~1s
  6. 06Agent memoryMCP

Features

Six ways in, one index underneath.

Every view is the same SQLite index wearing a different lens — search it, outline it, trace one file through it, price it, watch it live, or hand it to your agent.

View the source
01 — Search

Search everything

Full-text across your whole history, identifiers included — and filters that compose: tool:Bash is:error project:api before:2026-07. Save the searches you keep running.

FTS5 · tool: is: before:
02 — Replay

Turn spine

A 5,000-message session collapses to ten scannable turns — your prompts — each summarized mechanically: reads, edits, commands, errors. Expand only what matters; bookmark the moments worth keeping.

?l=diffs · bookmarks
03 — File history

File history

Pick any file and read every change any session ever made to it, in order, with jumps back into context. Git blame, but for agent edits.

/api/files · diffs in order
04 — Spend

Spend & tokens, answerable

Cost by day, model, project — and by search query: what did this kind of work cost me? Plus a calendar of when you work and what your history weighs on disk.

est. · counted once per response
05 — Live

Live

The UI updates about a second after your agent acts; running sessions carry a pulsing dot. Watch it happen, replay it after.

SSE · ~1s latency
06 — Agent memory

Agent memory

One command turns your history into a read-only MCP server: your agent recalls how past work was done — “how did we fix this last month?” — without leaving your machine.

claude mcp add turnlog

Agent memory

Your agent can remember now.

Every Claude Code session you’ve ever run is sitting on your disk. turnlog mcp serves that history to the agent itself — read-only, over stdio, zero network. Ask Claude “how did we handle auth retries last month?” and it queries your own past instead of guessing.

Read-only · stdio · 5 tools · zero network

Privacy & open source

Turnlog binds to 127.0.0.1 only. Every request requires a per-launch random token; Host and Origin are validated as a DNS-rebinding defense. Your sessions never leave the machine — check for yourself.

Local means verifiable, not promised.

Verifiable at every level

One listener, bound to loopback.

No accounts, no telemetry, no analytics in the app — the product never reports on you. The MCP server is read-only and speaks only stdio: it cannot write and it cannot phone home. One honest exception: at launch the app asks npm whether a newer version exists. Turn it off with TURNLOG_NO_UPDATE_CHECK=1 and nothing dials out at all. This marketing site is a separate thing and does use analytics — the details are in the privacy policy.

Free and open source

Free. MIT‑licensed. No limits.

Index and open every session, with nothing gated. Turnlog began as a $19 product; that model was dropped and it shipped MIT instead — the source is the pitch.

  • 01Every feature included — no accounts, no keys
  • 02Two dependencies: better-sqlite3 · chokidar
  • 03No postinstall scripts, ever
  • 04Every version stays installable via npm
  • 05Node 22+ · macOS, Linux, Windows

Published from CI with sigstore provenance — the tarball verifiably built from this repo. Changelog

FAQ

The honest answers.

01What’s the catch? Why free?

No catch. It started as a $19 product; partway through I dropped that model and shipped it MIT instead. If it’s useful, star the repo and report the weird JSONL files it chokes on.

02Does anything leave my machine?

Your sessions don’t. The server is loopback-only and token-gated, with no telemetry, no analytics, and no accounts. One honest exception: at launch the CLI asks the npm registry whether a newer version exists — set TURNLOG_NO_UPDATE_CHECK=1 (or "checkUpdates": false) to switch it off, and the lsof one-liner above shows every listener either way.

03What does “agent memory” actually mean?

turnlog mcp is a local MCP server over your session index — read-only, stdio, five tools (search, list sessions, get session, get messages, file history). Claude Code queries your own history mid-task instead of asking you to re-explain it.

04How accurate are the cost numbers?

Labeled estimates, priced from a table shipped inside the package, counted once per API response. An early version overcounted by roughly 2.5–3× — Claude Code repeats the same usage object on every content-block line — and fixing that is why the numbers are trustworthy now. Cache reads and writes are priced by TTL.

05How is this different from ccusage?

ccusage is the standard for usage stats and Turnlog doesn’t replace it. Turnlog is search and replay — the one cost view it adds is cost filtered by a content search, which needs the index.

06Claude Code changes its log format. Will this break?

Eventually, briefly, yes — the format is undocumented. Parsing sits behind a version-sniffing adapter; unknown records are kept raw and rendered collapsed instead of crashing, and fixes ship same-day via npm. The index health panel shows you the count, so drift is a number on screen instead of silent data loss.

07Can I share a session?

Export any session as markdown, or as one self-contained styled HTML page that loads nothing from the network. Pass --redact to scrub API-key-shaped tokens, JWTs, key=value secrets, email addresses, and home-directory paths before it leaves your machine.

08Only Claude Code?

For now. The internal model is provider-agnostic; Codex CLI, Gemini CLI, and other adapters are on the roadmap — see the roadmap for what’s next and what Turnlog will never do.

09Can I use it on a work machine?

It’s MIT, local-only, and reads only ~/.claude/projects/. Whether your sessions themselves are sensitive is between you and your employer — Turnlog adds no new exposure.

10Windows?

Yes — macOS, Linux, Windows on Node 22+. If better-sqlite3 prebuilds fail on your setup, that’s the bug report I want most.

Start

One command · nothing leaves your machine

Your whole history, one search away.

npm i -g turnlog to keep it around · claude mcp add turnlog to give your agent memory