ZSeven-W/openpencil
Rust vector editor for turning prompts into editable, Git-friendly UI designs
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
OpenPencil is a vector editor built around a shared Rust core. The Cargo workspace spans editor state, widgets, hosts, AI, MCP, and code generation; a plain cargo build targets the desktop host and op CLI by default rather than compiling the web host for the native target. On desktop, vendored Jian provides widgets, layout, events, and rendering; Casement is the vendored winit fork used for windowing. Native rendering uses GPU Skia through skia-safe with GL, without an embedded browser engine. The browser host pairs a headless Rust server with a WASM bundle that renders through CanvasKit and WebGL2.
The editor writes human-readable JSON to .op files, giving manual edits and automation a common, diffable artifact. The built-in Rust agent runtime handles generation; an orchestrator can split a page into spatial tasks and stream results to the live canvas over SSE. For external integration, op-mcp exposes document operations over stdio, while op supports scripts against desktop, web, or headless file-backed sessions. The TypeScript op-web-sdk and its React 19 and Vue 3 adapters are for read-only viewing.
Key Capabilities & Differentiators
The canvas supports Bézier paths, Boolean geometry, alignment and snapping, multi-page documents, and horizontal or vertical auto-layout. Design-system primitives include color, numeric, and string variables, multi-axis themes, and component instances with overrides. Design variables can become CSS custom properties in generated code. Export targets include React + Tailwind, HTML + CSS, Vue, Svelte, Flutter, SwiftUI, and Jetpack Compose, so a team can evaluate the same design against multiple implementation stacks.
AI generation produces editable canvas content from text or visual references, and users can target revisions by selecting existing objects. Agent Teams work on spatially distinct sections with per-agent canvas indicators, while the design_skeleton → design_content → design_refine workflow separates layout, content, and polish. More than 50 bundled style guides are available through tag-based matching. Provider profiles adapt prompts and thinking settings across model families: Claude receives fuller prompts, GPT-4o and Gemini profiles disable thinking, and smaller models such as Qwen and Llama receive simpler prompts.
Trade-offs & Limitations
Compared with a conventional Pencil workflow, the main reason to adopt OpenPencil is to make canvas edits part of a prompt-driven, scriptable workflow. For a Figma team, the practical entry point is .fig import, but that does not establish round-trip fidelity or parity for shared libraries and handoff. Git diffs make .op changes inspectable; they do not guarantee clean merges when designers edit the same objects. Evaluate generated code against your accessibility requirements and component conventions before treating it as production output. Parallel agents can work on different sections at once, but API limits, cost, and visual consistency across those sections remain adoption concerns.
Self-hosting the editor is distinct from self-hosting inference. Web-entered credentials live in same-origin localStorage by default and are sent to the daemon with requests that need them, so protecting the web origin from untrusted scripts and XSS matters. Server persistence is opt-in, and each accepted browser snapshot replaces the shared browser-owned copy. Use it only for a trusted, access-controlled HTTPS deployment with one active administrator profile, not as a per-user credential store.
Hardware & Deployment Guide
The packaged desktop paths include Homebrew on macOS, Scoop or an installer on Windows, and AppImage or .deb artifacts on Linux. Windows portable ZIP and VSIX distributions require the supported Microsoft Visual C++ v14 runtime to be installed separately. For source builds, clone recursively to fetch jian, casement, and agent; the toolchain is pinned in rust-toolchain.toml. The Nix flake targets x86_64-linux. For self-hosting, the tagged ghcr.io/zseven-w/openpencil-web:vX.Y.Z image bundles the Rust web host, WASM, and CanvasKit and serves on port 3100. The local container build uses Dockerfile.web-rust, and scripts/start-web-rust.sh builds and starts the development web stack.
The web host offers built-in API-key agents, not native CLI or ACP agents. For a public reverse proxy, configure exact browser origins via OPENPENCIL_WEB_ALLOWED_ORIGINS. Private provider endpoints require a separate exact-origin allowlist via OPENPENCIL_WEB_AI_ENDPOINT_ALLOWLIST. The release notes identify v0.8.4 as addressing the public-relay startup failure in published v0.8.3 builds, v0.8.5 as bringing the Rust editor to Android and iOS, and v0.8.6 as adding canvas motion authoring, shared playback with Jian, interactive HTML export, and browser-local MP4 export.
skia-safe; browser rendering via CanvasKit, WASM, and WebGL2.op files with variable references, theme axes, component overrides, and CSS custom propertiesop design accepts files or stdin; the op-mcp stdio server exposes document editing to external agentsDesign and frontend teams that want prompt-generated UI to stay editable on the canvas, review .op changes in Git, and automate repeatable work with CLI or MCP.
You require verified lossless Figma round-tripping, need native CLI or ACP agents inside the Docker web UI, or must have air-gapped AI generation without separately validating a supported internal model endpoint.
Quick Start & Installation
brew tap zseven-w/openpencil brew trust --tap zseven-w/openpencil brew install --cask openpencil
Comparison vs. Top Chat UI & AI Apps Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| openpencil ★ | 7.4k | +56 | Rust | MIT | Rust vector editor for turning prompts into editable, Git-friendly UI designs |
| MROffice | 5k | +1.5k | TypeScript | AGPL-3.0 | Modular TypeScript office editors with hosted Office-file editing and MCP |
| AionUi | 34.7k | +123 | TypeScript | Apache-2.0 | A self-hostable workspace unifying built-in and CLI agents for file-based work |
| iPolloWork | 7.6k | +23 | TypeScript | — | DeepSeek Harness workspace for shared projects, agent teams, and editable work |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/ZSeven-W/openpencil.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about openpencil
How should a developer integrate an agent or automation script?
op for scripted edits: it accepts inline input, @filepath, or stdin and can target a running desktop app, a web server, or a headless file-backed server. Use the built-in stdio MCP server (op-mcp) when an MCP client needs to read, create, or modify .op documents. It does not require Node.js. The web SDK is a read-only viewer, not an alternative editing API.What GPU and memory capacity should we plan for?
Can we self-host OpenPencil commercially, and does that keep our design data in-house?
Should a design team move existing Figma projects to OpenPencil?
op import:figma command establishes a .fig import path, not lossless round-tripping. Test a representative design with component overrides, layout, fonts, and assets, then review the exported code against your production conventions.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy