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

@qkunio/browser-cli

v0.1.2

Published

Run and manage local terminal sessions from the browser.

Readme

Browser CLI

Browser CLI 把你的CLI带进浏览器。

使用浏览器管理你的所有Claude Code、Codex CLI对话。你可以使用浏览器原生能力对不同对话框进行分组。

请使用 Chrome+Windows 11来体验本项目。

核心卖点

  • 后台完成提醒
  • 多会话像浏览器标签一样管理
  • 关掉页面不丢进程

只要 Browser CLI 服务还在,终端会话会继续跑,回到管理页还能再接上。

功能

  • 会话管理页:查看、进入、关闭当前运行中的终端会话
  • 新建会话:通过系统文件夹选择器选择工作目录
  • 完整终端:基于 node-ptyxterm.js
  • 会话保留:关闭终端页面后,后端 PTY 会话继续运行
  • 占用保护:同一个会话同一时间只允许一个浏览器 tab 连接
  • 本机访问:默认只监听 127.0.0.1

技术栈

  • 后端:Node.js、Express、WebSocket、node-pty
  • 前端:Vite、TypeScript、xterm.js

安装

npm install -g @qkunio/browser-cli
browser-cli

然后打开:

http://127.0.0.1:3819

配置

默认端口是 3819,可以通过 PORT 覆盖:

$env:PORT = "4000"

默认 shell:

  • Windows:powershell.exe
  • macOS/Linux:$SHELL,没有时使用 /bin/bash

可以通过 SHELL_CMD 覆盖:

$env:SHELL_CMD = "pwsh.exe"
npm start

使用方式

  1. 打开 http://127.0.0.1:3819
  2. 点击“新建会话”
  3. 在系统弹窗中选择一个文件夹
  4. 应用会以该文件夹作为工作目录创建终端
  5. 在终端中运行命令,例如:
Get-Location
claude

返回管理页或关闭浏览器 tab 后,会话仍然保留。再次从管理页进入该会话即可继续使用。

API

HTTP:

  • GET /:管理页面
  • GET /sessions:获取当前会话列表
  • POST /sessions:打开系统目录选择器并创建新会话
  • DELETE /sessions/:id:关闭并删除指定会话
  • GET /terminal/:id:终端页面

WebSocket:

  • WS /sessions/:id/terminal

客户端消息:

{ "type": "input", "data": "..." }
{ "type": "resize", "cols": 120, "rows": 32 }

服务端消息:

{ "type": "output", "data": "..." }
{ "type": "exit", "code": 0 }

关闭服务

如果你知道启动时的进程 ID:

Stop-Process -Id <PID> -Force

也可以按端口查找并关闭:

Get-NetTCPConnection -LocalPort 3819 |
  Select-Object -ExpandProperty OwningProcess |
  ForEach-Object { Stop-Process -Id $_ -Force }

当前限制

  • 会话只保存在当前 Node.js 进程内,服务重启后会话会清空
  • 不支持多人协作,也不支持远程认证访问
  • 同一个会话同一时间只能被一个浏览器 tab 打开
  • Linux 文件夹选择依赖 zenity
  • macOS 文件夹选择依赖 osascript

验证

npx tsc --noEmit
npm run build