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

@isvbytes.com/cli

v1.2.4

Published

CLI tool to generate xCloud authToken for AI agents

Readme

@isvbytes.com/cli

生成 xCloud authToken,供 AI agent 和 CLI 工具使用。

从 v1.2.0 开始,CLI 不再内置任何 JWT 或 governance API 地址, 所有认证信息通过 xcloud-service 服务获取 token。

架构

isvbytes (CLI)
      │
      ▼
 xcloud-service  (apps/xcloud-service)
      │
      ▼
 cmp-governance API

CLI 只保存 xcloud-service 的地址和 API key,真正的 governance token 由服务端持有,从而避免在 CLI 二进制中硬编码敏感信息。

快速开始

1. 启动 xcloud-service

cd apps/xcloud-service
pnpm install
pnpm dev          # 默认 http://localhost:8787

服务端从环境变量读取 API key,例如:

API_KEY=your-api-key pnpm dev

2. 配置 CLI

serviceUrl 已内置默认值 http://localhost:8787(v1.2.1+),本地开发只需配置 API key:

# 设置 API key(必须)
isvbytes config set apiKey your-api-key

# 如需指向远端服务(可选,覆盖内置默认)
isvbytes config set serviceUrl http://<remote-host>:8787

或者通过环境变量(优先级高于配置文件):

export ISVBYTES_SERVICE_URL=http://localhost:8787
export ISVBYTES_API_KEY=your-api-key

3. 生成 token

isvbytes generate dev zhangys36

# 输出完整 JSON
isvbytes generate -e dev -c zhangys36 --json

# 显示详细信息
isvbytes generate -e dev -c zhangys36 -v

配置方式(优先级从高到低)

  1. 命令行参数:--api-key、--service-url
  2. 环境变量:ISVBYTES_API_KEY、ISVBYTES_SERVICE_URL
  3. 配置文件:~/.isvbytes/config.json
  4. 内置默认:serviceUrl = http://localhost:8787(apiKey 无默认值,必须显式提供)

配置子命令

# 查看当前配置(apiKey 脱敏显示)
isvbytes config show

# 写入配置项
isvbytes config set serviceUrl http://localhost:8787
isvbytes config set apiKey your-api-key

# 读取单个配置项(apiKey 脱敏显示)
isvbytes config get serviceUrl
isvbytes config get apiKey

其他命令

# 列出支持的环境
isvbytes envs

手动 fallback

如果 xcloud-service 返回 403/401 或不可达,可手动从浏览器获取 token:

  1. 登录 xCloud Web 控制台。
  2. 打开浏览器 Network 面板。
  3. 复制 Authorization: Bearer ... 头部。
  4. 将 token 传入下游工具。

安全提示

  • 不要把真实的 apiKey 提交到 git。
  • ~/.isvbytes/config.json 文件权限为 0o600,目录权限为 0o700。
  • 本仓库不包含 .env 或真实密钥文件。

开发

cd apps/xcloud-token-cli
pnpm install
pnpm dev -- generate dev zhangys36
pnpm build