npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

gpt-web-agent

v0.6.0

Published

A local MCP tool runtime for browser-based AI agents. No model proxy or inference API required by the runtime.

Readme


这是什么?

平时用 ChatGPT 写代码,是它给你一段代码,你复制、粘贴、运行,再把报错贴回去。

GPT Web Agent 把这一步省掉了。 在你电脑上装好它,ChatGPT 网页版就能直接读你的项目、改文件、跑测试,改完告诉你结果。你只需要在聊天框里说话:

你:  看看我的 blog 项目有什么可以优化的,先只分析。
GPT: [读取 package.json、src/…] 发现 3 个问题:① 首页图片没压缩 ② ……
你:  修第一个,改完跑一下测试。
GPT: [修改 src/image.js] [运行 npm test] 测试通过。改动了 2 个文件:……

它是一个运行在你电脑上的小程序(MCP 服务),通过 OpenAI 官方的私有隧道和你的 ChatGPT 连接。ChatGPT 负责思考,这个程序负责在你的电脑上动手。

为什么用它?

| | 复制粘贴 | GPT Web Agent | | --- | --- | --- | | 改代码 | 你手动复制粘贴 | GPT 直接改文件 | | 跑测试 | 你运行,再把报错贴回去 | GPT 自己跑,自己看结果 | | 看项目 | 你挑文件贴给它 | GPT 自己去找、去读 | | 生成的图片 | 手动下载再挪位置 | 一句话存到项目指定目录 |

  • 用你现有的 ChatGPT:本项目不调用任何模型 API,不额外按 token 计费,也不需要装 Codex 等其它 AI 工具。
  • 不绑项目:说一句“再看看 YYY 项目”就切过去了,不用登记路径。
  • 不会误覆盖:写文件前校验内容指纹(SHA-256),文件在这期间被你改过就拒绝覆盖。
  • 关网页也不中断:已经开始的测试、构建会在电脑上继续跑,回来再问结果。
  • 不碰你的账号:不代理 ChatGPT、不读取浏览器 Cookie,只走 OpenAI 官方隧道。

快速开始

[!IMPORTANT] 请用个人账户,并先确认两件事:ChatGPT「设置 → 账户安全与登录」里有开发者模式;Platform → Tunnels 里能点 Create tunnel。ChatGPT 订阅不等于有隧道权限;公司或学校账户通常要管理员开通。

1. 安装(需要 Node.js 22+,支持 Mac、Linux 和原生 Windows)

npm install --global gpt-web-agent

2. 在 OpenAI Platform 创建隧道和 key

  • Tunnels → Create tunnel,关联你的 ChatGPT 工作区,复制 tunnel_... ID。
  • API keys → Create new secret key,权限选 Restricted,只给 Tunnels 勾 Read 和 Use。

3. 在电脑上连接

gpt-web-agent connect

按提示粘贴隧道 ID 和 key;想让 GPT 跑测试,就在第二个问题输入 YES。看到 tunnel-client started 后保持终端开着。以后每次开机都只运行这一条命令。

4. 在 ChatGPT 添加连接

打开开发者模式 → 插件页 点 + → 创建应用 → 创建 MCP 应用 → 连接选隧道,身份验证选无身份验证,勾选风险确认 → 创建。新建聊天,在输入框旁的 + 里选中它,就可以开始了。

每一步的页面截图、成功标志和排错,见 上手教程。

它能做什么

| 能力 | 说明 | | --- | --- | | 浏览和搜索 | 列目录、读文件、全文搜索 | | 修改文件 | 新建、整体改写或局部补丁,写入前校验防止覆盖 | | 运行命令 | 跑测试、构建、装依赖;可查看进度、超时和取消(需在配置时开启) | | 保存图片 | 把网页里生成或上传的图片原样存进项目 | | 任务记录 | 多步任务的进度检查点,重新连接后还能接着看 | | 委托 Codex | 可选:你明确要求时,把任务交给本机 Codex 执行 |

安全须知

[!WARNING] 开启“运行命令”后,GPT 执行的命令和你自己在终端里敲的权限一样大,不是沙箱。只在自己的连接里使用;处理敏感项目时,可以不开启命令,只用文件读写。

  • 运行 key 存在 macOS 钥匙串、Linux 系统密码库,或由 Windows DPAPI 按当前用户加密保存;不会以明文写进配置文件或仓库。
  • 连接只通过 OpenAI 官方私有隧道,不在公网开放端口。不要自己把本地服务映射到公网。
  • 更多细节见安全说明。

常见问题

本项目免费开源,也不调用模型 API。你需要能开启开发者模式的 ChatGPT 账户,以及 OpenAI Platform 的隧道权限;隧道相关费用以 OpenAI 账户页面显示为准。

支持原生 Windows。命令执行使用 Windows PowerShell,隧道 key 使用 DPAPI 加密,并下载 OpenAI 官方 Windows 版 tunnel-client。原生 Windows 暂不支持本地 Codex 委托和 install-service,但这不影响网页读写文件、执行命令和跑测试。

连接会断开,ChatGPT 暂时调不到工具。重新运行 gpt-web-agent connect 即可。Mac 上可以用 gpt-web-agent install-service 设置登录后自动连接。

这条聊天没选中连接。点输入框旁的 +,搜索你创建的连接名并选中,再让它先调用 workspace_info 试试。

在 Platform 新建一个 key,运行 gpt-web-agent set-key 粘贴,再重新运行 gpt-web-agent connect。

更多问题见上手教程的排错表。

文档

许可

MIT