首页openclaw插件 › ClawVC — Git版本控制

代码插件 扫描中

ClawVC — Git版本控制

v2.0.1

OpenClaw的Git工作区版本控制插件,智能体每次操作后自动提交,提供即时撤销和计划模式(只读智能体切换),异步git操作不阻塞网关。

0· 1·0 当前
by @karimshafie·MIT
下载插件包 项目主页
License
MIT
最后更新
2026/4/8
安全扫描
VirusTotal
Pending
查看报告
OpenClaw
扫描中
high confidence
ClawVC的代码、运行时指令和请求能力与声明目的一致(自动提交的git工作区快照、撤销和编辑openclaw.json的计划模式);没有请求无关密钥或安装意外的第三方代码,但它确实修改了工作区和网关配置,应了解这一点。
安全有层次,运行前请审查代码。

License

MIT

可自由使用、修改和再分发,需保留版权声明。

版本

latestv2.0.12026/4/8
● Pending

安装命令 点击复制

官方npx clawhub@latest install openclaw-clawvc
镜像加速npx clawhub@latest install openclaw-clawvc --registry https://cn.clawhub-mirror.com

插件文档

ClawVC

Git-based workspace version control for OpenClaw. Auto-commits after each agent turn, provides instant undo, and adds plan mode (read-only agent toggle).

Install

openclaw plugins install openclaw-clawvc

How it works

ClawVC hooks into OpenClaw's agent_end event. After each agent turn, it snapshots the workspace with git add -A && git commit. External processes (cron jobs, polling, daemons) never trigger commits — only agent activity does.

All git operations are async (child_process.execFile) and never block the gateway. Commits are tagged with the files that changed, making the log easy to scan.

ClawVC commits after each agent turn. Manual edits made outside of agent activity are captured on the next agent turn, or you can run git commit in the workspace yourself.

Tools

ToolDescription
`clawvc_log`Show recent change history
`clawvc_diff [n]`What changed N commits ago
`clawvc_show [n]`Full diff of Nth last change
`clawvc_undo [n]`Undo the Nth last change
`clawvc_status`Plan mode state and last commit
`clawvc_plan on/off/status`Toggle read-only plan mode

Usage

Ask the agent to edit a file, then review what it did:

> clawvc_log
a1b2c3d [clawvc] server.js, routes.ts (2 minutes ago)
e4f5g6h [clawvc] config.json (5 minutes ago)
i7j8k9l clawvc: initial workspace snapshot (1 hour ago)

Undo the last change:

> clawvc_undo
Undone. Current state:
e4f5g6h [clawvc] config.json (5 minutes ago)

Put the agent in read-only mode to get a plan before execution:

> clawvc_plan on
Plan mode enabled — agent is now read-only.
Use clawvc_plan off to restore full access.

Configuration

In your openclaw.json under plugins.entries.clawvc:

{
  "workspace": "/path/to/workspace"
}
OptionDefaultDescription
`workspace`auto-detectedPath to the workspace. Resolved from `agents.defaults.workspace` in openclaw.json, or defaults to `~/.openclaw/workspace`.

To exclude files from commits, add them to your workspace .gitignore.

Plan mode

clawvc_plan on adds tools.deny to your openclaw.json, blocking write/edit/exec tools. The agent becomes read-only — it can still read files, search, and reason, but can't modify anything. The gateway hot-reloads the config.

clawvc_plan off restores the original config from a backup (preserving any comments in JSON5 configs).

Requirements

  • git installed and in PATH
  • OpenClaw gateway >=2026.4.4
  • Node.js >=22.16.0

License

MIT

数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务