Find a file
2026-03-08 00:34:19 +03:00
.github Fix npm publish auth: write .npmrc for pnpm 2026-03-08 00:34:19 +03:00
.pi Sync specs & docs: variables, image export, CLI, core extraction 2026-03-01 02:17:48 +03:00
.vscode Initial commit: Tauri + CanvasKit + React editor scaffold 2026-02-27 15:48:29 +03:00
desktop Release v0.8.0 2026-03-08 00:20:47 +03:00
docs Merge docs PR, fix all lint/typecheck errors, update changelog 2026-03-07 23:19:19 +03:00
openspec Merge PR #70: E2E test coverage + mutation unit tests 2026-03-07 23:47:00 +03:00
packages Update docs: tool counts 75/78 → 87/90, schema.ts → tools/ directory, add RPC bridge 2026-03-08 00:28:11 +03:00
public feat: mobile layout, PWA support (#27) (#27) 2026-03-05 19:51:51 +03:00
scripts Guard against double destroy and post-unmount rendering 2026-03-04 10:35:44 +03:00
src Update README roadmap, features, tool counts, and project structure 2026-03-08 00:04:22 +03:00
tests Merge PR #70: E2E test coverage + mutation unit tests 2026-03-07 23:47:00 +03:00
.gitattributes Cache effect ImageFilters and reuse layer paint 2026-03-03 10:12:02 +03:00
.gitignore Ignore VitePress build artifacts under docs/ 2026-03-07 21:45:32 +03:00
.lfsconfig Use Cloudflare R2 for Git LFS storage 2026-03-04 01:25:33 +03:00
.oxfmtrc.json Configure oxfmt import sorting with proper groups 2026-03-06 21:43:23 +03:00
AGENTS.md Merge branch 'master' into add-vitepress-docs 2026-03-07 19:01:09 +03:00
ARCHITECTURE-NEXT.md Adopt motion-v for mobile drawer and toolbar animations 2026-03-06 08:50:38 +03:00
bun.lock Merge remote-tracking branch 'origin/master' into fix-cli-rpc 2026-03-07 15:03:40 +03:00
CHANGELOG.md Release v0.8.0 2026-03-08 00:20:47 +03:00
components.d.ts Fix Vite build: import constants via relative path for esbuild compat 2026-03-07 19:49:09 +03:00
CONTRIBUTING.md feat: mobile layout, PWA support (#27) (#27) 2026-03-05 19:51:51 +03:00
index.html Fix PWA manifest error in dev, handle invalid font data 2026-03-06 21:43:16 +03:00
LICENSE Add MIT license 2026-03-02 08:31:54 +03:00
oxlint.json Fix all lint, typecheck, and formatting issues 2026-02-28 22:57:33 +03:00
package.json Release v0.8.0 2026-03-08 00:20:47 +03:00
plan-refactor.md Merge docs PR, fix all lint/typecheck errors, update changelog 2026-03-07 23:19:19 +03:00
PLAN.md Fix Figma MCP timeline, update tool counts to 26, add AI providers to roadmap 2026-03-02 08:19:08 +03:00
playwright.config.ts Fix flaky E2E tests: layers panel, zoom-to-fit, snapshot stability 2026-03-07 11:08:22 +03:00
pnpm-workspace.yaml Release v0.8.0 2026-03-08 00:20:47 +03:00
README.md Fix roadmap: individual strokes already shipped, restore skewing/OkHCL 2026-03-08 00:07:39 +03:00
SECURITY.md Add CI for PRs, issue/PR templates, CONTRIBUTING and SECURITY docs 2026-03-03 17:24:45 +03:00
tsconfig.json Fix InvalidCharacterError when copying nodes with non-ASCII text 2026-03-04 01:15:44 +03:00
tsconfig.node.json Initial commit: Tauri + CanvasKit + React editor scaffold 2026-02-27 15:48:29 +03:00
vite.config.ts Add CLI-to-app RPC bridge for live document access 2026-03-06 22:29:49 +03:00

OpenPencil

Open-source, AI-native design editor. Figma-compatible, AI-first, fully local.

Status: Active development. Not ready for production use.

Try it online → · Download · Documentation

What's next

  • 100% .fig compatibility — full rendering parity with Figma
  • Shader effects (SkSL) — custom visual effects via GPU shaders
  • Skewing and OkHCL color support
  • Raster tile caching — instant zoom/pan for complex documents
  • Component libraries — publish, share, and consume design systems
  • CI tools — design linting, code export, visual regression in pipelines
  • Code signing (Apple & Azure certificates for properly signed binaries)
  • Experimental WebGPU/Graphite rendering backend

OpenPencil

Why

Figma is a closed platform that actively fights programmatic access. Their MCP server, launched in June 2025, was read-only — you could pull design context but not create or modify anything. figma-use filled that gap in January 2026 with full read/write design automation via CDP. A month later, Figma 126.1.2 started stripping --remote-debugging-port on startup — killing CDP-based tools. Figma has since added UI-to-Figma capture via their MCP server, but it still can't programmatically create or modify design nodes.

This is a supply chain problem. Designers and developers build workflows on top of their design tool. When that tool is closed-source, the vendor controls what's possible. They can break your tooling overnight with a point release. Your design files are in a proprietary binary format that only their software can fully read.

Coding tools went through the same shift. VS Code opened the editor. LLMs opened code generation. Projects like pi opened the AI coding agent. Design tools are next.

OpenPencil is:

  • Open source — MIT license, read and modify everything
  • Figma-compatible — opens .fig files natively, copy & paste nodes between apps
  • AI-native — built-in chat with tool use, bring your own API key, no vendor lock-in
  • Free forever — no account, no subscription, no internet required, ~7 MB install
  • Programmable — headless CLI, every operation is scriptable

Your design files are yours. Your tools should be too.

Features

  • Figma .fig file import and export — read and write native Figma files
  • Copy & paste with Figma — select nodes in Figma, paste into OpenPencil (and vice versa). Uses the same Kiwi binary format as .fig files
  • Real-time collaboration — P2P via WebRTC, no server required. Cursors, presence, follow mode
  • Drawing tools — shapes, pen tool with vector networks, rich text with system fonts, auto-layout, components with live sync, variables with modes and collections
  • AI chat — describe what you want, the AI builds it. 87 tools wired to chat, CLI, and MCP
  • MCP server — connect Claude Code, Cursor, or any MCP client to read/write .fig files headlessly
  • Headless CLI — inspect, search, analyze, and render .fig files without a GUI. Run against live app via RPC bridge or standalone against .fig files
  • Tailwind CSS export — export selections as HTML with Tailwind v4 utility classes from the Code panel, CLI, or programmatically
  • Mobile & PWA — responsive editor with touch-optimized toolbar, swipeable drawer, installable as a Progressive Web App
  • Documentation — full docs at openpencil.dev with 6 locales
  • ~7 MB desktop app — Tauri v2, macOS/Windows/Linux. Also runs in the browser

Tech Stack

Layer Tech
UI Vue 3, VueUse, Reka UI
Styling Tailwind CSS 4
Rendering Skia (CanvasKit WASM)
Layout Yoga WASM
File format Kiwi binary (vendored) + Zstd + ZIP
Color culori
Collaboration Trystero (WebRTC P2P) + Yjs (CRDT) + y-indexeddb
Desktop Tauri v2
CLI citty, agentfmt
MCP @modelcontextprotocol/sdk, Hono
Testing Playwright (visual regression), bun:test (unit)
Tooling Vite 7, oxlint, oxfmt, typescript-go

Installation

macOS (Homebrew):

brew install open-pencil/tap/open-pencil

Or download the latest release from the releases page, or use the web app — no install needed.

Getting Started

bun install
bun run dev

Collaboration

Share a link to co-edit in real time. No server, no account — peers connect directly via WebRTC.

  1. Click the share button in the top-right panel
  2. Share the generated link (app.openpencil.dev/share/<room-id>)
  3. Collaborators see your cursor, selection, and edits in real time
  4. Click a peer's avatar to follow their viewport

All sync happens peer-to-peer via Trystero. Document state is persisted locally in IndexedDB — refreshing the page keeps your work.

CLI

Headless .fig file operations — no GUI needed:

bunx @open-pencil/cli info design.fig         # Document stats, node types, fonts
bunx @open-pencil/cli tree design.fig         # Visual node tree
bunx @open-pencil/cli find design.fig --type TEXT  # Search by name or type
bunx @open-pencil/cli export design.fig       # Render to PNG
bunx @open-pencil/cli export design.fig -f jpg -s 2 -q 90  # JPG at 2x

All commands support --json for machine-readable output.

MCP Server

Connect AI coding tools to read and modify .fig files headlessly. Full docs →

Stdio (Claude Code, Cursor, Windsurf) — add to your MCP config:

bun add -g @open-pencil/mcp
{
  "mcpServers": {
    "open-pencil": {
      "command": "openpencil-mcp"
    }
  }
}

HTTP (scripts, browser extensions, CI):

openpencil-mcp-http   # http://localhost:3100/mcp

Security defaults for HTTP transport:

  • Binds to 127.0.0.1 by default (HOST to override)
  • eval tool is disabled
  • File access is restricted to OPENPENCIL_MCP_ROOT (defaults to current working directory)
  • Optional auth: set OPENPENCIL_MCP_AUTH_TOKEN and send Authorization: Bearer <token> (or x-mcp-token)
  • CORS is disabled by default; set OPENPENCIL_MCP_CORS_ORIGIN to allow a specific origin

90 tools: create shapes, set fills/strokes/layout, variables, vectors, boolean ops, viewport, find nodes, open/save .fig files, render JSX to design nodes.

Scripts

Command Description
bun run dev Dev server at http://localhost:1420
bun run build Production build
bun run check Lint + typecheck
bun run test E2E visual regression
bun run test:update Regenerate screenshot baselines
bun run test:unit Unit tests
bun run tauri dev Desktop app (requires Rust)

Desktop App

Requires Rust, the Tauri CLI, and platform-specific prerequisites (Tauri v2 guide).

bun run tauri dev                      # Dev mode with hot reload
bun run tauri build                    # Production build
bun run tauri build --target universal-apple-darwin  # macOS universal

Cross-compilation to other platforms requires their respective toolchains or CI (e.g. GitHub Actions).

Platform Prerequisites

macOS

Install Xcode Command Line Tools:

xcode-select --install

Windows

  1. Install Rust — make sure the default toolchain is stable-msvc:
    rustup default stable-msvc
    
  2. Install Visual Studio Build Tools with the "Desktop development with C++" workload (MSVC compiler + Windows SDK)
  3. WebView2 is pre-installed on Windows 10 (1803+) and Windows 11. If missing, download from Microsoft

Linux

Install system dependencies (Debian/Ubuntu):

sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file \
  libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

For other distros, see the Tauri v2 prerequisites.

Project Structure

packages/
  core/           @open-pencil/core — engine (scene graph, renderer, layout, codec)
  cli/            @open-pencil/cli — headless CLI (info, tree, find, export)
  mcp/            @open-pencil/mcp — MCP server (stdio + HTTP)
  docs/           VitePress documentation site (openpencil.dev)
src/
  ai/             AI tool wiring
  automation/     CLI-to-app RPC bridge (WebSocket + HTTP)
  components/     Vue SFCs (canvas, panels, collaboration, color picker)
  composables/    Canvas input, keyboard shortcuts, collaboration, rendering
  views/          Route views
  stores/         Editor state (Vue reactivity)
  engine/         Re-export shims from @open-pencil/core
desktop/          Tauri v2 (Rust + config)
tests/
  e2e/            Playwright E2E tests (188 tests)
  engine/         Unit tests (764 tests)
  helpers/        Test utilities (canvas interaction, store access)

Acknowledgments

Thanks to @sld0Ant (Anton Soldatov) for creating and maintaining the documentation site.

License

MIT