常用npm命令整理
#### **1. 指定版本全局升级(最常用)** **替换为你想要的版本号,例如 2.1.220** `npm install -g @anthropic-ai/claude-code@2.1.232` 国内镜像加速: `npm install -g @anthropic-ai/claude-code@2.1.220 --registry=https://registry.npmmirr
#### **1. 指定版本全局升级(最常用)** **替换为你想要的版本号,例如 2.1.220** `npm install -g @anthropic-ai/claude-code@2.1.232` 国内镜像加速: `npm install -g @anthropic-ai/claude-code@2.1.220 --registry=https://registry.npmmirr
**第一步:安装opencode,以npm为例** 官网地址:https://opencode.ai/ npm安装方式: ```bash npm install -g opencode-ai ``` npm卸载方式: ```bash npm uninstall -g opencode-ai ``` 官方接入设置方式:在终端里运行命令 `opencode auth log