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

cib-n

v1.0.5

Published

Node.js version manager for Windows

Downloads

8

Readme

cib-n

一个用于 Windows 系统的 Node.js 版本管理工具,支持内网环境使用。

特点

  • 🚀 支持多版本 Node.js 管理
  • 💻 支持 x86/x64 架构
  • 🌐 无需联网,内网环境可用
  • 🔄 快速切换 Node.js 版本
  • 🛠 自动配置环境变量
  • 📦 自动解压版本文件
  • 📥 支持导入本地版本文件

安装

npm install -g cib-n

使用方法

1. 配置环境变量

首次使用时,需要配置环境变量:

cib-n setup

或者在使用 use 命令时,工具会提示是否配置环境变量。

2. 准备 Node.js 版本文件

工具本身不包含 Node.js 版本文件,你需要:

  1. 从 Node.js 官网下载需要的版本
  2. 使用 import 命令导入版本文件:
# 导入本地下载的 Node.js 压缩包
cib-n import ./node-v16.20.2-win-x64.zip

或者手动将 zip 文件放入 versions 目录,目录结构如下:

versions/
├── node-v16.20.2-win-x64.zip  (26MB)
├── node-v16.20.2-win-x86.zip  (24MB)
├── node-v21.7.1-win-x64.zip   (29MB)
└── node-v21.7.1-win-x86.zip   (27MB)

文件命名规则:node-v{版本号}-win-{架构}.zip

3. 查看可用版本

cib-n ls

输出示例:

Available Node.js versions:
  16.20.2 (x64)
  16.20.2 (x86)
* 21.7.1 (x64) (current)
  21.7.1 (x86)

4. 切换 Node.js 版本

# 切换到指定版本(自动使用系统架构)
cib-n use 16.20.2

# 切换到指定版本和架构
cib-n use 16.20.2 x64

切换版本时会自动解压对应的 zip 文件。解压后的目录大小约为压缩包的 2-3 倍。

5. 查看当前版本

cib-n current

6. 清理解压的目录

如果磁盘空间不足,可以清理已解压的目录:

cib-n clean

这个命令会删除所有已解压的目录,只保留 zip 文件。下次切换版本时会自动重新解压。

支持的版本

目前支持以下版本:

  • Node.js 16.20.2 (x86/x64)
  • Node.js 21.7.1 (x86/x64)

你可以通过 import 命令添加其他版本。

工作原理

  1. 工具会在安装目录下维护一个 versions 目录,用于存储 Node.js 版本文件
  2. 切换版本时,会自动解压对应的 zip 文件
  3. 解压后会在 current 目录创建指向目标版本的符号链接
  4. 环境变量配置后,系统会优先使用 current 目录下的 Node.js

常见问题

Q: 为什么切换版本后需要重启终端?

A: 环境变量的修改需要重新打开终端才能生效。

Q: 如何手动配置环境变量?

A: 将 cib-n/current 目录添加到系统 PATH 环境变量的最前面。

Q: 支持哪些系统?

A: 目前主要支持 Windows 系统,其他系统可能需要进行适配。

Q: 为什么安装后没有 Node.js 版本?

A: 工具本身不包含 Node.js 版本文件,需要手动下载并放入 versions 目录。这是为了保持工具包体积小,并且支持内网环境使用。

Q: 如何添加新的 Node.js 版本?

A: 使用 cib-n import <file> 命令导入本地下载的 Node.js 压缩包。压缩包必须符合命名规则:node-v{版本号}-win-{架构}.zip

Q: 磁盘空间不足怎么办?

A: 使用 cib-n clean 命令清理已解压的目录。下次切换版本时会自动重新解压。每个版本解压后大约需要 50-80MB 空间。

注意事项

  1. 首次使用需要配置环境变量
  2. 切换版本后需要重启终端
  3. 确保有足够的权限创建符号链接和修改环境变量
  4. 使用前需要先下载所需的 Node.js 版本文件
  5. 确保有足够的磁盘空间用于解压文件(建议至少预留 100MB)

许可证

ISC