pencil README

项目的 README,来自 github.com/evolus/pencil。合并为一个 markdown 文件:README.md。

Pencil Logo

Pencil

An open-source GUI prototyping and wireframing application for macOS, Windows, and Linux.

Website • Downloads • Stencils & Templates

GitHub Stars Version License Platforms MCP Protocol

Pencil V4 Interface and Canvas


Overview

Pencil is a free, open-source, desktop-native wireframing and prototyping tool for macOS, Windows, and Linux (pencil.evolus.vn). Built for developers, UX designers, and product teams, it provides an intuitive vector canvas environment for constructing mockups, system diagrams, and user flows using standard vector stencil libraries.

Key Capabilities & Architecture in V4.0

Pencil V4.0 introduces native support for the Model Context Protocol (MCP). This enables any AI assistant or LLM client that supports standard MCP (including Claude Desktop, Cursor, Antigravity, VS Code, or custom agents) to inspect, create, and modify wireframes directly on your canvas using everyday language. Pencil runs a local server right inside the app at http://127.0.0.1:1919/mcp, with no extra background services or cloud setups required.


Quick Start (Prebuilt Binaries)

For end users who do not require building from source:

  1. Download: Obtain the latest installer or package for your operating system from the Pencil Downloads Page or GitHub Releases.
  2. Launch: Open Pencil. You can immediately begin creating wireframes and diagrams using the built-in stencil collections.
  3. Connect AI (Optional): To enable AI-assisted prototyping, follow the setup in Connecting AI Clients below.

Connecting AI Clients

Pencil provides built-in configuration snippets for popular tools (Claude Desktop, Cursor, Antigravity, and VS Code), and works with any client or script that connects to standard MCP HTTP endpoints. Open Settings > MCP, select your assistant tab, and click Copy Configuration to paste directly into your client.

The internal server operates on http://127.0.0.1:1919/mcp (Streamable HTTP / JSON-RPC 2.0). Server status, port assignment, and restarts can be managed directly in the MCP settings pane. To verify endpoint responsiveness externally:

curl -I http://127.0.0.1:1919/mcp
Manual Client Configuration Reference

Claude Desktop

Add to claude_desktop_config.json (~/Library/Application Support/Claude/ on macOS, %APPDATA%\Claude\ on Windows, ~/.config/Claude/ on Linux):

{
  "mcpServers": {
    "pencil": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "http://127.0.0.1:1919/mcp"
      ]
    }
  }
}

Cursor

Add to .cursor/mcp.json or configure under Settings > Features > MCP:

{
  "mcpServers": {
    "pencil": {
      "url": "http://127.0.0.1:1919/mcp"
    }
  }
}

Antigravity

Add to mcp_config.json:

{
  "mcpServers": {
    "pencil": {
      "serverUrl": "http://127.0.0.1:1919/mcp"
    }
  }
}

VS Code

Add to .vscode/mcp.json (or user settings under mcp.servers):

{
  "servers": {
    "pencil": {
      "type": "http",
      "url": "http://127.0.0.1:1919/mcp"
    }
  }
}

Example Interaction Prompts

AI assistants connected to Pencil can execute complex multi-step canvas workflows. Below are representative prompts:

[!TIP] Prompting Best Practice: For the cleanest layouts, explicitly reference your desired stencil library (e.g., "Use shadcn/ui stencils..." or "Pick an icon from the Lucide collection..."). This instructs the assistant to reuse standardized design system components instead of generic raw rectangles.

Scaffolding New Screens

Component Refinement & Styling

Icon & Asset Placement

Structural Layout Shifts & Visual QA


MCP Tools Reference

Pencil exposes its internal API through 5 catalog modules:

Category Tools Description
Canvas Mutation insert_shapes, update_shapes, delete_shapes, move_shapes, align_shapes, distribute_shapes, shift_layout, select_shapes Create, modify, position, and reorder vector shapes, containers, and properties.
Document Management get_active_document, get_page_content, list_pages, create_page, update_page, rename_page, delete_page, switch_page, export_page Manage document structure, multi-page hierarchies, navigation, and exports.
Inspection & Vision render_preview, find_shapes, find_shapes_in_canvas, list_shapes Generate visual snapshots for LLM vision inspection and query shape hierarchies.
Stencils & Resources list_collections, list_shape_definitions, get_shape_definition, list_resource_collections, list_resource_dir, search_resources Discover installed stencil libraries, component templates, and vector icon collections.
Guidance & Skills list_skills, use_skill, read_knowledge_base_document Access embedded design rules, stencil construction guidelines, and best practices.

Stencil & Icon Ecosystem

Pencil includes built-in collections and supports custom stencil installation:

Stencil Repositories & Resources

Additional collections and export templates can be installed through multiple sources:


Development & Building from Source

Prerequisites

Installation

  1. Clone the repository and check out the target branch:

    git clone https://github.com/evolus/pencil.git
    cd pencil
    git checkout development
    
  2. Install project dependencies:

    yarn install
    # or
    npm install
    
  3. Launch the development build:

    yarn start
    # or
    npm start
    

    For dev tools and inspection windows enabled:

    npm run start:dev
    

Packaging & Distribution

To compile production bundles for your host platform:

# macOS (DMG, universal / arm64 / x64)
npm run dist:osx

# Windows (NSIS Installer)
npm run dist:win32

# Linux (deb, rpm, tar.gz)
npm run dist:linux

Output binaries are written to the dist/ directory.


Supported Platforms

macOS

Windows

Linux


Contributing

Contributions are welcome. Please refer to the following workflow:

  1. Fork the repository and create a descriptive feature branch (feature/your-feature-name).
  2. Adhere to existing code conventions and formatting guidelines defined in .editorconfig.
  3. Test your changes locally across standard canvas operations and MCP endpoints.
  4. Submit a pull request against the integration branch with a concise summary of changes.

For security concerns or defect reports, please open an issue using the provided issue templates.


Star History

Pencil Star History Chart

License

Pencil is open-source software licensed under the GNU General Public License v2.0 (GPL-2.0).

Copyright © 2008–2026 Evolus and individual contributors.

pencil (evolus/pencil)

正在搜索数据库…

9.9K ·GitHub
这是什么?Pencil 是一款免费的开源桌面应用,用于 GUI 原型设计、线框图绘制和图表制作,支持 macOS、Windows 和 Linux。
它是独立的桌面应用,还是某个软件的插件?它是一款基于 Electron 的独立桌面应用,自带矢量画布,不是浏览器扩展或插件。
我该如何让它运行起来?从 Pencil 下载页面或 GitHub Releases 下载适用于你操作系统的安装程序并启动即可;你也可以克隆仓库,使用 npm/yarn 从源码运行。
使用 AI 功能需要联网或云账户吗?不需要。MCP 服务器在应用内通过本地回环地址(127.0.0.1)运行,所有文档数据都保存在你的电脑上,不进行云同步,也不发送遥测数据。
它面向哪些人?面向需要制作原型图、图表和用户流程的开发者、UX 设计师和产品团队。
Pencil 会把我的线框图或设计数据发送到别处吗?不会,所有内容都保留在本地回环环境中,不会向第三方发送分析数据或遥测数据。
哪些 AI 助手可以连接 Pencil?任何支持模型上下文协议(MCP)的客户端都可以,包括 Claude Desktop、Cursor、Antigravity 和 VS Code,并在设置 > MCP 中提供了内置的配置代码片段。
连接后 AI 助手实际能做什么?它可以插入、移动、调整大小和设置矢量图形的样式,管理页面,搜索图标和模板库,甚至可以对画布截取视觉快照,在继续迭代前检查对齐和对比度。
应用内置了哪些模板库和图标集?包括 shadcn/ui、Bootstrap、Material Design、iOS 和 Android 等 UI 框架,流程图、UML 和 ER 图形状,以及来自 Tabler、Lucide 和 FontAwesome 的图标目录。还可以通过社区的 Stencils Repository 添加更多内容。
AI 生成的元素只是平面图片,还是之后可以编辑?它们是真正的矢量图元(而非位图),因此每个由 AI 创建的图形都可以像手绘图形一样调整大小、更改样式或重新排列。
作者
evolus
大小
38.1 MB
星标
9.9K
时长
12年
提交 · 90 天