ZSeven-W /openpencil

The world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.

★ 7,186⑂ 626👁 46⑃ 140● 119▤ 33◈ 0
RustMITCreated 2026-02-17op.zseven.tech
7,186
stars
+20
626
forks
46
watchers
140
prs
119
issues
33
releases
0
discussions

README

OpenPencil


  全球首个 AI 原生开源矢量设计工具。
  并发 Agent 团队 • 设计即代码 • 内置 MCP 服务器 • 多模型智能



  English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Español · Deutsch · Português · Русский · हिन्दी · Türkçe · ไทย · Tiếng Việt · Bahasa Indonesia



  
  
  
  



  





  
    
  

点击图片观看演示视频

 为什么选择 OpenPencil





 🎨 提示词 → 画布

用自然语言描述任意 UI,实时以流式动画在无限画布上生成。选中已有元素,通过对话即可修改设计。




 🤖 并发 Agent 团队

编排器将复杂页面分解为空间子任务。多个 AI 智能体同时处理不同区块 — Hero、功能区、页脚 — 全部并行流式生成。






 🧠 多模型智能

自动适配每个模型的能力。Claude 获得完整提示词和思考模式;GPT-4o/Gemini 关闭思考模式;小模型(MiniMax、Qwen、Llama)使用简化提示词以确保输出可靠性。




 🔌 MCP 服务器

一键安装到 Claude Code、Codex、OpenCode、Kiro 或 Copilot CLI。从终端进行设计 — 通过任意 MCP 兼容的智能体读取、创建和修改 .op 文件。






 📦 设计即代码

.op 文件是 JSON — 人类可读、对 Git 友好、可进行 diff 对比。设计变量生成 CSS 自定义属性。代码导出为 React + Tailwind 或 HTML + CSS。




 🖥️ 全平台运行

Web 应用 + macOS、Windows 和 Linux 原生桌面端 — 单一 Rust 核心,单个自包含二进制文件,无需浏览器引擎。.op 文件关联 — 双击即可打开。






 ⌨️ CLI — op

从终端控制设计工具。op design、op insert — 批量设计 DSL、节点操作。支持从文件或 stdin 管道输入。可搭配桌面应用或 Web 服务器使用。




 🎯 多平台代码导出

从单个 .op 文件导出到 React + Tailwind、HTML + CSS、Vue、Svelte、Flutter、SwiftUI、Jetpack Compose、React Native。设计变量自动转换为 CSS 自定义属性。





 安装

Windows 源码编译: 参见 BUILD_WINDOWS.zh.md

macOS(Homebrew):

bash
brew tap zseven-w/openpencil
brew install --cask openpencil


Windows(Scoop):

powershell
scoop bucket add openpencil https://github.com/zseven-w/scoop-openpencil
scoop install openpencil


Linux / Windows 直接下载: GitHub Releases — .exe(Windows)、.AppImage / .deb(Linux)

Nix(Linux x86_64):

bash
nix develop
nix run .                          启动桌面应用
nix build .openpencil             原生 Web host + CanvasKit Web bundle
nix build .op-cli                 op CLI
nix build .prebuilt               使用匹配的 upstream 桌面归档
nix build .prebuilt-cli           使用匹配的 upstream CLI 归档
nix build .web-server             无需 GL 的原生 Web server + Web bundle
nix build .runtime-prebuilt       预构建桌面端 + op CLI runtime
nix build .web-sdk-packages       Web SDK 的 npm tarball
nix build .appimage               便携式桌面 AppImage


flake 使用 rust-toolchain.toml 中固定的 Rust toolchain,目前发布于
x86_64-linux。flake 尚未生成 Debian 软件包;需要 .deb 时请使用
upstream release artifact。prebuilt output 使用
nix/release-manifest.json 中固定的 release 版本和 hash,与 workspace
源码版本相互独立。release 发布后,release workflow 会创建 PR 来更新此
manifest。在 PR 合并前,预构建 output 会继续使用上一个已发布的 release;
源码构建 output 则始终使用当前 checkout 的源码。

CLI(op):

bash
brew install zseven-w/openpencil/op


或使用安装脚本(macOS / Linux):

bash
curl -fsSL https://raw.githubusercontent.com/ZSeven-W/openpencil/main/scripts/install-op.sh | bash


如需允许最新预发布版本:

bash
curl -fsSL https://raw.githubusercontent.com/ZSeven-W/openpencil/main/scripts/install-op.sh | OP_PRERELEASE=1 bash


Windows PowerShell:

powershell
irm https://raw.githubusercontent.com/ZSeven-W/openpencil/main/scripts/install-op.ps1 | iex


如需允许最新预发布版本:

powershell
$env:OP_PRERELEASE = "1"; irm https://raw.githubusercontent.com/ZSeven-W/openpencil/main/scripts/install-op.ps1 | iex


 克隆(包含子模块)

bash
git clone --recurse-submodules https://github.co

Top issues

Snapshot: 2026-11-10T09:35:25Z · Data license Apache-2.0 · JSON