Skip to content
@open-pencil

OpenPencil

AI-Native Design Editor

OpenPencil

Open-source design editor built on one premise: a design is a node tree, not a picture.

Design tools treat the canvas as the product and the file as an implementation detail — a proprietary binary only the vendor's software can fully read, behind APIs that fight automation. OpenPencil inverts that. The document is a node tree you can open, query, transform, lint, and diff; the editor is one client of it. A designer moves things on the canvas; a script renames every color token; an AI agent builds a screen — all through the same small set of operations, and each change is data you can review like a code change.

It opens Figma's .fig files natively, turns HTML/CSS into editable layers, and runs as a ~15 MB desktop app or a browser tab. Your files stay on your machine unless you send them somewhere: to peers you share with, an AI provider you connect, or an OpenPencil Cloud server — your team's own, or the hosted one once it opens. The editor, the engine, the file codecs, the CLI, the MCP server, and the Vue SDK are MIT; the Cloud server is Apache 2.0.

brew install --cask openpencil

Or use the web app — no install, no account.

Try it online · Download · Documentation · Roadmap

Start here

Project What it is
open-pencil The editor — desktop and web app — with the engine, CLI, MCP server, Vue SDK, and the agent skill (npx skills add open-pencil/open-pencil)

The same repository publishes the programmable surface to npm:

Package What it does
@open-pencil/core Editor engine — renderer, layout, document I/O, Figma API, tools, and RPC
@open-pencil/scene-graph Scene graph nodes, primitives, hit testing, copy/snap/undo, variants, and vector-network types
@open-pencil/vue Headless Vue SDK for embedding OpenPencil or building custom editors
@open-pencil/cli Headless CLI — inspect, query (XPath), lint, analyze, export, convert, and import .fig/.pen files and HTML; run Figma plugin API scripts; control the running editor over RPC
@open-pencil/mcp MCP server (stdio + HTTP) — 100+ design tools for Claude Code, Cursor, Windsurf, and any MCP client
@open-pencil/cloud Self-hostable OpenPencil Cloud — accounts, workspaces, revisions, sharing, and collaboration, for Node and Cloudflare Workers
@open-pencil/harness Optional companion CLI for coding-agent Harness sessions

File formats and conversions:

Package What it does
@open-pencil/kiwi Kiwi binary runtime, Figma schema helpers, and low-level .fig container parsing
@open-pencil/fig .fig archives — SceneGraph conversion, instances, and metadata
@open-pencil/pen .pen document parser and SceneGraph adapter
@open-pencil/drawio draw.io (diagrams.net) documents, including diagrams embedded in its PNG and SVG exports
@open-pencil/mermaid Mermaid flowcharts read into a typed model
@open-pencil/dom-css HTML/CSS/Tailwind into editable design documents, and designs back to HTML, JSX, and Tailwind
@open-pencil/design-jsx Design JSX — build editable scene trees with <Frame>, <Text>, paints, effects, and variables, and export layers back to JSX
@open-pencil/emit Source emission for exporters — JavaScript, TypeScript, and JSX built as ESTree and printed with esrap

WebAssembly engines, built in the same repository from the forks below:

Package What it does
@open-pencil/canvaskit CanvasKit (Skia in WebAssembly) with Skia's PDF backend — the renderer and PDF export
@open-pencil/taffy Taffy flexbox and grid layout in WebAssembly, a whole tree laid out in one call — auto layout
@open-pencil/html-engine HTML laid out as a browser lays it out, without a browser — Blitz (Stylo, Taffy, Parley) in WebAssembly, for HTML import

Around the editor

Project What it does
twirlwind Tailwind v4-first CSS-to-utility-class serializer, used by JSX/Tailwind export
whaticon Find the Iconify icon an SVG draws, by perceptual hash; names the icons HTML import brings in
git-lfs-s3-proxy Provider-neutral Git LFS gateway for S3-compatible storage; serves the repository's fixtures

Elixir

The same document model from the BEAM, for services and pipelines that read design files without the editor:

Project What it does
figler Analyze, transform, and render Figma files from Elixir
kiwi_codec Pure Elixir codec for Kiwi schema binary messages

Engine infrastructure

Forks that carry OpenPencil's patches until they land upstream:

Project What it does
skia Skia, built as CanvasKit with the PDF backend (@open-pencil/canvaskit)
taffy Taffy with table layout and OpenPencil's layout fixes (@open-pencil/taffy)
blitz Blitz with table layout, text baselines, and the table border attribute (@open-pencil/html-engine)

How it fits together

.fig / .pen / HTML / draw.io / Mermaid → node tree
├── editor                   — desktop (Tauri) and web app, real-time collaboration
├── @open-pencil/core        — editor engine: renderer, layout, tools, RPC, document I/O
├── @open-pencil/scene-graph — nodes, primitives, hit testing, copy/snap/undo
├── format packages          — kiwi, fig, pen, drawio, mermaid, dom-css, design-jsx
├── @open-pencil/cli         — tree / query / lint / analyze / export / eval from the terminal
├── @open-pencil/mcp         — the same operations as MCP tools for AI agents
├── @open-pencil/vue         — headless components for building your own editor
└── @open-pencil/cloud       — optional server for documents, sharing, and collaboration

Every surface — canvas, CLI, MCP, SDK — drives the same operations on the same tree. That is the whole design: nothing the editor can do is closed to a script, and nothing a script does bypasses what the editor checks.

OpenPencil is also the design layer of a larger open stack — a web stack built so that software written by AI (and by people) can be checked, not just generated. The argument and the map live in Building Blocks for the Future Web.

License

MIT across the organization, except OpenPencil Cloud (Apache 2.0), the forks that keep their upstream licenses (skia BSD-3-Clause, blitz MIT or Apache 2.0), and git-lfs-s3-proxy (CC0).

Popular repositories Loading

  1. open-pencil open-pencil Public

    AI-native design editor. Open-source Figma alternative.

    TypeScript 10k 1.1k

  2. skills skills Public archive

    Agent skills for OpenPencil — the open-source design editor

    16 3

  3. canvaskit-webgpu canvaskit-webgpu Public archive

    Custom CanvasKit WASM build with Skia Graphite + Dawn (WebGPU) backend

    Shell 14 6

  4. figler figler Public

    Analyze, transform, and render Figma files from Elixir

    Elixir 8 1

  5. twirlwind twirlwind Public

    Tailwind v4-first CSS-to-utility-class serializer

    TypeScript 6 2

  6. yoga yoga Public archive

    Forked from react/yoga

    Archived: OpenPencil's Yoga fork with CSS Grid. Auto layout moved to Taffy (open-pencil/open-pencil#2016).

    C++ 3 1

Repositories

Showing 10 of 18 repositories
  • open-pencil Public

    AI-native design editor. Open-source Figma alternative.

    open-pencil/open-pencil's past year of commit activity
    TypeScript 9,950 MIT 1,081 78 44 Updated Nov 19, 2026
  • whaticon Public

    Find matching Iconify icons by visual similarity

    open-pencil/whaticon's past year of commit activity
    TypeScript 2 0 0 0 Updated Nov 18, 2026
  • .github Public

    Organization profile

    open-pencil/.github's past year of commit activity
    0 0 0 0 Updated Nov 18, 2026
  • twirlwind Public

    Tailwind v4-first CSS-to-utility-class serializer

    open-pencil/twirlwind's past year of commit activity
    TypeScript 6 MIT 2 0 0 Updated Nov 16, 2026
  • skia Public

    Skia fork with OpenPencil's CanvasKit patches: the PDF backend, text layout and binding fixes (@open-pencil/canvaskit)

    C++ 2 BSD-3-Clause 2 0 1 Updated Nov 15, 2026
  • blitz Public Forked from DioxusLabs/blitz

    A radically modular HTML/CSS rendering engine

    open-pencil/blitz's past year of commit activity
    Rust 0 Apache-2.0 281 0 0 Updated Nov 15, 2026
  • taffy Public Forked from DioxusLabs/taffy

    A high performance rust-powered UI layout library

    open-pencil/taffy's past year of commit activity
    Rust 0 MIT 282 0 1 Updated Nov 13, 2026
  • canvaskit-webgpu Public archive

    Custom CanvasKit WASM build with Skia Graphite + Dawn (WebGPU) backend

    open-pencil/canvaskit-webgpu's past year of commit activity
    Shell 14 MIT 6 0 0 Updated Nov 8, 2026
  • kiwi_codec Public

    Pure Elixir codec for Kiwi schema binary messages

    open-pencil/kiwi_codec's past year of commit activity
    Elixir 0 MIT 0 0 1 Updated Oct 26, 2026
  • unifont Public Forked from danielroe/unifont

    Framework agnostic tools for accessing data from font CDNs and providers

    open-pencil/unifont's past year of commit activity
    TypeScript 0 MIT 21 0 0 Updated Oct 26, 2026