Time Machine

A Claude Code mod that shows git state

·

source at 93fa0f7

·

Apache-2.0 license

Agent Time Machine: a branching timeline of tool calls with shadow-git snapshots — inspect, diff, explain test failures, restore, branch, compare, re-run

0 installs

What this mod can do

  • Reviewed at commit 93fa0f7
  • Runs programs
  • Runs Claude Code's tools, such as Bash and Edit, which still pass the session's permission check
  • Writes files
  • Reads environment variables
  • Sees each tool call before it runs and can block or change it
  • Also uses $.session.append, which this page doesn't describe yet
5 more things it can do
  • Reads files
  • Remembers data between sessions
  • Adds the /tm-pane command
  • Adds the /tm command
  • Runs on a timer
Good to know (3)
  • Needs git. Snapshots live in ~/.claude/time-machine, never in your own .git
  • /tm restore is a dry run until you add --yes, which rewrites your project files
  • If the baseline snapshot takes over 5 seconds, snapshots turn off and the timeline keeps going
Are mods safe?

Preview

Terminal

⎿ time-machine: Time Machine pane opened (shown in the terminal and the desktop app). ╭────────────────────────────────────────────────────────────────────────────────────────────────✕─╮ │ Session b8e1c0d2 · branch main · 5 step(s) · 1 snapshot(s), avg 40ms │ │ storage: recording │ │ │ │ │ ├── ⓪ baseline │ │ │ └── snapshot 259be7b · 6 file(s) │ │ ├── ① Bash npm test │ │ │ └── ✗ 1 failed, 2 passed │ │ ├── ② Read src/sum.js │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ⚠ time-machine: tm ⑤ · 1 snaps · 40ms · recording

Claude Desktop

Time Machine in Claude Desktop

What it does

Records every tool call on a branching timeline with snapshots of your files, so you can see any step, diff two steps, find what broke a test and restore.

What you see
A timeline pane and a status entry
Works in
Terminal and Claude Desktop
Slash commands
/tm-pane, /tm
Uses your tokens
No
Changes files
Snapshots in ~/.claude/time-machine, yours on restore
Network access
Only through programs it runs
Reviewed commit
93fa0f7
Preview recorded with
Claude Code 2.1.296

How it works

  1. Takes a baseline snapshot before the first tool call that can change files
  2. After each Edit, Write or Bash call, commits your files to a separate shadow git repo
  3. /tm-pane opens a live timeline of steps, with test results and snapshots
  4. /tm diff, /tm why and /tm restore compare steps, name suspects and roll back

More like this

  • Mod
  • Git
  • 3 installs
Filetree in Claude Desktop

An IDE-style file tree for Claude Code that shows what Claude is doing and where in files

╭─ CONTEXT ────────────────────────────────────────────╮ │ ████▊░░░░░░░░░░░░░░░░░ 22% of 200K · GOOD │ ├─ STATS ──────────────────────────────────────────────┤ │ ↓ 44.0K ↑ 1.4K │ $0.41 │ ⏱ 10m 12s │ +128/-34 │ ├─ REPO ───────────────────────────────────────────────┤ │ ◆ Opus 4.8 · main · 16:21 │ ╰──────────────────────────────────────────────────────╯

A boxed multi-line panel with auto-sizing borders: a context section with a gradient bar and status word, a stats section (tokens, cost, duration, lines changed), and a repo section (model, git branch with file counts, clock, vim mode), in a terracotta Claude-brand palette.

app · main · Opus-4.8 · effort high · ctx 22% · 5h 26% ↻2h6m · 7d 7% ↻2d0h

One-line status bar showing your directory, git branch (with a * when dirty), model, live effort level, context-window usage, and 5-hour/7-day rate-limit usage.

Opus 4.8 [high] ~/app main 16:20:55 | ⛁ ██░░░░░░░░ 22% | 5h ●◔○○○ 26% ↻2h7m | 7d ◔○○○○○○ 7% ↻2d1h │ $0.41 ⏱ 10m

Two-line status with a block context bar and quarter-step dot meters (◔◑◕●) for the 5-hour and weekly limits (fill shows usage, color shows whether you are ahead of or behind pace), plus model, effort, git and cost. Needs no jq.

████▊░░░░░░░░░░░░░░░░░ 22% of 200K · GOOD │ ↓ 44.0K ↑ 1.4K │ $0.41 │ ⏱ 10m 12s │ +128/-34 │ ◆ Opus 4.8 · main · 16:22

One-line adaptation of @kyleledbetter's Dreambase Panel: a context bar with status word, token/cost/duration/lines-changed stats, and model + git branch + clock, all on a single line in a terracotta Claude-brand palette.