HeadlinesBriefing favicon HeadlinesBriefing.com

Claude File Recovery Tool Extracts Lost Work from Session Logs

Hacker News •
×

A developer has built claude-file-recovery after Claude Code accidentally deleted his Obsidian vault files through a symlink. The tool extracts files from ~/.claude session history, recovering work that Claude Code read, edited, or wrote. The creator lost research and plan markdown files when Claude Code rm -rf'd real directories it didn't recognize as symlinks.

Built as both CLI tool and TUI, it parses JSONL session transcripts stored in ~/.claude/projects/, reconstructing files by replaying Write, Edit, and Read operations in chronological order. The tool features fuzzy search, vim keybindings, colored diff views, and point-in-time recovery to reconstruct files at any historical snapshot. It can batch-extract multiple files and uses parallel session parsing for speed.

Available on GitHub and PyPI with pip install, the tool requires Python 3.10+ and offers commands like claude-file-recovery list-files and claude-file-recovery extract-files. The interactive TUI lets users browse recovered files, search with fuzzy matching, view diffs between snapshots, and extract to disk. With 18 stars on GitHub, it's positioned as essential insurance for developers using Claude Code who want protection against accidental data loss.