Live timestamps and speaker labels for every Claude Code conversation. Every exchange shows who said what and when — visible to both you and Claude. Search, browse, and export your full conversation history by time and speaker.
Zero dependencies. Pure Node.js stdlib. Works with all existing sessions.
Claude Code stores timestamps on every message but never shows them. You can't see when a conversation happened, you can't tell who said what at a glance, and Claude can't reason about time. 25 issues filed on anthropics/claude-code asking for this — zero shipped.
This fixes it.
npx github:ProducerGuy/claude-timecodes installThat's it. The installer:
- Copies the hook script to
~/.claude/timecode.sh - Adds hooks to
~/.claude/settings.json(UserPromptSubmit, Stop, PostToolUse) - Auto-detects your display name from your Anthropic account
- Auto-detects your home timezone
- Saves config to
~/.claude/timecodes.json
Every Claude Code session from that point forward shows timestamped speaker labels on every exchange.
Every exchange shows who said it and when:
Producer · 2:44:51 PM CDT
Claude · 2:44:53 PM CDT
Claude · 2:44:55 PM CDT · Bash
- Your messages show your Anthropic display name (e.g.
Producer) - Claude's responses show
Claude - Tool calls show
Claudewith the tool name (e.g.Bash,Edit,Read)
Claude also sees timecodes in its context, so it can answer questions like "how long did that take?" or "what did I work on an hour ago?"
# List all sessions with start/end times and duration
claude-timecodes sessions
# View a full conversation with timestamps on every message
claude-timecodes view <session-id>
# Search across all conversations
claude-timecodes search "authentication bug"
# Search only your messages or only Claude's
claude-timecodes search "bug" --role me
claude-timecodes search "bug" --role claude
# Filter by date
claude-timecodes search --date 2026-04-01
# Filter by time range
claude-timecodes search --from "2026-04-01 14:00" --to "2026-04-01 15:00"
# Jump to an exact timecode with surrounding context
claude-timecodes at "2026-04-01 14:32:15"
# Export a session to markdown
claude-timecodes export <session-id>
claude-timecodes export <session-id> -o session.md
# Launch browser-based viewer
claude-timecodes webPartial session IDs work — you only need the first few characters.
claude-timecodes web opens a local browser UI with:
- Session list sidebar with dates and durations
- Full conversation view with timestamps on every message
- Search across all sessions with highlighted results
- Click any timecode to copy it
- Timeline visualization of session activity
On install, your home timezone is auto-detected. When you're home, timestamps are clean:
Producer · 2:44:51 PM CDT
When you travel, both timezones show automatically:
Producer · 4:44:51 AM JST (2:44:51 PM CDT)
Your local time is primary. Your home time shows in parentheses so teammates and logs stay in sync. When you're home, the parenthetical doesn't appear.
# Show current config
claude-timecodes config
# Change display name
claude-timecodes config --name "Your Name"
# Change home timezone
claude-timecodes config --timezone America/New_York# Default — 12-hour with date and timezone
claude-timecodes sessions
# 04/01/2026, 02:44:51 PM CDT
# Short — time only
claude-timecodes view <id> --format short
# 2:44:51 PM
# 24-hour
claude-timecodes view <id> --format 24h
# 04/01/2026, 14:44:51 CDT
# ISO 8601
claude-timecodes view <id> --format iso
# 2026-04-01T19:44:51.031Znpx github:ProducerGuy/claude-timecodes uninstallRemoves the hooks from settings.json. Your conversation data is untouched.
Claude Code already stores ISO 8601 timestamps on every message in JSONL files at ~/.claude/projects/. This tool:
- Hooks — A bash script (
~/.claude/timecode.sh) fires on three events:UserPromptSubmit— showsProducer · 2:44:51 PM CDTto user, injects timecode into Claude's contextStop— showsClaude · 2:44:53 PM CDTto userPostToolUse— showsClaude · 2:44:55 PM CDT · Bashto user, injects tool timecode into Claude's context
- CLI — Reads the JSONL files, parses timestamps, converts to local time, and presents them with speaker labels and color-coded output
- Web viewer — Local HTTP server serving a single-page app that hits JSON APIs backed by the same JSONL parser
- Node.js 18+
jq(for the hook script — pre-installed on most systems)- Claude Code
This project addresses 25 open and closed issues on anthropics/claude-code requesting timestamps and speaker labels. See ISSUES.md for the full list with authors, details, and coverage status.