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

@humaninloop/cli

v0.1.0

Published

Human-in-the-loop interaction tool. The `AskHuman` CLI pops up a window (or uses Telegram) to collect human input and prints the result to stdout — usable standalone or as a dependency.

Readme

@humaninloop/cli

跨平台「Human-in-the-loop」交互工具。命令行 AskHuman 在 AI 助手需要确认/补充时弹出窗口(或经 Telegram)收集人类回应,并把结果按固定区块写到 stdout。

底层为单一可执行文件(Tauri 2 / Rust)。本 npm 包通过「平台子包」分发:安装时只会拉取与当前平台匹配的一个二进制。

单独使用

npm i -g @humaninloop/cli
AskHuman "要不要继续?" -o "继续" -o "停止"

作为依赖(程序集成)

npm i @humaninloop/cli
import { getBinaryPath, isAvailable } from "@humaninloop/cli";
import { spawnSync } from "node:child_process";

if (!isAvailable()) {
  // 二进制未就位:跳过人工确认环节,避免阻塞流程
} else {
  const r = spawnSync(getBinaryPath(), ["要继续吗?", "-o", "继续", "-o", "停止"], {
    encoding: "utf8",
  });
  if (r.status === 3) {
    // 当前环境无任何可用 channel(GUI 打不开且未配置 Telegram):降级处理
  } else if (r.status === 0) {
    // 成功:解析 r.stdout 的结果区块
    console.log(r.stdout);
  }
}

getBinaryPath() 解析顺序:环境变量 HUMANINLOOP_BINARY → 平台子包 → 系统 PATH

退出码契约

| 退出码 | 含义 | |---|---| | 0 | 成功拿到结果,或用户取消(输出 [状态]) | | 3 | 无任何可用 channel(本地弹窗打不开且未配置 Telegram)——下游应降级 | | 1 | 其他异常 |

stdout 只含结果区块([选择的选项]/[用户输入]/[图片]/[状态]),所有日志与报错走 stderr。

平台与系统依赖

支持 macOS(arm64/x64)、Windows(x64)、Linux(x64)。

Linux 运行 GUI 弹窗需系统具备 WebKitGTK(如 libwebkit2gtk-4.1)。若缺失且配置了 Telegram,会自动改走 Telegram;若两者都不可用,则以退出码 3 提示降级。

更多信息见项目仓库:https://github.com/Naituw/HumanInLoop