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

@name_lmw/cockpit

v1.0.0

Published

基于 OpenCLI 协议的 LMP 平台 CLI 客户端

Readme

@liam-sj/cockpit

基于 OpenCLI 协议的 LMP 平台 CLI 客户端,提供简洁的命令行交互体验。

安装

npm install -g @liam-sj/cockpit

安装过程全自动:

| 步骤 | 做什么 | 需要你操作吗 | |---|---|---| | 1. npm 下载包 | 自动 | ❌ | | 2. 注册 cockpit 命令 | npm 自动处理 | ❌ | | 3. 检查 opencli | 没装就自动装 | ❌ | | 4. 安装内置适配器 | bots / agents / workflows → ~/.opencli/clis/cockpit/ | ❌ | | 5. 引导浏览器插件 | 自动打开 Chrome 商店 | ✅ 点「添加至 Chrome」 |

内置适配器

| 适配器 | 命令 | 说明 | |---|---|---| | bots | cockpit bots | 列出 LMP workspace 下的 bots | | agents | cockpit agents | 列出 LMP workspace 下的 agents | | workflows | cockpit workflows | 列出 LMP workspace 下的 workflows |

通用选项:--limit N --page N --workspace ID

cockpit bots --limit 10 --workspace 2024100200300002899
cockpit agents --limit 3 --workspace 2024100200300002899
cockpit workflows --page 2 --workspace 2024100200300002899

适配器开发

为任意网站快速创建适配器:

cockpit adapter init mysite        # 交互式创建
cockpit adapter list               # 列出所有适配器
cockpit adapter verify mysite/bots # 验证适配器

交互式引导:命令名 → 描述 → 域名 → 鉴权方式 → API 地址 → 请求方法 → 分页 → 展示列

根据鉴权方式自动选择模板(Cookie / Token / 无鉴权),生成完整适配器代码。

完整开发流程

1. cockpit adapter init mysite           → 生成适配器
2. vi ~/.opencli/clis/mysite/bots.js     → 修改字段映射
3. cockpit adapter verify mysite/bots    → 验证
4. opencli mysite bots                   → 运行

架构

cockpit
  ├── adapter 命令 → 本地处理(脚手架 + 验证)
  │
  └── 平台命令 → OpenCLI 引擎 → 适配器 → Browser Bridge → 目标平台
                   │
                   └── 内置适配器(bots / agents / workflows)

卸载

npm uninstall -g @liam-sj/cockpit

常见问题

提示 "未找到 opencli"npm install -g @jackwener/opencli

Browser Bridge 未连接 → 确认已装 Chrome 插件,运行 opencli browser-daemon

适配器字段对不上 → 编辑适配器,修改字段映射