@fungi.computer/inkcap

中文文档
0.14.6发布于 2026/11/16MITES Module近 30 天下载 9824

Inkcap: edit the files on your Computer, an App for Oyster

原始使用文档
文档目录6 节
  1. What you can do
  2. Get it
  3. Change it
  4. Agent tools
  5. Build and check
  6. License

Inkcap (@fungi.computer/inkcap)

Inkcap edits the files on your Computer: a file explorer, tabs and a code editor in the browser.

Inkcap with the koi-pond project open in the explorer and src/fish.ts in the editor beside README.md

Inkcap is one of the starter Apps of Oyster, the open App host that runs on your own Cloudflare account. On Oyster, the Computer is a Linux workspace in a Cloudflare Container, and Inkcap reads and writes its /workspace.

What you can do

  • Browse the Computer's folders and open files in tabs.
  • Edit text with syntax highlighting, and save with Ctrl+S / ⌘S.
  • Preview images (PNG, JPEG, GIF, WebP, SVG and AVIF) and video (MP4 and WebM).
  • Turn on Preview Markdown for any .md file.
  • Create files and folders, Save file as another path, or download a draft without writing it.
  • Resolve conflicts: when a file changed on the Computer after you opened it, choose Keep mine, Reload theirs or Compare before anything is overwritten.

Closing a tab or the App with unsaved edits asks whether to save, discard or cancel. On a phone, Open file explorer brings the explorer over the editor.

Inkcap on a phone in the light theme, with no file open and a New draft button

Get it

Inkcap installs with the other starter Apps. On a deployed Oyster (see the Oyster quick start), run:

export OYSTER_URL=https://oyster.<your-subdomain>.workers.dev
export OYSTER_OWNER_KEY=<your owner key>
npx oyster install-apps

The installer clones this repository and the six others, seeds each on your Oyster with git push, builds them on your Computer and installs them. Sign in at $OYSTER_URL/login with the owner key and open Inkcap from the Tourtois desktop. Run install-apps again to update; each App keeps its data.

Change it

Every installed App is also a template you can fork on your own Oyster. Fork Inkcap into a Bonsai repository and clone it with ordinary git:

curl -X POST -H "Authorization: Bearer $OYSTER_OWNER_KEY" -H 'content-type: application/json' \
  -d '{"appId":"app_inkcap","name":"my-inkcap"}' \
  $OYSTER_URL/apps/bonsai/methods/apps.fork
git -c http.extraHeader="Authorization: Bearer $OYSTER_OWNER_KEY" \
  clone $OYSTER_URL/git/bonsai/my-inkcap.git

The reply names your fork's App id and repository. Push your edits, open the repository in Bonsai and choose Settings, then Build & install with that App id and your commit as git:<sha>. Install the Release at inkcap to replace the running Inkcap, or at a new id to keep both.

To work from GitHub instead, fork this repository and point the installer at your forks with --repositories <base URL> and --ref <branch or tag>. The installer reads all seven starter Apps from that base, so fork them under one account.

Agent tools

Agents call Inkcap through Oyster's MCP endpoint, or at POST $OYSTER_URL/apps/inkcap/methods/<name> with a key; see Git, keys and MCP.

MethodWhat it does
listFiles({path?, limit?, offset?})Reads one page of a directory, up to 256 entries.
readFile({path, byteOffset?, byteLength?})Reads up to 128 KiB of a file as base64.
writeFile({path, content, expectedContent?})Writes UTF-8 text, optionally only if the file still holds expectedContent.
documents.recentLists the documents most recently opened and edited in Inkcap.

Paths are absolute and cannot contain ... A read-only attachment cannot write, and the host picks the Computer: no argument selects one.

Build and check

Inkcap is a React App built with Vite. The file tree and editor come from @pierre/trees and @pierre/diffs, and the controls from Caps.

pnpm install
pnpm build
pnpm typecheck
pnpm test

src/InkcapApp.tsx owns the tabs, the selected Computer and the close checks. src/useFileDocument.ts owns each draft, its saved baseline and conflict recovery. The agent tools are in backend/methods.ts, and package.json declares the permissions the App asks for.

License

MIT. See LICENSE.

版本与发布记录

@fungi.computer/inkcap 共发布 59 个版本,首次发布于 2026/10/17;过去 12 个月发布了 59 个版本。

版本发布日期距今
0.14.6latest2026/11/16今天
0.14.52026/11/15今天
0.14.42026/11/15今天
0.14.32026/11/15今天
0.14.22026/11/15今天
0.14.12026/11/15今天

其他发布通道:next → 0.8.8。

关于 @fungi.computer/inkcap 的常见问题

@fungi.computer/inkcap 是什么?

Inkcap: edit the files on your Computer, an App for Oyster

如何安装 @fungi.computer/inkcap?

在项目目录运行 npm install @fungi.computer/inkcap,或使用 pnpm add / yarn add / bun add。

@fungi.computer/inkcap 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/fungi.computer__inkcap 是否存在。

@fungi.computer/inkcap 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@fungi.computer/inkcap 可以商用吗?

@fungi.computer/inkcap 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@fungi.computer/inkcap 的下载量有多少?

根据 npm 官方下载统计,@fungi.computer/inkcap 在 2026/10/16 – 2026/11/14 这 30 天内被下载 9,824 次,日均约 327 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@fungi.computer/inkcap 还在维护吗?

最新版本 0.14.6 发布于 2026/11/16(今天);至今共发布 59 个版本,其中过去 12 个月发布了 59 个;首次发布于 2026/10/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。