IQ

ian-q/napkin

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

0 stars 质量 62 趋势 14MIT

Excalidraw 临时的 AI 编程提示素描窗口:拖入图片,标记,粘贴一个小的盖章 JPEG。代理可以画回去。

概览

一个一次性的草图窗口,用来向AI编码代理展示你的意思。 按下快捷键。Excalidraw窗口会打开,里面已经显示你刚复制的图片。裁剪、排列,用红色圈出你想画的部分。按(⌘↵):窗口关闭,剪贴板上出现一个小的扁平JPEG,准备粘贴到提示中。 每张扁平图像都会附上一个小邮票——餐巾纸 nk-0042——而后面可编辑的画布会被保留一段时间。熟悉约会的经纪人可以阅读邮票,在你的画布上画上自己的标记(“你是说这个边缘吗?”),然后帮你把窗户弹回去。 需要 bun、ImageMagick 7 和 Chromium 系列浏览器(Chrome、Brave、Chromium、Edge 或 Vivaldi)。macOS 是测试平台;Linux 应该能配合安装 WL-clipboard 或 xclip,但尚未测试。 它会把餐巾纸克隆到 ~/.local/share/napkin/src,如果缺少 Homebrew 可以安装 bun 和 ImageMagick,构建它,链接 ~/。

概述(AI 翻译)

一个一次性的草图窗口,用来向AI编码代理展示你的意思。

按下快捷键。Excalidraw窗口会打开,显示你刚才的图片 已经复制在上面了。裁剪,排列,用红色圈出你想说的部分。按完成(⌘↵): 窗口关闭,剪贴板上出现一张小而扁平的JPEG,准备粘贴到提示中。

观看带声音的20秒视频

  • 一个快捷键。 点击它可创建新的画布;长按以显示你的历史记录。
  • 你复制的内容已经在那里了。 在Finder中选择照片(直接从AirDrop直接使用HEIC可以),复制,点击快捷键。
  • 故意小。 导出最多2000像素,经过Lanczos重采样:代币消耗的是像素,所以你不用为一张120万像素的白板照片付费。
  • 你的代理人可以回画。 每张图片都带有一个印章(napkin nk-0042),指向可编辑画布。代理人不确定你的意思时,会在你的草图上圈出猜测,然后帮你打开窗口。
  • 本地。 一台位于127.0.0.1的小型服务器和一个无铬浏览器窗口。你的机器不会有任何信息流出。

安装

需要面包、ImageMagick 7 和一个 Chromium 家族 浏览器(Chrome、Brave、Chromium、Edge 或 Vivaldi)。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

A throwaway sketch window for showing an AI coding agent what you mean.

Press a hotkey. An Excalidraw window opens, with any images you just copied already on it. Crop them, arrange them, circle the bit you mean in red. Press Done (⌘↵): the window closes and a small, flattened JPEG is on your clipboard, ready to paste into your prompt.

Watch the 20-second video, with sound

yeah that makes sense, but for this airfoil I was thinking we have it
a bit more rounded here, kinda like this: [Image #1]
  • One hotkey. Tap it for a new canvas; hold it for your history.
  • What you copied is already there. Select photos in Finder (HEIC straight off AirDrop is fine), copy, tap the hotkey.
  • Small on purpose. The export is at most 2000 px, Lanczos-resampled: what costs tokens is pixels, so you don’t pay for a 12 MP photo of a whiteboard.
  • Your agent can draw back. Every image carries a stamp (napkin nk-0042) that points at the editable canvas. An agent that isn’t sure what you meant circles its guess on your sketch and pops the window back up for you.
  • Local. A small server on 127.0.0.1 and a chromeless browser window. Nothing leaves your machine.

Install

Needs bun, ImageMagick 7 and a Chromium-family browser (Chrome, Brave, Chromium, Edge or Vivaldi). macOS is the tested platform; Linux should work with wl-clipboard or xclip installed but has not been tested.

curl -fsSL https://raw.githubusercontent.com/Ian-q/napkin/main/install.sh | bash

That clones napkin into ~/.local/share/napkin/src, offers to install bun and ImageMagick with Homebrew if they are missing, builds it, links ~/.local/bin/napkin, and asks three things:

  1. The hotkey. The default on macOS is a built-in ctrl+option+n: a tiny background helper (compiled on the spot with Swift from Xcode’s command line tools; xcode-select --install if you have never needed them) that needs no Accessibility permission. Or a line in skhd, or none.
  2. The Claude Code skill, which teaches agents to read napkins and draw on them.
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add ian-q/napkin
新手?先看 mcpskill.org 教程 →