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

ribo-cli-setup

v2.3.0

Published

ribo-cli 一键安装器:检测操作系统与 CPU 架构,从 ribo 网关下载对应平台 CLI 二进制,完成 WorkBuddy / 千问办公接入与实名授权

Readme

ribo-cli-setup npx 一键安装器

员工无需手动下载二进制、无需 sudo,一条命令完成「检测平台 → 从网关下载对应二进制 → 接入 WorkBuddy/千问办公 → 实名授权」。

用法

# 最简:自动检测平台,从默认网关下载并接入 WorkBuddy
npx ribo-cli-setup

# 接入千问办公
npx ribo-cli-setup --qwenwork

# 指定内网网关地址(下载源 + CLI 运行地址)
npx ribo-cli-setup --gateway https://gw.ribo.internal

# 组合示例
npx ribo-cli-setup --gateway https://gw.ribo.internal --target qwenwork --bin-dir ~/bin

# 仅下载二进制,不自动授权
npx ribo-cli-setup --skip-auth

# 升级:强制重下二进制 + 重新安装技能(不碰 mcp.json)
npx ribo-cli-setup --upgrade
npx ribo-cli-setup --upgrade --target qwenwork

# 解除注册
npx ribo-cli-setup --uninstall --target workbuddy

也可用环境变量代替 --gateway:

RIBO_GATEWAY_URL=https://gw.ribo.internal npx ribo-cli-setup

工作原理

  1. 平台检测:process.platform(darwin/linux/win32)+ process.arch(arm64/x64→amd64)
  2. 拉取清单:GET <gateway>/download/manifest → 各平台文件名、大小、SHA256、最新版本
  3. 下载校验:GET <gateway>/download/<file> 流式下载到 ~/.local/bin/ribo-cli(Windows 为 %LOCALAPPDATA%\ribo-cli-setup\ribo-cli.exe),逐块计算 SHA256 并与清单比对,损坏即报错
  4. 配置网关:ribo-cli config set-gateway <url>
  5. 接入客户端:ribo-cli install --workbuddy|--qwenwork(写 mcp.json + 装 Skill 包)
  6. 实名授权:交互确认后执行 ribo-cli auth init(企微扫码/mock 确认页)

二进制由网关 /download/** 端点分发(见 gateway/.../api/DistController.java),文件名白名单 + 目录穿越防护,公开可下载(运行仍需实名授权)。

选项

| 选项 | 说明 | |---|---| | -g, --gateway <url> | 网关地址,默认 https://aigc.ribo-group.com/asushiye | | -t, --target <name> | workbuddy | qwenwork | | --workbuddy / --qwenwork | target 的快捷写法 | | --bin-dir <dir> | 二进制安装目录,默认 ~/.local/bin | | -f, --force | 忽略本地已有版本,强制重新下载 | | --upgrade | 升级:强制重下二进制 + 重新安装技能(不碰 mcp.json) | | --skip-auth | 安装后不自动执行 auth init | | --uninstall | 解除注册 | | -y, --yes | 跳过确认 |

发布到 npm

cd npx
npm login
npm publish            # 包名 ribo-cli-setup,bin 入口 bin/cli.js

发布后全公司即可 npx ribo-cli-setup 一键接入。若用私有 registry,员工侧加 --registry 或配置 .npmrc。

本地测试(无需发布)

# 在项目根目录,用临时 HOME 隔离测试,不影响真实配置
HOME=/tmp/ribo-test node npx/bin/cli.js \
  --gateway http://127.0.0.1:8081 --target qwenwork \
  --bin-dir /tmp/ribo-test/bin --skip-auth --yes