ClawEditor is a lightweight, cross-platform, AI-assisted text editor built with OpenClaw and Tauri. Every edit goes through a diff preview; the user must confirm before changes are applied. Each edit command is a skill; custom skills are supported.
Languages: English (this page) · 中文
Quick install: npm install -g @claweditor/cli && claw-editor
- AI-powered editing —
/aiedit,/aicorrect,/aiimportwith diff preview & confirm - Remote editing via IM — Feishu / WeChat / any OpenClaw Channel
- Edge DLP — sensitive data masked before cloud upload (Virbius Core)
- Multi-language syntax highlighting — JavaScript, Python, CSS, HTML, XML, JSON, Markdown
- PDF viewer — open & preview PDF files in-app
- Markdown / HTML preview panel
- Quick file navigation — Goto Anything (Cmd+P), Goto Line (Cmd+G)
- Custom skill system — write your own commands via
SKILL.mdfiles - Cross-platform — macOS (ARM + Intel), Linux, Windows
- Desktop: Tauri 2.x (Rust backend)
- Frontend: React 18 + TypeScript + Vite
- Editor: CodeMirror 6
- State: Zustand 5
- Transport: WebSocket to OpenClaw Gateway
- PDF: pdfjs-dist + jsPDF (view & export)
- Edge DLP: Virbius Core (scan + desensitize before cloud upload for
/aiedit, etc.)
ClawEditor (Tauri + React + CodeMirror 6)
├─ Top: CodeMirror editor
└─ Bottom: Agent chat panel (commands + messages)
↓ WebSocket
OpenClaw Gateway (claweditor-gateway plugin)
↕
OpenClaw Channel (IM / Feishu / WeChat, …)
The Agent panel is a chat UI (not xterm.js): user/assistant/system roles, ANSI colors, streaming, diff preview and confirm.
Desktop app — @claweditor/cli (npm)
Install the launcher globally, then run ClawEditor. On first launch the CLI downloads the matching platform bundle from GitHub Releases.
Requirements: Node.js ≥ 18 · a published GitHub Release for your OS/arch
npm install -g @claweditor/cli
claw-editorOther commands:
claw-editor install # install only (no launch)
claw-editor update # re-download latest release
claw-editor install --tag 0.1.0
claw-editor version| Platform | CLI auto-install | Notes |
|---|---|---|
| macOS (Apple Silicon / Intel) | .app.tar.gz |
Fully automated |
| Linux x64 | .AppImage |
Fully automated |
| Windows x64 | *-setup.exe |
Runs the installer UI once, then claw-editor |
Prefer a manual installer? Download directly from GitHub Releases.
| Package | Status | Purpose |
|---|---|---|
@claweditor/cli |
Published (v0.1.0) | Install & launch desktop app |
@claweditor/openclaw-gateway-bridge |
Not on npm yet | OpenClaw Gateway plugin — use repo path below |
- Node.js ≥ 18
- Rust ≥ 1.70 (rustup)
- VirbiusLLM as a sibling repo:
../VirbiusLLM/virbius-core(required for Tauri build / edge DLP) - Tauri 2 system deps: Tauri prerequisites
- macOS: Xcode Command Line Tools
- Windows: MSVC Build Tools, WebView2
- Linux:
libwebkit2gtk-4.1,libappindicator3,librsvg2, etc.
git clone https://github.com/i1see1you/ClawEditor.git
cd ClawEditor
npm installnpm run tauri devStarts Vite on localhost:1420 and the Tauri window with hot reload.
npm run tauri buildArtifacts: src-tauri/target/release/bundle/.
Install the plugin, connect ClawEditor to your Gateway, and enable 「开启远程编辑」 / Remote edit receive in the Agent panel.
# From this repo (current)
openclaw plugins install integrations/openclaw-gateway
# From npm (when @claweditor/openclaw-gateway-bridge is published)
# openclaw plugins install @claweditor/openclaw-gateway-bridgeRestart Gateway after install. Only one ClawEditor instance may hold the remote-edit lease per Gateway.
Custom skills are defined as SKILL.md files in skills/. See the skill schema reference to write your own.
- /edit — local edits; falls back to Gateway for complex natural language
- /find — local find; Gateway fallback for complex queries
- /aiedit — AI-assisted edits (scope text sent to Gateway; masked by Virbius first)
- /aiimport — import from clipboard / files into the buffer
- /aicorrect — spelling & punctuation (interactive side-by-side diff)
Same business commands as above; diff is delivered to the Channel. Confirm/cancel:
- /confirm req_xxx
- /cancel req_xxx
For an already open tab, use --file with the file basename:
--file bbb.js
--file=bbb.js
--file:bbb.js
- Channel user sends a command (e.g.
/edit remove blank lines --file=foo.js) - Plugin emits
claw_editor.v1.request(req_*+context) to the ClawEditor lease holder - Editor builds a proposal; local diff UI or
claw_editor.v1.diff_responseto IM /confirm req_xxxor/cancel req_xxx→claw_editor.v1.commit→commit_response
Each command is correlated by request_id.
/aiedit, /aicorrect, and /aiimport mask sensitive data before upload using data/virbius/edge/default/ClawEditor/edge-manifest.json. Edit this file, then restart ClawEditor.
Block keywords — add to rules[]:
{
"rule_id": "my_deny",
"rule_revision": 1,
"reason_code": "EDGE_CUSTOM",
"risk_score": 90,
"intent_action": "deny",
"enforce_mode": "full",
"rollout_state": "full",
"body": { "list_type": "deny", "keywords": ["internal-only"] }
}Mask PII — add to dlp_rules[]. Built-in types: phone_cn, idcard_cn, email, bank_card_cn. Custom pattern:
{
"rule_id": "my_dlp_emp",
"rule_revision": 1,
"reason_code": "DLP_EMP",
"risk_score": 0,
"intent_action": "allow",
"enforce_mode": "full",
"rollout_state": "full",
"body": {
"entity_type": "custom_regex",
"pattern": "EMP[0-9]{6}",
"mask_template": "{{VIRBIUS_EMP_{seq}}}"
}
}Copy an existing rule in the manifest and change rule_id / body. See the bundled file for full examples.
- Remote edits require diff → confirm → save
- ClawEditor desktop is the single source of truth for on-disk content
- Agent input is not a system shell
- Operations stay within the workspace;
requestIdaids troubleshooting