跳到正文
原文
Reddit · ClaudeCode / Codex / VibeCoding· /u/xzwache·· 1天前AI 评分69

为 Claude Code 做的撤销插件,覆盖 Bash 的 rm、格式化和代码生成改动

原文标题:Built an undo for Claude Code that also covers Bash (rm, formatters, codegen)

AI 导读

作者做了一个 Claude Code 插件,在每次工具调用前后对项目做快照,用 /tm undo 把文件恢复,包括通过 Bash 改动的部分,弥补 /rewind 只覆盖文件工具编辑的缺口。

正文

当前语言的正文正在等待翻译,暂时显示原文。

Built an undo for Claude Code that also covers Bash (rm, formatters, codegen)

Hey folks,

The thing I kept running into: 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/vnutp4a6ipth1.png?width=2108&format=png&auto=webp&s=a79747a1fc780553b51e10d516668e6ca798429b

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, they're in the README.

Repo: https://github.com/xzwache/claude-time-machine

How Claude helped:
- Generated most of the code, I set the design and reviewed it.
- Claude Code in cloud did a lot of the testing: it wrote the tests and ran them for me

Built it with the new Claude Code mods. If you try it, tell me where it breaks.

submitted by /u/xzwache to r/ClaudeCode
[link] [留言]

来源:Reddit · ClaudeCode / Codex / VibeCoding · reddit.com