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

@huyuan-ai/cli

v1.4.0

Published

企业场景下的 AI 助手与技能管理命令行工具(@huyuan-ai/cli,命令 huyuan-ai-cli)。集成 OpenCLI 与私有技能安装。

Readme

@huyuan-ai/cli

企业场景下的 AI 助手与技能管理命令行工具。npm 包名@huyuan-ai/cli,安装后命令行入口huyuan-ai-cli(见 package.jsonbin)。集成 OpenCLI(Git Submodule)用于浏览器侧能力(如豆包对话),并通过自研 Token Gatewayskills-hub 单仓同步技能到本地。

从 npm 全局安装

npm install -g @huyuan-ai/cli
huyuan-ai-cli --help

功能概览

  • 登录:将企业授权 Key 写入 ~/.huyuan-ai/config.json
  • 安装技能huyuan-skill install 等子命令用 Key 向网关换取短期令牌后,经 GitHub Contents API 按索引将技能目录同步到本地(默认 ~/.agents/skills
  • 豆包对话doubao ask 在 OpenCLI 已加载的 registry 上执行 doubao/ask(需已登录,且依赖 OpenCLI 浏览器/Bridge 环境)

更细的架构、目录约定与开发约束见 AGENTS.md

环境要求

  • Node.js:建议 ≥ 20(与 OpenCLI 子模块一致)
  • 包管理:推荐 pnpm(仓库已声明 packageManager

从源码构建与运行

  1. 克隆并初始化子模块:

    git clone --recurse-submodules <repo-url>
    cd huyuan-ai-cli

    若已克隆未带子模块:git submodule update --init --recursive

  2. 安装主项目依赖:

    pnpm install
  3. 一键构建(先安装并构建 vendor/opencli,再 tsc 编译本仓库;发布前也请执行此步):

    pnpm run build

    若仅改本仓库 src/、且子模块 dist/ 已是最新,可改用 pnpm run build:tsc 只跑 TypeScript,加快迭代。

  4. 运行 CLI:

    node dist/index.js --help

    全局链接(可选):pnpm link --global,之后可直接使用 huyuan-ai-cli

常用命令

| 命令 | 说明 | |------|------| | huyuan-ai-cli login <key> | 保存企业授权 Key | | huyuan-ai-cli huyuan-skill install <skillId> | 从 skills-hub 索引安装技能到本地(需已 login 与网关环境变量) | | huyuan-ai-cli doubao ask <prompt> | 豆包对话(需已 login) |

查看子命令帮助:huyuan-ai-cli doubao ask --help

环境变量

安装技能

| 变量 | 说明 | |------|------| | HUYUAN_TOKEN_GATEWAY_URL | 可选;默认 https://skills.xds365.com(Token Gateway 根地址)。覆盖示例:https://your-app.vercel.app,详见 src/constants.ts | | HUYUAN_SKILL_HUB_OWNER / HUYUAN_SKILL_HUB_REPO 等 | 可选;覆盖 skills-hub 单仓 owner、仓库名、分支与索引文件名,默认见 src/constants.ts | | INSTALL_ROOT | 可选;技能落地根目录,默认 ~/.agents/skills |

版本更新提示

命令执行结束后,CLI 会按频率向 npm registry 查询 @huyuan-ai/cli 是否有更新;若有且当前版本较旧,会在 stderr 提示升级命令。同一机器上 24 小时内最多提示一次,并限制拉取 registry 的频率,避免高频脚本刷屏。

| 变量 | 说明 | |------|------| | HUYUAN_AI_DISABLE_UPDATE_CHECK | 若设置为任意非空值,关闭上述新版本检查与提示(适合 CI、自动化脚本或不需要联网检查的场景)。 |

说明:若环境变量 CI 已设置(常见于 CI),也会跳过版本检查,无需再设 HUYUAN_AI_DISABLE_UPDATE_CHECK

脚本

| 脚本 | 说明 | |------|------| | pnpm run build | 构建 vendor/openclinpm install + npm run build)后 tsc 编译到 dist/ | | pnpm run build:tsc | 仅 tsc(子模块已有 dist/ 时用) | | pnpm run typecheck | tsc --noEmit |

仓库结构(摘要)

src/
  index.ts                 # 入口
  cli/program.ts           # Commander 装配
  core/                    # 登录、网关换 token 等平台能力
  sites/doubao/            # 豆包子命令(可扩展其他 sites)
  integrations/opencli/    # OpenCLI bootstrap 与 registry 执行封装
  utils/config.ts          # 本地配置
  constants.ts             # 网关等常量与环境变量
vendor/opencli/            # OpenCLI 子模块(需单独 build)

许可证

ISC(见 package.json)。