ClaudeMods
☰
ZH-TW
● 0 人在線上 · 瀏覽 0 次
贊助提交作品
Reddit 貼文 · 發布者 xzwache

Claude Time Machine:Claude Code 的復原功能,連 Bash 執行的 rm、格式化工具與程式碼產生器都能還原

一個 Claude Code 外掛,在每次工具呼叫前後替專案拍快照,讓 /tm undo 能還原檔案,包括 /rewind 涵蓋不到、經由 Bash 做的改動。

已翻譯

關於這個 mod

作者介紹 Claude Time Machine,一個在本機執行、採用 MIT 授權的 Claude Code 外掛。它在每次工具呼叫前後替專案拍快照,底層就是一般的 git,不消耗 token。

動機是:代理出現幻覺、用 Bash 執行了破壞性的指令時,/rewind 只能復原用檔案工具做的編輯。

/tm undo 可以還原檔案,包括經由 Bash 做的改動,例如 rm、格式化工具和程式碼產生器。

需求:Claude Code 2.1.287 以上,支援 macOS 或 Linux。安裝只要兩行指令。儲存庫在 https://github.com/xzwache/claude-time-machine,貼文附有預覽截圖。

安裝

安裝方式請查看原始來源。

原文 / README

Hey folks, I kept running into the same thing: the agent would hallucinate, run something through Bash and break local changes I hadn't pushed yet. /rewind doesn't help there, it only covers edits made with the file tools. I made a small plugin that snapshots the project around every tool call. /tm undo puts the files back, including what was changed through Bash. https://preview.redd.it/l47u6hp3n3uh1.png?width=1080&format=png&auto=webp&s=2f0c17d01c21fa189dbcd45f5b143518173c5a77 How Claude helped: - Generated most of the code, I set the design and reviewed it. - Claude Code in cloud did a lot of testing It's local, plain git underneath, no tokens. Needs Claude Code 2.1.287+, macOS or Linux. Free and open source (MIT). Install is two commands. Repo: https://github.com/xzwache/claude-time-machine Built it with the new Claude Code mods. I'd be glad to hear what you think: what works, what breaks, what's missing submitted by /u/xzwache [link] [comments]

更多類似作品