Native .fig file support, built-in AI with 90 tools, headless CLI, Vue SDK for custom editors, real-time P2P collaboration. MIT licensed, works offline.

At a Glance:

OpenPencil is an open-source, MIT-licensed visual design editor that natively opens .fig files, includes a built-in AI assistant with 100+ tools, and ships as a programmable headless toolkit and Vue SDK for building custom design surfaces.

Overview:

OpenPencil is an open-source design editor built as a programmable alternative to closed-platform design tools. It natively reads and writes .fig and .pen files, supports real-time peer-to-peer collaboration via WebRTC, and includes a built-in AI assistant that connects to multiple LLM providers. The project ships as a ~7 MB desktop application built with Tauri v2, a browser-based PWA, and a headless CLI. Developers can embed OpenPencil into custom applications using its headless Vue SDK, automate design workflows through XPath queries and the Figma Plugin API via eval, and connect AI coding agents through its MCP server. The project is in active development and not yet ready for production use.

Key Decision Points:

  • Native .fig file support: Opens, edits, and saves Figma binary files directly, maintaining file portability with existing design workflows.

  • Multiple interaction surfaces: Available as a desktop app, browser PWA, headless CLI with JSON output, and embeddable Vue SDK — choose the interface that fits your workflow.

  • Agent-ready architecture: Ships with an MCP server supporting both stdio and HTTP transports, plus desktop agent integrations for Claude Code, Codex, and Gemini CLI that can access all 100+ design tools.

  • Peer-to-peer collaboration: Real-time co-editing works over WebRTC without requiring a server or user account, with cursor presence and follow mode.

  • Active development status: Not production-ready, and the roadmap acknowledges current Figma compatibility gaps.

Core Features:

  • .fig and .pen file read/write: Native support for opening, editing, and saving Figma binary files, plus OpenPencil's own .pen format.

  • Built-in AI assistant: Chat panel with 100+ tools that create and modify nodes, supporting OpenRouter, Anthropic, OpenAI, Google AI, Z.ai, MiniMax, and compatible API endpoints.

  • Programmable CLI: Headless command-line interface for inspecting node trees, querying with XPath, exporting to PNG/JPG/WEBP/SVG/JSX, linting designs, and extracting design tokens.

  • Figma Plugin API via eval: Execute scripts using the full Figma Plugin API through the CLI's eval command, then write results back to the file.

  • Design-to-code export: Export selections as JSX/Tailwind, generate token outputs, and map designs into component-oriented code workflows.

  • Headless Vue SDK: Composable components for embedding OpenPencil into other applications or building workflow-specific editing surfaces.

Use Cases:

  • Developers automating design pipelines: Use the CLI to lint .fig files, extract design tokens, analyze color/typography consistency, and export assets in CI scripts without opening the editor.

  • Developers building custom design tools: Embed OpenPencil's headless Vue SDK into custom applications that require design editing surfaces tailored to specific workflows.

  • AI-assisted design iteration: Connect coding agents like Claude Code or Gemini CLI through the MCP server to inspect .fig files, modify nodes programmatically, and export assets.

  • Serverless collaborative editing: Share a WebRTC link for real-time co-editing sessions where participants see cursors, selections, and edits without any server infrastructure or account creation.

Open-Source Alternative Value:

OpenPencil positions itself as an MIT-licensed alternative to Figma's closed platform, specifically addressing the limitation that Figma stores design files in a proprietary binary format only their software can fully read. It provides native read/write access to .fig files without depending on vendor-maintained APIs or CDP-based automation that can be removed. The project makes every design operation scriptable through its CLI, XPath querying, and MCP server, removing programmatic access barriers. The desktop app runs locally, and the README states that data never leaves the machine. Note that the project is still under active development and not yet suitable for production workflows.

分享XLinkedInReddit

相关工具

项目数据

Stars

5,875

Forks

545

许可证

MIT

元数据

替代对象
Figma