# window.showDirectoryPicker 为您开启了一个崭新的世界

- 来源：Hacker News 热门（buzzing.cc 中文翻译）
- 作者：steveharrison
- 发布时间：2026-06-23 09:48
- AIHOT 分数：41
- AIHOT 链接：https://aihot.virxact.com/items/cmqq0hgql05idslp5nmgp1jn4
- 原文链接：https://steveharrison.dev/showdirectorypicker-opens-up-a-whole-new-world

## AI 摘要

Chrome 推出新 API `window.showDirectoryPicker()`，允许网页请求用户授权读写本地目录中的文件。作者利用 Claude 生成了模仿 Apple Aperture 界面的照片管理原型，支持在浏览器内查看、创建文件夹、移动照片，所有操作直接作用于用户文件系统。还基于 Claude 创建了受 Apple Shake 启发的节点式合成应用，可绘制多边形并叠加到源图片上。整个过程无需手写一行代码。

## 正文

window.showDirectoryPicker opens up a whole new world

Chrome introduced a new API, window.showDirectoryPicker() that allows the user to grant access to a directory on their computer and allow a website to read/write everything inside.

Examples that have been thrown around are a local-first notes app, where you can grant it access to a folder full of Markdown notes, and you own the data rather than it being squirrelled away in some cloud service.

The other day I was getting nostalgic about Apple’s Aperture UI and wondered whether Claude could create a similarly-themed UI. I asked it to also use window.showDirectoryPicker.

Here’s the result:

It reminds me of using Lightroom to view local files, but it’s a webpage! You can also create folders within the app and move photos into them, and it all happens on your filesystem.

It doesn’t stop there though. Imagine whole photo & video editing apps using this: powerful UIs in your browser, but working with source files on your filesystem. People are already building WebGPU video editors in the browser—I really hope they also take advantage of new local-first storage opportunities like this.

To take this prototype further, I asked Claude to create a simple compositing app inspired by Apple’s Shake. Sure enough, here’s a little node-based compositing app where you can draw a polygon and get it composited on top of your source image.

All of this without a single line of hand-written code.

It’s an amazing world we’re living in!
