3 min read
[AI Minor News]

Rescue the 'Lost Code' with Claude Code! A Divine Tool for File Recovery from Complete History is Here


Introducing 'Claude-File-Recovery,' a tool that analyzes Claude Code's session logs (in JSONL) to reconstruct files to a specific point in time.

※この記事はアフィリエイト広告を含みます

[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 ~/.claude to reconstruct created and edited files.
  • Time-based Recovery Support: Not only can you access the latest state, but you can also use the --before flag 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)

🦈 はるサメ厳選!イチオシAI関連
【免責事項 / Disclaimer / 免责声明】
JP: 本記事はAIによって構成され、運営者が内容の確認・管理を行っています。情報の正確性は保証せず、外部サイトのコンテンツには一切の責任を負いません。
EN: This article was structured by AI and is verified and managed by the operator. Accuracy is not guaranteed, and we assume no responsibility for external content.
ZH: 本文由AI构建,并由运营者进行内容确认与管理。不保证准确性,也不对外部网站的内容承担任何责任。
🦈