@zseven-w/qoder-openpencil
v0.1.0
Published
OpenPencil design plugin, interactive Rust MCP App canvas, and local MCP connector for Qoder.
Readme
Qoder OpenPencil 插件与连接器
面向 Qoder(Qoder Desktop / Qoder CN / Qoder IDE & CLI)的 OpenPencil 原生 MCP Apps 插件与交互式 Rust 画布(@zseven-w/qoder-openpencil)。
核心特性
- 原生适配 Qoder MCP Apps 2026-01-26(
qoder/ui):- 在
open_canvas上声明global与thread入口,安装后可直接从左侧 更多 → OpenPencil Canvas(全屏独立工作区)或会话右侧栏 + → Apps → OpenPencil Canvas(与对话并排)一键打开。 - 在
_meta.ui.csp.frameDomains中声明本地127.0.0.1画布源(适配 Qoder Desktop 的本地回环白名单),并声明availableDisplayModes: ["inline", "fullscreen"]与preferredDisplayMode: "fullscreen"。 - 支持明暗主题同步、通过
ui/update-model-context(带qoder/title与structuredContent)同步选区上下文,以及代码面板ui/message交接。
- 在
- 完整覆盖 Qoder 插件注册与导入规范:
qoder-openpencil setup:自动识别~/.qoder/~/.qoder-cn(兼容QODER_CONFIG_DIR/QODERCN_CONFIG_DIR),写入版本化本地缓存plugins/cache/local/openpencil/<version>/,原子合并plugins/installed_plugins_v2.json并在settings.json启用enabledPlugins["openpencil@local"] = true。qoder-openpencil pack-plugin:零依赖生成符合 Qoder 规范的本地插件.zip(.qoder-plugin/plugin.json与${QODER_PLUGIN_ROOT}版.mcp.json直接位于 ZIP 根目录),支持界面 扩展 → 导入本地插件 或qoder-settings.install_extension。qoder-openpencil setup --mcp-settings/print-config:同时兼容 Qoder IDE / CLI 的全局settings.jsonmcpServers+skills/模式。
- 完整原生设计工具与受保护保存:单一串行控制器代理所有 OpenPencil Rust MCP 工具,会话恢复草稿保存在
~/.qoder-openpencil/sessions/,保存前校验 SHA-256 基线。
快速开始
npm install -g @zseven-w/qoder-openpencil
qoder-openpencil setup重启 Qoder(或在 扩展 → 已安装 刷新)即可在左侧 更多 或会话右侧栏 + → Apps 中打开 OpenPencil Canvas。
常用命令
| 命令 | 说明 |
| --- | --- |
| qoder-openpencil setup | 校验运行包、注册并启用 openpencil@local 插件并执行 host-check |
| qoder-openpencil pack-plugin [--output PATH] | 打包符合 Qoder 根目录规范的本地插件 .zip |
| qoder-openpencil print-config | 输出适用于 settings.json 的 mcpServers JSON |
| qoder-openpencil host-check | 模拟 GUI 精简 PATH 校验启动器、qoder/ui 入口与 MCP App 资源 |
| qoder-openpencil canvas [--file PATH] | 终端持久化画布模式 |
| qoder-openpencil doctor [--port PORT] | 诊断已运行的 OpenPencil 桌面端 MCP 服务 |
| qoder-openpencil uninstall | 安全卸载 openpencil@local、mcpServers.openpencil 及受管 Skill |
