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

ledu-cloud-cli

v1.0.5

Published

CLI tool for K8S deployment platform (cloud.xuepeiyou.com)

Readme

ledu-cloud-cli

license downloads npm

未来云部署 CLI 工具 — 终端一键完成项目构建、发布、审批。

命令名: leducloud,简写: ldc

特性

  • 扫码登录,自动同步浏览器登录态
  • ldc init 一次配置,后续 ldc build test / ldc build prod 快捷部署
  • ldc ship 一键构建 + 发布,研发自测项目全自动
  • ldc ship -b test 指定分支快速部署测试环境
  • ldc review 批量审批项目发布和团队申请
  • 支持测试 / 线上 / 预发多环境

命令速览

| 命令 | 别名 | 说明 | | ---- | ---- | ---- | | ldc init | | 初始化项目环境配置(测试/生产/预发) | | ldc login | | 扫码登录 | | ldc logout | | 退出登录,清空缓存 | | ldc whoami | | 查看当前用户信息 | | ldc build [appId] | b | 项目打包(支持 test/prod/pre) | | ldc ship [appId] | s | 一键构建并发布(支持 test/prod/pre) | | ldc deploy apply [appId] | a | 提交发布申请(支持 test/prod/pre) | | ldc deploy list [appId] | ls | 查询发布申请列表 | | ldc deploy publish [appId] | p | 执行发布 | | ldc deploy rollback [appId] | rb | 回滚到已发布版本的上一版本 | | ldc review | r | 审批管理(项目发布 / 团队申请) |

快速开始

安装

npm install -g ledu-cloud-cli --registry=https://registry.npmjs.org/

登录

ldc login

自动检测系统浏览器登录态,未登录时弹出扫码二维码(使用知音楼好未来主体扫码)。

验证

ldc whoami

初始化项目配置

ldc init

按提示输入测试环境和生产环境的 App ID(可从未来云页面 URL 中获取),配置保存在项目根目录 .ldc.json 中。之后即可使用 ldc build testldc build prod 快捷部署。

ldc init --test 123 --prod 456          # 快捷配置
ldc init --test 123 --prod 456 --pre 789  # 含预发环境

推荐工作流

测试环境日常部署

ldc ship test

使用已配置的测试环境 App ID,自动完成构建 + 发布。也可指定分支:

ldc ship test -b feature/xxx

研发自测项目(qa_audit=0)

ldc ship test

全自动流程:构建 → 提交申请 → 自动发布。无需等待审批。

需要审批的项目(qa_audit=1)

# 1. 提交构建和申请
ldc ship

# 2. 等待审批通过后,执行发布
ldc deploy publish

命令参考

项目配置

ldc init

初始化项目环境配置,将测试/生产/预发环境的 App ID 保存到 .ldc.json

ldc init                                # 交互式引导
ldc init --test 123 --prod 456          # 快捷配置
ldc init --test 123 --prod 456 --pre 789  # 含预发环境

App ID 可以从未来云页面 URL 中获取,如 https://cloud.xuepeiyou.com/.../detail?id=123 中的 123。也支持直接粘贴 URL,会自动解析。

已存在 .ldc.json 时,再次执行 ldc init 会显示当前值,直接回车保留。

账号管理

| 命令 | 说明 | | ---- | ---- | | ldc login | 扫码登录 | | ldc logout | 退出登录,清空本地 token | | ldc whoami | 查看当前登录用户信息 |

构建发布

ldc ship [appId]

一键构建并发布。别名: s

支持环境快捷方式(需先 ldc init):

ldc ship test               # 部署测试环境
ldc ship prod               # 部署生产环境
ldc ship test -b feature/xxx  # 指定分支
ldc ship 12345              # 直接指定 App ID

| 参数 | 说明 | | ---- | ---- | | [appId] | App ID、URL 或环境名(test/prod/pre),不填则交互输入 | | -b, --branch <branch> | 指定分支,跳过分支选择 |

ldc build [appId]

仅打包构建,不提交发布申请。别名: b

支持环境快捷方式(需先 ldc init):

ldc build test              # 构建测试环境
ldc build prod              # 构建生产环境
ldc build pre               # 构建预发环境
ldc build 12345             # 直接指定 App ID
ldc build --tag             # 使用 tag 模式

构建完成后,如使用直接 App ID,会询问是否保存到 .ldc.json 配置中。

| 参数 | 说明 | | ---- | ---- | | [appId] | App ID、URL 或环境名(test/prod/pre) | | --tag | 使用 tag 模式代替分支 |

部署管理

ldc deploy apply [appId]

提交发布申请。别名: a

选择镜像版本和审批人后提交申请。研发自测项目会自动使用当前用户作为审批人。

ldc deploy list [appId]

查看发布申请列表。别名: ls

展示已通过审批且待发布的记录,选择后直接发布。

ldc deploy publish [appId]

执行发布。别名: p

选择待发布记录并执行发布。

ldc deploy rollback [appId]

回滚到已发布版本。别名: rb

展示历史已发布版本列表,选择后回滚到指定版本。

审批管理

ldc review

查看和批量审批。别名: r

ldc review

交互式流程:

  1. 选择审批类型(项目发布 / 团队申请),显示待审批数量
  2. 选择操作(通过 / 拒绝)
  3. 多选待审批项(空格多选,a 全选)
  4. 确认后批量执行,实时展示进度

项目构建(维护者)

# 开发模式(运行源码)
npm run dev

# 生产构建(Vite 打包)
npm run build

# 发布到 npm
npm run publish

构建产物 dist/cloud.js 为单文件(~35 kB),包含所有源码和依赖。

环境要求

  • Node.js >= 18
  • macOS(扫码登录依赖系统浏览器 profile)