| Windows 版本 | 状态 | 备注 |
|---|---|---|
| Windows 11 | ✅ 完全支持 | 推荐 |
| Windows 10 (22H2+) | ✅ 完全支持 | 需要最新更新 |
| Windows 10(较旧) | 建议更新 | |
| Windows Server 2022 | ✅ 完全支持 | |
| Windows Server 2019 |
选项 A:使用官方安装程序(推荐)
- 从 nodejs.org 下载
- 选择 LTS 版本(20.x 或更高)
- 使用默认选项运行安装程序
- 在 PowerShell 中验证安装:
node --version # 应显示 v20.x.x
npm --version选项 B:使用 winget
# 通过 Windows Package Manager 安装
winget install OpenJS.NodeJS.LTS
# 重启 PowerShell,然后验证
node --version选项 C:使用 Chocolatey
# 首先安装 Chocolatey(如果未安装)
Set-ExecutionPolicy Bypass -Scope Process -Force
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
# 安装 Node.js
choco install nodejs-lts -y
# 重启 PowerShell
node --version选项 D:使用 nvm-windows
# 从以下位置下载 nvm-windows:https://github.com/coreybutler/nvm-windows/releases
# 安装最新的 nvm-setup.exe
# 安装后,打开新的 PowerShell:
nvm install 20
nvm use 20使用官方安装程序(推荐)
- 从 git-scm.com 下载
- 使用这些推荐选项运行安装程序:
- ✅ Git from the command line and also from 3rd-party software
- ✅ Use bundled OpenSSH
- ✅ Checkout Windows-style, commit Unix-style line endings
- ✅ Use Windows' default console window
使用 winget
winget install Git.Git使用 Chocolatey
choco install git -y验证安装:
git --version使用 winget(推荐)
winget install GitHub.cli使用 Chocolatey
choco install gh -y使用官方安装程序
从 cli.github.com 下载
认证:
gh auth login
# 按照提示操作,选择"使用 web 浏览器登录"为获得最佳体验,请使用 Windows Terminal:
winget install Microsoft.WindowsTerminal-
打开 PowerShell 或 Windows Terminal
-
导航到您的项目目录:
cd C:\Users\YourName\projects\my-project -
运行安装程序:
npx github:SynkraAI/aiox-core install
安装程序会自动:
- ✅ 检测 Windows 并应用特定于平台的配置
- ✅ 创建必要的目录并设置正确的权限
- ✅ 配置 Windows 的 IDE 路径:
- Cursor:
%APPDATA%\Cursor\ - Claude:
%USERPROFILE%\.claude\
- Cursor:
- ✅ 正确处理 Windows 路径分隔符(反斜杠)
- ✅ 正确配置行尾(批处理脚本为 CRLF,脚本为 LF)
- ✅ 设置与 cmd.exe 和 PowerShell 兼容的 npm 脚本
- 从 cursor.sh 下载
- 运行安装程序
- IDE 规则安装到
.cursor\rules\ - 键盘快捷键:
Ctrl+L打开聊天 - 使用
@agent-name激活代理
-
安装 Claude Code:
npm install -g @anthropic-ai/claude-code
-
命令安装到
.claude\commands\AIOX\ -
使用
/agent-name激活代理
- 从市场安装 Continue 扩展
- AIOX 可以通过
.continue\配置集成
如果您看到 running scripts is disabled:
# 检查当前策略
Get-ExecutionPolicy
# 设置为允许本地脚本(推荐)
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# 或为当前会话临时绕过
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process# 修复 npm 缓存权限
npm cache clean --force
# 将 npm prefix 设置为用户目录
npm config set prefix "$env:APPDATA\npm"
# 添加到 PATH(永久)
[Environment]::SetEnvironmentVariable(
"Path",
[Environment]::GetEnvironmentVariable("Path", "User") + ";$env:APPDATA\npm",
"User"
)Windows 默认限制路径为 260 个字符。要启用长路径:
- 打开 组策略编辑器 (
gpedit.msc) - 导航到:Computer Configuration → Administrative Templates → System → Filesystem
- 启用 "Enable Win32 long paths"
或通过 PowerShell(需要管理员权限):
# 以管理员身份运行
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force# 如果 npm 显示 SSL 错误
npm config set strict-ssl false
# 更好的方法:更新证书
npm config set cafile ""
npm config delete cafile# 刷新环境变量
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
# 或重启 PowerShell/Terminal某些防病毒软件会阻止 npm 操作:
-
添加排除项:
%APPDATA%\npm%APPDATA%\npm-cache%USERPROFILE%\node_modules- 您的项目目录
-
在安装期间临时禁用实时扫描(不建议用于生产)
# 为 Windows 配置 Git
git config --global core.autocrlf true
git config --global core.eol crlf
# 对于特定项目(Unix 风格)
git config core.autocrlf input# 检查状态
gh auth status
# 重新认证
gh auth login --web
# 如果在公司代理后面
$env:HTTPS_PROXY = "http://proxy.company.com:8080"
gh auth login如果找不到命令,请检查您的配置文件:
# 查看配置文件路径
$PROFILE
# 如果不存在,创建配置文件
if (!(Test-Path -Path $PROFILE)) {
New-Item -ItemType File -Path $PROFILE -Force
}
# 添加 npm 全局路径
Add-Content $PROFILE "`n`$env:Path += `";$env:APPDATA\npm`""对于希望在 Windows 中使用 Linux 工具的用户:
# 以管理员身份运行
wsl --install
# 安装 Ubuntu(默认)
wsl --install -d Ubuntu
# 提示时重启计算机# 在 WSL 内,遵循 Linux 安装指南
# 参见:docs/installation/linux.md
# 从 WSL 访问 Windows 文件
cd /mnt/c/Users/YourName/projects/my-project
# 为获得最佳性能,将项目保留在 Linux 文件系统中
# 使用:~/projects/ 而不是 /mnt/c/- Windows IDE + WSL 终端:将 IDE 指向 WSL 路径
- Git:在两个环境中保持一致配置
- npm:在运行命令的环境中安装
# 设置 npm 代理
npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080
# 设置 git 代理
git config --global http.proxy http://proxy.company.com:8080
# 设置环境变量
$env:HTTP_PROXY = "http://proxy.company.com:8080"
$env:HTTPS_PROXY = "http://proxy.company.com:8080"# 设置自定义注册表
npm config set registry https://npm.company.com/
# 或特定范围
npm config set @company:registry https://npm.company.com/如果您的机器是域加入的并具有受限策略:
- 联系 IT 获取 Node.js/npm 批准
- 请求例外以用于:
%APPDATA%\npm%USERPROFILE%\.claude- 项目目录
要更新现有安装:
# 使用 npx(推荐)
npx github:SynkraAI/aiox-core install
# 更新程序将:
# - 检测现有安装
# - 将自定义备份到 .aiox-backup\
# - 仅更新已更改的文件
# - 保留配置详见完整的 卸载指南。
通过 PowerShell 快速卸载:
# 从项目中删除 AIOX
Remove-Item -Recurse -Force .aiox-core
Remove-Item -Recurse -Force .claude\commands\AIOX
# 删除全局 npm 包
npm uninstall -g @synkra/aiox| 要求 | 最小 | 推荐 |
|---|---|---|
| Windows | 10 (22H2) | 11 |
| RAM | 4GB | 8GB |
| 磁盘空间 | 1GB | 5GB |
| Node.js | 18.x | 20.x LTS |
| npm | 9.x | 10.x |
| PowerShell | 5.1 | 7.x (Core) |
| 功能 | PowerShell | 命令提示符 |
|---|---|---|
| 推荐 | ✅ 是 | |
| npm 支持 | ✅ 完全 | ✅ 完全 |
| Git 支持 | ✅ 完全 | ✅ 完全 |
| Tab 补全 | ✅ 高级 | |
| 脚本支持 | ✅ .ps1 文件 |
推荐:使用 PowerShell 7 或 Windows Terminal 获得最佳体验。
- 配置您的 IDE(见上文 IDE 特定设置)
- 在 AI 代理中运行
*help查看可用命令 - 从 用户指南 开始
- 加入我们的 Discord 社区 获取帮助