NewsWorld
PredictionsDigestsScorecardTimelinesArticles
NewsWorld
HomePredictionsDigestsScorecardTimelinesArticlesWorldTechnologyPoliticsBusiness
AI-powered predictive news aggregation© 2026 NewsWorld. All rights reserved.
Trending
FebruaryChinaSignificantMilitaryTimelineDigestFaceDiplomaticFederalTurkeyFridayTrumpDrugGovernanceTensionsCompanyStateIranParticularlyEscalatingCaliforniaTargetingNuclearDespite
FebruaryChinaSignificantMilitaryTimelineDigestFaceDiplomaticFederalTurkeyFridayTrumpDrugGovernanceTensionsCompanyStateIranParticularlyEscalatingCaliforniaTargetingNuclearDespite
All Articles
Show HN: Claude-File-Recovery, recover files from your ~/.claude sessions
Hacker News
Published about 10 hours ago

Show HN: Claude-File-Recovery, recover files from your ~/.claude sessions

Hacker News · Feb 27, 2026 · Collected from RSS

Summary

Claude Code deleted my research and plan markdown files and informed me: “I accidentally rm -rf'd real directories in my Obsidian vault through a symlink it didn't realize was there: I made a mistake. “ Unfortunately the backup of my documentation accidentally hadn’t run for a month. So I built claude-file-recovery, a CLI-tool and TUI that is able to extract your files from your ~/.claude session history and thankfully I was able to recover my files. It's able to extract any file that Claude Code ever read, edited or wrote. I hope you will never need it, but you can find it on my GitHub and pip. Note: It can recover an earlier version of a file at a certain point in time. pip install claude-file-recovery Comments URL: https://news.ycombinator.com/item?id=47182387 Points: 11 # Comments: 4

Full Article

claude-file-recovery Recover files created and modified by Claude Code from its JSONL session transcripts — even if you lost track of them across sessions. Claude Code stores a full log of every tool call in ~/.claude/projects/. This tool parses those transcripts, replays Write, Edit, and Read operations in order, and reconstructs the files so you can browse, search, and extract them. Features Interactive TUI with fuzzy search and vim keybindings (j/k/g/G, / to search) Point-in-time recovery — reconstruct files at any historical snapshot, not just the latest Colored diff view showing how files changed over time (unified, full-context, and raw modes) Batch extraction — select multiple files and extract them all at once Fast scanning — parallel session parsing with orjson and fast-reject byte checks that skip ~77% of lines before parsing Symlink deduplication — detects aliased paths and merges them into canonical entries Smart-case search — case-sensitive only when your query contains uppercase (like ripgrep) Installation # Recommended uv tool install claude-file-recovery # Or with pipx pipx install claude-file-recovery # Or with pip pip install claude-file-recovery Requires Python 3.10+. Quick Start # Launch the interactive TUI (default command) claude-file-recovery # List all recoverable files claude-file-recovery list-files # Filter by pattern claude-file-recovery list-files --filter '*.py' # Export as CSV claude-file-recovery list-files --filter '*.ts' --csv # Extract files to disk claude-file-recovery extract-files --output ./recovered --filter '*.py' # Recover files as they were before a certain time claude-file-recovery list-files --before '2025-02-20 14:00' # Point to a different Claude data directory claude-file-recovery --claude-dir /path/to/claude-backup How It Works Scan — Discovers all JSONL session files under ~/.claude/projects/ and parses them in parallel using a thread pool. A fast-reject byte check skips progress and history-snapshot lines (~77% of all lines) before touching the JSON parser. Correlate — Links tool-use requests in assistant messages to their results in user messages via tool_use_id. This is how file content (which only appears in results, not requests) gets attached to each operation. Reconstruct — Replays operations in chronological order per file path. Write ops set content, Edit ops apply string replacements, and Read ops capture snapshots. The --before flag uses binary search to cut off at any point in time. Present — The TUI lets you browse all recovered files, search with fuzzy matching, view colored diffs between snapshots, and batch-extract to disk. TUI Keybindings Key Action j / k Move up/down g / G Jump to top/bottom / Search Ctrl+R Cycle search mode (fuzzy / glob / regex) x or Space Toggle file selection Enter View file detail + diffs d Cycle diff mode (unified / full-context / raw) Ctrl+E Extract selected files q Back / quit Contributing Contributions are welcome! Feel free to open an issue or submit a pull request. License MIT — Rikkert ten Klooster


Share this story

Read Original at Hacker News

Related Articles

Hacker Newsabout 1 hour ago
Statement on the comments from Secretary of War Pete Hegseth

Article URL: https://www.anthropic.com/news/statement-comments-secretary-war Comments URL: https://news.ycombinator.com/item?id=47188697 Points: 88 # Comments: 11

Hacker Newsabout 2 hours ago
We Will Not Be Divided

Article URL: https://notdivided.org Comments URL: https://news.ycombinator.com/item?id=47188473 Points: 284 # Comments: 68

Hacker Newsabout 3 hours ago
Qt45: A small polymerase ribozyme that can synthesize itself

Article URL: https://www.science.org/doi/10.1126/science.adt2760 Comments URL: https://news.ycombinator.com/item?id=47187649 Points: 37 # Comments: 4

Hacker Newsabout 3 hours ago
Show HN: I built a site where you hire yourself instead of applying for jobs

Article URL: https://hired.wtf Comments URL: https://news.ycombinator.com/item?id=47187450 Points: 3 # Comments: 1

Hacker Newsabout 3 hours ago
Emuko: Fast RISC-V emulator written in Rust, boots Linux

Article URL: https://github.com/wkoszek/emuko Comments URL: https://news.ycombinator.com/item?id=47187121 Points: 9 # Comments: 0

Hacker Newsabout 4 hours ago
I am directing the Department of War to designate Anthropic a Supply-Chain Risk

https://xcancel.com/secwar/status/2027507717469049070 https://www.cnbc.com/2026/02/27/trump-anthropic-ai-pentagon.... Comments URL: https://news.ycombinator.com/item?id=47186677 Points: 515 # Comments: 374