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

@newbeebox/newbeebox-app-engine-cli

v1.9.0

Published

NewBee App Engine 命令行客户端(nae)——参数直达、默认人类可读(加 -o json 出 JSON),便于在终端使用与脚本/管道里解析。

Downloads

1,943

Readme

nae —— NewBee App Engine CLI

平台命令行客户端。参数直达、默认人类可读,加 -o json 即出 JSON,便于脚本/管道里解析。

📖 完整文档(含用法范例 / 调试技巧)https://workshop.newbeebox.com/app_engine/documents/nae-cli/ markdown 原文:https://workshop.newbeebox.com/app_engine/documents/nae-cli/md/


安装

npm i -g @newbeebox/newbeebox-app-engine-cli

需要 Node ≥ 18(用到内置 fetch)。


登录

CLI 用「个人访问令牌」鉴权。密钥明文只在创建时显示一次,请注意保存。

nae login

会引导你在浏览器打开网页端 「CLI 配置」 页创建一枚密钥,复制后粘贴回控制台即可。也可跳过交互直接传入:

nae login --token nae_xxxxxxxx

CI / 脚本场景免登录,直接用环境变量(优先级高于本地配置):

export NAE_TOKEN=nae_xxxxxxxx
export NAE_BASE_URL=https://workshop.newbeebox.com   # 可选,默认即此
nae apps

配置存于 ~/.nae/config.jsonnae logout 清除本地密钥。


输出契约

  • stdout:默认人类可读文本;加 -o json 出美化 JSON、-c/--compact 出紧凑单行 JSON。logs/exec 始终直出原始文本。
  • stderr:只放给人看的提示、进度、错误。
  • 退出码0 成功;1 业务错误;2 未登录/密钥失效;3 网络不可达。

所以脚本里可以安全地 nae apps -o json 2>/dev/null | jq '.[].AppID'


命令

身份 / 配额

| 命令 | 说明 | |------|------| | nae whoami | 当前身份(uid/用户名/角色/命名空间) | | nae quota | 配额用量(CPU/内存/存储/应用数 的 已用/上限) | | nae llm | 内置 LLM 网关状态:月度额度/本月用量/令牌前缀/内置环境变量名/按模型明细 | | nae config | 查看本地配置(密钥脱敏) |

应用

| 命令 | 说明 | |------|------| | nae apps [--all] | 列出应用(--all 仅管理员,看全平台) | | nae app <appid> | 应用详情/状态/设置 | | nae children <appid> | 子服务列表(如 Milvus 的 etcd/minio) | | nae create --app-id <id> [...] | 创建应用(见下) | | nae delete <appid> | 删除应用(模板级联清子服务/PVC/secret),幂等 |

创建普通应用:

nae create --app-id myweb --tag latest --port 8080 \
  --cpu 500m --mem 512Mi --env '{"FOO":"bar"}'
# 自带 basePath 的框架(如 Next.js)加 --keep-path-prefix
# 仅内部访问(不导出外链,只在集群内经 DNS+端口调用)加 --internal-only(创建后不可改)

创建模板应用:

nae create --kind template --app-id myredis \
  --template redis --storage 2Gi --config '{"password":"..."}'

构建(本机无 Docker)

没装 Docker、或不想本地 docker build && push?把带 Dockerfile 的项目目录交给平台代构建, 构建成功推镜像后照常触发自动部署(与你本地 push 等效)。

| 命令 | 说明 | |------|------| | nae build <appid> [path] | 打包本地目录上传,由平台代跑 docker build/push;缺省跟随日志直至结束 | | nae builds <appid> | 列出该应用最近的构建任务(状态 / 排队位置) | | nae build-logs <jobid> [-f] | 某构建任务日志(游标续读,-f 跟随至结束) |

nae build myweb                      # 打包当前目录,构建并跟随日志
nae build myweb ./service --tag v2   # 指定上下文目录与镜像 tag
nae build myweb --dockerfile docker/Dockerfile.prod
nae build myweb --no-follow          # 只入队,稍后 nae build-logs <job> -f 再看
  • 打包遵循上下文根的 .dockerignore,务必排除 node_modules/、构建产物、.git/;压缩后上限 200MB
  • 镜像运行时约束同样适用(非 root、端口 ≥ 1024);Dockerfile 由你提供。
  • 网页端「应用详情 → 构建」Tab 也能选项目文件夹上传,效果一致。

生命周期

| 命令 | 说明 | |------|------| | nae start <appid> | 启动 | | nae stop <appid> | 停止(缩到 0) | | nae restart <appid> | 滚动重启 | | nae scale <appid> <replicas> | 扩缩容 |

版本 / 回滚

| 命令 | 说明 | |------|------| | nae versions <appid> | 镜像版本历史 | | nae rollback <appid> [--seq N] | 回滚(默认上一版) |

运行态

| 命令 | 说明 | |------|------| | nae pods <appid> | Pod 列表 | | nae events <appid> [--limit N] | 事件/时间线 | | nae metrics <appid> | 各 Pod 实时资源用量 | | nae logs <appid> [--pod P] [--container C] [--follow] [--tail N] | 日志(缺省自动取首个 Pod) | | nae exec <appid> -- <cmd...> | 在容器内执行一条命令(非交互;输出与退出码透传) |

模板

| 命令 | 说明 | |------|------| | nae templates | 可用模板目录 |

CLI 密钥的创建/查看/吊销仅在网页端「CLI 配置」页操作,命令行不提供。


全局选项

| 选项 | 说明 | |------|------| | -o, --output <format> | 输出格式:text(默认,人类可读)/ json | | -c, --compact | 紧凑 JSON(单行,隐含 -o json) | | --base-url <url> | 覆盖平台地址(亦可 NAE_BASE_URL) | | --token <token> | 覆盖访问密钥(亦可 NAE_TOKEN) |