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

@surething/cockpit

v1.0.213

Published

Claude Code GUI for parallel AI coding — drive Claude (default), OpenAI Codex, DeepSeek, Kimi, or local Ollama in tabs. Multi-project sessions, terminal, browser & DB bubbles, code review, slash modes. Local-first, MIT.

Readme


OpenCockpit 是开源的 Claude Code GUI —— 也是你想接入的任何 Agent 的统一画布。多项目 Claude 会话开箱即用;想用 OpenAI Codex、DeepSeek、Kimi 或本地 Ollama?直接新开一个 tab。内置终端、Chrome 自动化、PostgreSQL / MySQL / Redis 气泡、代码评审与斜杠模式 —— 全部本地。

https://github.com/user-attachments/assets/18f1a5dc-64f3-4ff6-b9fc-9cd08181fbb8

npm i -g @surething/cockpit && cockpit

为什么选 Cockpit?

Anthropic 把 Claude Code 默认做成 CLI。这对硬核玩家是对的 —— 但只要你同时跟进 2+ 个项目,终端就成了"没有仪表盘的塔台"。

Cockpit 就是那个仪表盘。它不替代 Claude Code,而是站在官方 Agent SDK 之上,补齐 CLI 给不了的能力:

| 裸用 Claude Code 的痛 | Cockpit 的解法 | |---|---| | 只能用一个模型 | 5 个引擎按 tab 并排:Claude(默认)、OpenAI Codex、DeepSeek、Kimi、本地 Ollama —— 每个 tab 独立会话 | | 一次只能开一个会话,3+ 项目就乱 | 多项目标签页、并发 Agent 会话、红点收件箱、桌面通知 | | 图片附件麻烦 | 拖拽 / 粘贴图片直接进对话 | | "我昨天调的那个 bug 在哪?" | Cmd+K 跨项目会话浏览,会话固定 / 分叉 | | Agent 够不到浏览器 / 数据库 | 智能气泡:Chrome、PostgreSQL、MySQL、Redis —— Agent 可驱动 | | 读陌生仓库就是 90 分钟"找地鼠" | 代码地图(Code Map) chip 视图 —— caller / callee pin 一点即跳 | | AI 输出审阅低效 | 局域网共享评审页、行级评论、任意评论可回喂给 AI | | 每天写一遍"做 X 但不要动代码" | 斜杠模式 /qa /fx /review /commit + 自定义 ~/.claude/commands/*.md | | 没有自动化触发器 | 一次性 / 间隔 / Cron 定时任务 | | 担心"云端中转" | 完全本地。无遥测,Codex / DeepSeek / Kimi 的 Key 仅存在本机 ~/.cockpit/settings.json |

功能特性

引擎 —— 默认 Claude,也接得住你想要的任何 Agent

  • Claude (默认) —— 完整官方 Agent SDK;claude CLI 已配置即零额外设置
  • OpenAI Codex —— 直接读 ~/.codex 配置,聊天 / Shell / 气泡都一样
  • DeepSeek —— 通过 Claude SDK 走 Anthropic 兼容端点;粘 Key,选 v4-prov4-flash
  • Kimi (Moonshot) —— 函数调用在聊天里完整渲染,跟 Claude 一样
  • Ollama —— 自动拉起守护进程;从聊天头部下拉任意已 pull 的模型;完全离线
  • 每个引擎跑在独立 tab,独立会话历史;新建 tab 时下拉切换
  • API Key 仅保存在本机 ~/.cockpit/settings.json无云端中转

Agent —— 可扩展的 AI 对话

  • 默认引擎走官方 Claude Agent SDK —— 零额外设置
  • 多项目并发会话,桌面通知 + 红点徽标
  • 会话固定 / 分叉,跨项目会话浏览(Cmd+K)
  • !command 前缀直接执行 shell —— 输出回流为对话上下文
  • 图片附件、代码引用、Token 用量统计

Explorer —— 代码与文件

  • 4 标签页文件浏览器:目录树 · 最近 · Git 变更 · Git 历史
  • 语法高亮 (Shiki) + Vi 模式编辑
  • Git blame、Diff 视图、分支切换、Worktree 管理
  • LSP 集成 —— 跳转定义、查找引用、悬浮类型信息
  • 代码地图(Code Map) —— 每个函数渲染为 chip,左右两侧分别列出 caller / callee,点击 pin 即可顺着调用图走。多语言支持:TS/JS、Python、Go、Rust。无需 LSP、无需项目预热,离线可用。
  • CodeGraph(项目图谱) —— 给 Agent 的代码图谱(code graph):同一份 tree-sitter 索引开放为 6 个 HTTP 接口(search / callers / callees / impact / file / coedit),Agent 直接按坐标精确查询,无须 grep 字面。在 chat 输入 /cg 触发。只返坐标不返源码——比 grep 精确、比 Read 省 token,还能抓住 regex 看不见的「约定耦合」。
  • 模糊搜索 (Cmd+F)、JSON 查看器、Markdown 预览

Console —— 终端与智能气泡

  • 完整 xterm.js 终端,Shell 集成
  • 🌐 浏览器气泡 —— 通过无障碍树控制 Chrome(点击、输入、导航、截图、网络)
  • 🐘 PostgreSQL 气泡 —— 浏览 Schema、执行查询、导出
  • 🐬 MySQL 气泡 —— 浏览数据库与表、执行查询
  • 🔴 Redis 气泡 —— 浏览键值、查看数据、执行命令
  • 拖拽排序、网格 / 放大布局,每个标签独立的环境变量与 Shell 别名

代码评审 —— 局域网共享,无需 SaaS

  • 局域网分享评审页面 —— 队友零安装即可参与
  • 行级评论与回复线程
  • 任意评论可发给 AI 作为上下文,自动修复
  • 未读评论红点提醒,跨项目可见

斜杠模式 —— 切换 Agent 姿态

  • /qa —— 只澄清:复述、反问、绝不写代码
  • /fx —— 只诊断:Bug 证据链分析,绝不改文件
  • /review —— 读 diff、写评审,不动手重写
  • /commit —— 暂存改动、按你仓库的风格起草 message、提交
  • /cg —— CodeGraph 项目探索:6 个 HTTP 接口按符号 / 调用关系 / 影响范围 / 协同编辑精确查询(比 grep 精准)
  • 自定义~/.claude/commands/./.claude/commands/ 下任意 *.md 即斜杠指令

定时任务 —— 给 AI 的 Cron

  • 一次性、间隔、Cron 三种调度
  • 暂停 / 恢复、拖拽排序,跨项目追踪结果

Skills —— 可扩展性

  • 任意 SKILL.md 都能教 Agent 新技能
  • 在对话中用 /skill-name 直接调用
  • 所有技能在统一 Skills 侧边栏管理

使用场景

  • 独立开发者多仓并行: "API 在重构、Web 在写测试、Pipeline 在排 bug —— 同时跑、同时可见。"
  • 新仓库的第一天: 用 Code Map 打开它,沿着 caller / callee pin 一路点过去 —— 鉴权流程 5 次点击就走完,不再是 90 分钟的"文件树找地鼠"。
  • 二人小团队: Senior 用局域网共享评审页 review,半成品代码不用绕 GitHub PR。
  • 评审 AI 写的 PR: 把改动文件切到 Code Map,改动过的函数被高亮,周围还画着它们的 caller / callee —— 一眼看清这次改动的爆炸半径。
  • 全栈杂活模式: 后端 bug 一个 tab 跑 /fx,前端 diff 另一个 tab 跑 /review,最后 /commit 收尾 —— 三种姿态、三种 Agent 模式。
  • 便宜的二次意见: 同一个 prompt 在两个 tab 跑 —— 一个 Claude、一个 DeepSeek v4-pro,对比答案后再决定相信谁。
  • AI 自动化 QA: 浏览器气泡 + 定时任务 = "每晚 2 点跑一遍 UI 冒烟流程并发摘要"。
  • 隐私敏感代码: 在你的笔记本上跑。配合 Ollama tab 即可完全断网工作。无遥测、无中转。

在线体验

无需安装,只读沙盒(5 分钟):

在线体验

前置依赖

  • Node.js ≥ 20 —— nodejs.org
  • Claude Code —— docs.anthropic.com/en/docs/claude-code(默认引擎)
  • Git —— 用于 Git 相关功能(blame、diff、worktree 等)
  • Chrome (可选) —— 浏览器气泡需安装 ~/.cockpit/chrome-extension 中的扩展

可选,按引擎

  • OpenAI Codex —— 执行一次 codex login 即可生成 ~/.codex 配置
  • DeepSeek —— 到 api-docs.deepseek.com 申请 API Key,在引擎选择器里粘贴
  • Kimi (Moonshot) —— 到 platform.moonshot.cn 申请 API Key,在引擎选择器里粘贴
  • Ollama —— 安装 ollama.comollama pull <model>;Cockpit 会自动拉起守护进程

所有 API Key 仅保存在本机 ~/.cockpit/settings.json。无云端中转。

安装

npm install -g @surething/cockpit
cockpit                # 启动驾驶舱 → http://localhost:3457
cockpit .              # 打开当前目录为项目
cockpit ~/my-project   # 打开指定目录
cockpit -h             # 帮助

cockpit(完整名)和 cock(短别名)都随包安装 —— 任选其一。文档与示例统一使用 cockpit,老用户的肌肉记忆 cock 仍然好使。

从源码安装

git clone https://github.com/Surething-io/cockpit.git
cd cockpit
npm install
npm run setup       # 构建 + npm link(注册 `cockpit` 与 `cock` 命令)

CLI

cockpit browser <id> snapshot      # 获取页面元素树
cockpit browser <id> click <uid>   # 点击元素
cockpit terminal <id> exec "ls"    # 执行命令
cockpit terminal <id> output       # 获取终端输出

阅读更多

开发

npm run dev         # 开发服务 → http://localhost:3456
npm run build       # 生产构建
npm run setup       # 构建 + npm link
npm run lint        # ESLint

技术栈

Next.js 16 · React 19 · TypeScript · TailwindCSS · xterm.js · node-pty · Shiki · tree-sitter (WASM) · i18next · Claude Agent SDK · Vercel AI SDK

贡献

欢迎 Issue 和 PR。详见 CONTRIBUTING.mdGUIDE.md

许可证

MIT © Surething


如果 Cockpit 今天给你省了 10 分钟,给一颗 ⭐️ 是我们最实惠的"谢谢"。