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

yuze-dev-cli

v1.0.2

Published

🚀 现代化开发者工具集 - 专为提升开发效率而生的多功能CLI工具

Readme

Yuze Dev CLI

🚀 现代化开发者工具集 - 专为提升开发效率而生的多功能 CLI 工具

集成网络管理、进程控制、HTTP 服务器、NPM 源管理和图片生成等核心功能,让开发工作更加高效便捷。

✨ 核心特性

  • 🌐 智能网络管理 - 一键获取本机 IPv4 地址,智能识别网络接口
  • 进程管理专家 - 智能识别并终止占用端口的进程,告别端口冲突
  • 🖥️ 本地服务器 - 零配置启动 HTTP 服务器,支持静态文件托管和目录浏览
  • 📦 NPM 源管理器 - 一键切换国内外镜像源,提升包安装速度
  • 🖼️ 图片生成工具 - 快速生成各种规格的占位图片,支持自定义样式
  • 🛠️ 全平台兼容 - 完美支持 Windows、Linux、macOS 三大操作系统

📦 安装

npm install -g yuze-dev-cli

🎯 快速开始

# 查看所有可用命令
yuze

# 查看详细帮助
yuze --help

📋 命令详解

🌐 网络管理

查看本机 IPv4 地址

yuze ipconfig

显示当前设备的 IPv4 地址,优先显示 WiFi 接口地址,同时展示对应的系统命令。

⚡ 进程控制

杀死指定端口的进程

yuze kill <port>

示例:

yuze kill 8080

自动检测操作系统并执行相应的系统命令来终止占用端口的进程。

🖥️ HTTP 服务器

启动本地开发服务器

# 默认启动8080端口,如果被占用则自动选择新端口
yuze server

# 指定端口启动,如果被占用则自动选择新端口
yuze server 5500

# 强制模式:如果端口被占用则kill后启动
yuze server 5500 -f

功能特性:

  • 📁 将当前文件夹作为根目录,提供静态文件服务
  • 📂 自动显示目录列表,支持文件浏览
  • 🎨 支持各种文件类型的 MIME 类型识别
  • 🔍 自动端口检测和选择
  • 💪 强制模式支持(kill 占用端口的进程后启动)
  • 🏠 默认首页支持:如果根目录存在 index.html,将自动显示为首页
  • 🌐 支持局域网访问(绑定到所有网络接口)

📦 NPM 源管理

查看和切换 NPM 源

# 显示NPM工具集帮助
yuze npm

# 查看当前npm源
yuze npm registry

# 切换到官方源
yuze npm registry npm

# 切换到淘宝镜像
yuze npm registry taobao

# 设置自定义源
yuze npm registry https://your-custom-registry.com/

# 测试当前源连通性
yuze npm test

# 清理npm缓存
yuze npm clean

支持的源:

  • npm - 官方源 (https://registry.npmjs.org/)
  • taobao - 淘宝镜像 (https://registry.npmmirror.com/)
  • cnpm - cnpm 镜像 (https://r.cnpmjs.org/)
  • yarn - yarn 源 (https://registry.yarnpkg.com/)

🖼️ 图片生成

生成占位图片

# 生成默认100x100图片
yuze img

# 生成指定尺寸图片
yuze img 200x200

# 生成多张图片
yuze img "300x200 5"

# 生成灰度图片
yuze img "500x300 3 grayscale"

# 生成模糊图片
yuze img "400x300 2 blur=3"

# 生成特定ID的图片
yuze img "300x200 1 id=237"

# 生成基于种子的图片
yuze img "200x200 5 seed=picsum"

🏗️ 项目架构

模块化设计

lib/
├── commands.js      # 命令统一管理和注册
├── network.js       # 网络相关功能和命令
├── process.js       # 进程控制功能和命令
├── server.js        # HTTP服务器功能和命令
├── npm.js           # NPM源管理功能和命令
├── image.js         # 图片生成功能和命令
└── utils.js         # 工具函数和帮助信息

设计原则

  • 🎯 单一职责 - 每个模块负责特定功能领域
  • 🔧 模块化 - 清晰的模块边界和接口
  • 📦 可扩展 - 易于添加新功能和命令
  • 🧹 代码整洁 - 遵循最佳实践和编码规范

🛠️ 技术栈

  • CLI 框架: Commander.js v11.1.0
  • 运行环境: Node.js >= 14.0.0
  • 包管理: npm
  • 支持平台: Windows、Linux、macOS

💡 使用场景

🎨 前端开发

  • 快速启动本地开发服务器
  • 管理不同项目的 NPM 源
  • 生成原型设计所需的占位图片
  • 清理端口占用问题

🖥️ 日常开发

  • 查看网络配置信息
  • 解决端口冲突问题
  • 快速搭建静态文件服务
  • 测试网络连通性

📈 版本历史

  • v1.0.1 - 最新稳定版本,全面支持所有核心功能
  • v1.0.0 - 首个正式版本,基础功能完整实现

🔧 系统要求

  • Node.js >= 14.0.0
  • 操作系统: Windows、Linux、macOS
  • 包管理器: npm

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License


Yuze Dev CLI - 让开发更高效,让工作更轻松! 🚀✨

专为现代开发者打造的全能工具集,一个命令解决多个开发痛点