[AI Minor News Flash] Rescue the ‘Lost Code’ with Claude Code! A Divine Tool for File Recovery from Complete History is Here
📰 News Overview
- Recovery from Claude Code Logs: A new tool has been released that parses session history in JSONL format stored in
~/.claudeto reconstruct created and edited files. - Time-based Recovery Support: Not only can you access the latest state, but you can also use the
--beforeflag to recreate file states at specific past points in time. - Advanced TUI Included: This tool features an interactive interface that allows you to search for files and extract them in bulk while checking the differences in changes.
💡 Key Points
- Reconstructing through ‘Replay’ of Actions: Instead of just text extraction, this tool restores files by re-executing Write, Edit, and Read actions in chronological order.
- Blazing Fast Scanning Speed: Thanks to the use of orjson and a high-speed determination algorithm that skips about 77% of unnecessary log lines, it can process large session logs in an instant.
- User-friendly Operation: With TUI supporting Vim key bindings and smart case-sensitive searches, it is designed to be intuitive for developers.
🦈 Sharky’s Perspective (Curator’s View)
It’s super cool that Claude Code has tapped into the “execution logs” it quietly accumulates! When you find yourself asking, “Where’s that code from back then?” the idea of replaying actions from the logs to reconstruct files is just brilliant. The implementation that allows pinpoint recovery of a specific date and time using binary search is truly a time machine for developers!
🚀 What’s Next?
As agent-based AI tools like Claude Code become the norm, we can expect a rise in peripheral tools that manage and utilize “AI work logs” as valuable assets, just like this one. A future where AI automatically digs up your deleted code is right around the corner!
💬 Sharky’s Takeaway
There’s a treasure trove of data lying dormant in those logs! With this tool, you won’t have to fear an agent going rogue and altering your files! It’s a big bite of recovery! 🦈🔥
📚 Glossary
-
JSONL: A data format where each line contains a standalone JSON object, commonly used for log files.
-
TUI (Text User Interface): An interface for graphical operations on the terminal that allows smooth navigation without a mouse.
-
Point-in-time recovery: A technology that restores data to the state it was in at a “specific moment” before a fault or error occurred.
-
Source: Claude-File-Recovery (GitHub)