viberevert
VibeRevert 记录一次 AI 编码会话,使用确定性规则标记有风险的变化,并可将你的项目文件恢复到会话开始前的精确状态,包括你尚未提交的工作。
没有 AI 来评判 AI: 风险发现是可复现、可解释的,并且基于你可以检查的规则。
继续使用你的编码代理。 VibeRevert 在会话周围增加了安全层——适用于 Claude Code、Cursor 和其他编码代理工作流。
实际的 CLI,摘自一次真实的 beta 支付运行——check 会标记它,而 rollback 会在你 --apply 之前预览它将更改的内容:
$ viberevert check
risk: CRITICAL · payments
app/api/checkout/route.ts payments (critical)
app/api/webhooks/stripe/route.ts payments (critical)
$ viberevert rollback <session> # preview — nothing changed yet
package.json tracked_restored
app/page.tsx tracked_restored
app/api/checkout/route.ts untracked_deleted
app/api/webhooks/stripe/route.ts untracked_deleted
lib/stripe.ts untracked_deleted
.gitignore README.md (your uncommitted work) skipped_unchanged证明,而非承诺
3 次真实的 AI 编码会话。3 次精确的项目文件恢复。 支付、数据库迁移和部署基础设施——所有预先存在的未提交工作都得以保留。阅读 beta 报告 →
Related MCP server: uacos
快速开始
在 Git 仓库内工作,需要 Node.js 22+。VibeRevert 将记录保存在你的机器上,不需要 VibeRevert 账户或托管服务。
npm install -g viberevert@betaviberevert init # one-time setup in your project
viberevert run <your-agent> # records the session and saves your files' starting state
viberevert check # see what changed and what looks risky
viberevert rollback <session> # preview putting your files back; add --apply to restore它能保护你免受什么
你让一个 AI 代理在你的项目中工作,而它触及的范围超出了你的预期——也许是支付代码、数据库迁移、部署文件——而你自己的工作还没完成,就那样未提交地放在那里。VibeRevert 首先捕获你项目的起始文件状态,这样你不喜欢的会话就不会浪费你一下午。
VibeRevert 做什么
在每次 AI 编码会话前后,VibeRevert:
首先为你的项目创建检查点 —— 工作树、暂存更改和未跟踪文件,包括你尚未提交的工作。
记录会话以及运行期间更改的项目文件。
标记有风险的编辑 —— 涉及身份验证、支付、数据库、密钥、依赖项或基础设施的更改(风险分类)。
根据这些发现编写代理可用的修复提示,以便粘贴到你的下一次迭代中。
在需要时将文件恢复到检查点。
它会警告你;它不会静默阻止你的工作。可选的 pre-commit 钩子可以拒绝超过你配置的风险阈值的提交——可选择、可调优,并且像任何本地 Git 钩子一样可以绕过。
规则决定。代理修复。
VibeRevert 不会询问另一个语言模型你的代理的更改是否有风险。它的检查是确定性的:相同的输入和配置产生相同的发现,每个标记都有可检查的原因。
当有事情需要关注时,VibeRevert 可以将这些发现转化为代理可用的修复提示。规则决定标记什么;你决定接下来发生什么。
回滚恢复什么——以及不恢复什么
viberevert rollback 将你的本地项目文件——已跟踪、已暂存和未跟踪的文件,包括未提交的工作——恢复到会话开始时的状态。它默认预览;--apply 写入更改,并且每次应用都会先保存一个紧急检查点。
它不会撤销项目文件之外的影响。部署、数据库写入、第三方 API 调用、支付和已发送的电子邮件需要各自的恢复。回滚是基于状态的,而不是原子的,它是 AI 会话周围的安全网,而不是测试或审查的替代品。在依赖它之前,请阅读回滚能恢复什么,不能恢复什么。
跨编码代理的一个恢复层
继续使用你喜欢的编码工具。VibeRevert 可以包装命令行代理会话(viberevert run <your-agent>),并通过其安装程序与 Claude Code 和 Cursor 等工具集成。
内置检查点位于代理的工作流中。VibeRevert 与项目同在。
它捕获你项目的起始状态——包括未提交的工作——然后记录会话、标记有风险的更改、预览回滚,并将该恢复路径保留在代理本身之外。
今天使用 Claude Code,明天使用 Cursor,或者包装另一个终端代理:安全层与你的项目同在。
将其接入你的工具
VibeRevert 以非破坏性方式安装,并且可以干净地移除。它与 Claude Code 和 Cursor(MCP 服务器和钩子)集成;每次安装都会预览其更改并保留恢复日志。请参阅入门。
一个实验性的终端桥接(--pty)可以拦截交互式代理 shell 中的命令;它尽力而为,并在 PTY 契约中如此记录。
平台
Linux、macOS 和 Windows,Node.js 22+。CI 在 Node 22 和 24 上跨所有三个平台运行测试套件;有关每个平台经过测试的确切功能,请参阅兼容性。
了解更多
支持 VibeRevert
VibeRevert 是 Apache-2.0 开源软件。赞助将用于持续的跨平台测试、安全工作、回滚和恢复测试,并帮助支付独立审查费用。赞助不会影响风险发现或发布决策。 → 赞助 VibeRevert · 你的支持用于什么
许可证
Apache-2.0。请参阅 NOTICE 和许可证审计。
Available Tools
8 toolscheck_repoB
Run safety checks against the working tree or staged diff and return the resulting ReportFile (or summary when large). Side-effecting (class B per D99.V): always persists the ReportFile under .viberevert/.
Inputs: task, since, staged, threshold.
classify_riskA
Project a check report's findings into per-severity counts (critical, high, medium, low). Read-only (class A per D99.V); no threshold input -- returns the full per-level histogram.
Inputs: report, session.
create_checkpointA
Create a standalone VibeRevert checkpoint capturing the current working tree state. Returns the new checkpoint id and creation timestamp. Side-effecting (class B per D99.V); writes a checkpoint directory under .viberevert/checkpoints/. When name is supplied, uses the D22 name-uniqueness lock; nameless checkpoints skip the lock entirely.
Inputs: name.
explain_diffA
Render a CommonMark explanation of a check report alongside the report's metadata. Reads an existing ReportFile (read-only, class A per D99.V); does not run new checks.
Inputs: report, session, threshold.
generate_fix_promptA
Render a fix-prompt from a VibeRevert check report. Returns the rendered prompt text, the absolute path to the persisted sibling fix-prompt.txt, and the source report id. Side-effecting (class B per D99.V); writes the sibling fix-prompt.txt via atomic temp+rename. The on-disk sibling is always the full untruncated text (D81); the MCP wire response's prompt_text is capped at 262144 bytes (D99.U) -- when truncated, the response carries truncated:true + bytes_omitted.
Inputs: report, session.
get_policyA
Return the project's resolved policy slice from .viberevert.yml: block/warn risk thresholds, check toggles, frameworks, and rollback exclude patterns. Applies M C defaults (D57) before returning. Read-only (class A per D99.V); does not run checks or mutate state.
Inputs: no named parameters.
list_risky_filesA
Project a check report into a per-file risky-files list (path, max_severity, finding_count) sorted by [max_severity DESC, finding_count DESC, path ASC]. Read-only (class A per D99.V). Capped at 500 entries per D99.U.
Inputs: report, session.
start_sessionA
Start a new VibeRevert session: create the inner checkpoint, capture pre-session git status, and acquire the active-session lock. Returns the new session id, checkpoint id, and start timestamp. Side-effecting (class B per D99.V); writes session state and uses the D22 start lock during execution.
Inputs: task.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clearly distinct roles (create checkpoint, run checks, configure policy, start session), and the report-consuming tools produce different outputs. However, create_checkpoint and start_session overlap in checkpoint creation, and explain_diff, classify_risk, and list_risky_files all operate on check reports, requiring careful reading to choose the right one.
All tool names follow a consistent verb_noun snake_case pattern: create_checkpoint, check_repo, explain_diff, classify_risk, list_risky_files, get_policy, start_session, generate_fix_prompt. There is no mixed casing, vague single-word verbs, or inconsistent naming style.
Eight tools is a well-scoped surface for a checkpoint and safety-reporting server. Each tool covers a recognizable stage of the workflow, and none feel like duplicates or padding.
The server can create checkpoints, start sessions, run checks, and analyze reports, but there is no end/abort session tool, no revert or rollback operation despite the server being named VibeRevert, and no way to manage checkpoints beyond creating them. These are significant gaps that leave core workflows incomplete.
Maintenance
Related MCP Connectors
IaC, CI and dependency security review for coding agents: local scan CLI plus hosted OAuth MCP.
Zero-config MCP security scanner for AI-generated apps. 25K+ vulnerability patterns.
Audit your MCP servers for poisoned tools and leaked secrets, and check AI-generated code for flaws.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceOpen-source AI code review MCP server for local git diff auditing with deterministic security rules and AI-powered analysis using any OpenAI-compatible model.4MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first code intelligence and safety layer for AI coding agents. MCP server exposes dependency graph, impact analysis, and AST-compressed repo context, backed by typed local memory, patch-scope safety gates, and git-independent transaction rollback.1MIT
- AlicenseCqualityDmaintenanceSecurity scanner and MCP server that catches dangerous patterns in MCP servers and AI agent projects, such as leaked secrets, shell execution, and prompt-injection text. Runs as both a CLI and MCP server with CI-friendly severity gates.21MIT
- AlicenseNot gradedqualityCmaintenanceAI code reviews and git activity digests with machine-readable risk scoring, available as an MCP server for use within an agent session.1MIT