Nodebrew 技术文档
1. 安装指南
1.1 使用 curl 安装
$ curl -L git.io/nodebrew | perl - setup
1.2 手动下载并安装
$ wget git.io/nodebrew
$ perl nodebrew setup
1.3 配置环境变量
在您的 shell 配置文件(如 .bashrc 或 .zshrc)中添加以下内容:
export PATH=$HOME/.nodebrew/current/bin:$PATH
然后重新加载配置文件:
$ source ~/.bashrc
1.4 确认安装
运行以下命令确认 nodebrew 是否安装成功:
$ nodebrew help
1.5 自定义安装路径
如果您想自定义 nodebrew 的安装路径,可以在 shell 配置文件中设置 NODEBREW_ROOT 环境变量:
export NODEBREW_ROOT=/path/to/.nodebrew
默认路径为 $HOME/.nodebrew。
2. 项目的使用说明
2.1 安装 Node.js 版本
使用 nodebrew install 命令安装指定版本的 Node.js:
$ nodebrew install v8.9.4
您也可以安装最新版本或稳定版本:
$ nodebrew install latest # 最新版本
$ nodebrew install stable # 稳定版本
$ nodebrew install v8.9 # v8.9 的最新版本
$ nodebrew install 8.9.4 # 不带 `v` 的版本号
2.2 编译安装 Node.js
如果您需要从源码编译安装 Node.js,可以使用 compile 命令:
$ nodebrew compile v8.9.4
您还可以传递配置选项给 Node.js:
$ nodebrew compile v8.9.4 --v8-options=--harmony
2.3 切换使用的 Node.js 版本
使用 nodebrew use 命令切换到指定版本的 Node.js:
$ nodebrew use v8.9.4
$ node -v
v8.9.4
您也可以切换到最新版本或稳定版本:
$ nodebrew use latest # 最新版本
$ nodebrew use stable # 稳定版本
$ nodebrew use v8.9 # v8.9 的最新版本
$ nodebrew use 8.9.4 # 不带 `v` 的版本号
2.4 列出已安装的版本
使用 nodebrew ls 或 nodebrew list 命令列出所有已安装的 Node.js 版本:
$ nodebrew ls
v8.9.9
v8.9.4
current: v8.9.4
2.5 列出远程版本
使用 nodebrew ls-remote 命令列出所有远程可用的 Node.js 版本:
$ nodebrew ls-remote
v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5 v0.0.6
...
2.6 列出所有版本
使用 nodebrew ls-all 命令列出所有已安装和远程可用的 Node.js 版本:
$ nodebrew ls-all
Remote:
v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5 v0.0.6
...
Local:
v8.9.0
v8.9.4
current: v8.9.4
2.7 设置别名
使用 nodebrew alias 命令为特定版本设置别名:
$ nodebrew alias default v8.9.4
default -> v8.9.4
$ nodebrew use default
use v8.9.4
$ nodebrew unalias default
remove default
2.8 卸载 Node.js 版本
使用 nodebrew uninstall 命令卸载指定版本的 Node.js:
$ nodebrew uninstall v8.9.4
v8.9.4 uninstalled
2.9 更新 nodebrew
使用 nodebrew selfupdate 命令更新 nodebrew 本身:
$ nodebrew selfupdate
2.10 临时执行其他版本
使用 nodebrew exec 命令临时执行其他版本的 Node.js:
$ nodebrew exec v8.9.4 -- node app.js
3. 项目API使用文档
3.1 所有命令
以下是 nodebrew 的所有命令及其功能:
$ nodebrew help # 显示帮助信息
$ nodebrew install <version> # 下载并安装指定版本的 Node.js(从二进制文件)
$ nodebrew compile <version> # 下载并安装指定版本的 Node.js(从源码)
$ nodebrew install-binary <version> # `install` 命令的别名(用于向后兼容)
$ nodebrew uninstall <version> # 卸载指定版本的 Node.js
$ nodebrew use <version> # 使用指定版本的 Node.js
$ nodebrew list # 列出已安装的版本
$ nodebrew ls # `list` 命令的别名
$ nodebrew ls-remote # 列出远程版本
$ nodebrew ls-all # 列出远程和已安装的版本
$ nodebrew alias <key> <value> # 设置别名
$ nodebrew unalias <key> # 移除别名
$ nodebrew clean <version> | all # 移除源文件
$ nodebrew selfupdate # 更新 nodebrew
$ nodebrew migrate-package <version> # 将指定版本的全局 NPM 包迁移到当前版本
$ nodebrew exec <version> -- <command> # 使用指定版本的 Node.js 执行命令
$ nodebrew prune [--dry-run] # 卸载旧版本,保留每个主要版本的最新版本
4. 项目安装方式
4.1 使用 curl 安装
$ curl -L git.io/nodebrew | perl - setup
4.2 手动下载并安装
$ wget git.io/nodebrew
$ perl nodebrew setup
4.3 配置环境变量
在您的 shell 配置文件中添加以下内容:
export PATH=$HOME/.nodebrew/current/bin:$PATH
然后重新加载配置文件:
$ source ~/.bashrc
4.4 确认安装
运行以下命令确认 nodebrew 是否安装成功:
$ nodebrew help
4.5 自定义安装路径
如果您想自定义 nodebrew 的安装路径,可以在 shell 配置文件中设置 NODEBREW_ROOT 环境变量:
export NODEBREW_ROOT=/path/to/.nodebrew
默认路径为 $HOME/.nodebrew。
kernelopenEuler内核是openEuler操作系统的核心,既是系统性能与稳定性的基石,也是连接处理器、设备与服务的桥梁。C091
baihu-dataset异构数据集“白虎”正式开源——首批开放10w+条真实机器人动作数据,构建具身智能标准化训练基座。00
mindquantumMindQuantum is a general software library supporting the development of applications for quantum computation.Python058
PaddleOCR-VLPaddleOCR-VL 是一款顶尖且资源高效的文档解析专用模型。其核心组件为 PaddleOCR-VL-0.9B,这是一款精简却功能强大的视觉语言模型(VLM)。该模型融合了 NaViT 风格的动态分辨率视觉编码器与 ERNIE-4.5-0.3B 语言模型,可实现精准的元素识别。Python00
GLM-4.7GLM-4.7上线并开源。新版本面向Coding场景强化了编码能力、长程任务规划与工具协同,并在多项主流公开基准测试中取得开源模型中的领先表现。 目前,GLM-4.7已通过BigModel.cn提供API,并在z.ai全栈开发模式中上线Skills模块,支持多模态任务的统一规划与协作。Jinja00
AgentCPM-Explore没有万亿参数的算力堆砌,没有百万级数据的暴力灌入,清华大学自然语言处理实验室、中国人民大学、面壁智能与 OpenBMB 开源社区联合研发的 AgentCPM-Explore 智能体模型基于仅 4B 参数的模型,在深度探索类任务上取得同尺寸模型 SOTA、越级赶上甚至超越 8B 级 SOTA 模型、比肩部分 30B 级以上和闭源大模型的效果,真正让大模型的长程任务处理能力有望部署于端侧。Jinja00