Windows系统安装codex cli

Windows系统安装codex cli

2.1打开终端

window+x

powershell

终端 / Windows Terminal(Win11 默认有)

s1 安装 Node.js (LTS)

winget install -e --id OpenJS.NodeJS.LTS

s2 验证安装(重启终端)

node -v

npm -v

s3 镜像源配置(或者魔法)
复制代码
npm config set registry https://registry.npmmirror.com
npm config get registry   # 验证,应显示上述地址
s4 安装codex

npm install -g @openai/codex

s5 创建配置目录并配置

mkdir $env:USERPROFILE\.codex -Force

config.toml (填写代理地址 和 模型信息)

复制代码
@"
model = "gpt-5.3-codex"
model_provider = "mirror"

[model_providers.mirror]
name = "mirror"
base_url = "https://gpt.tool2ai.com/codex"(需要修改)
wire_api = "responses"
requires_openai_auth = true
"@ | Out-File -FilePath $env:USERPROFILE\.codex\config.toml -Encoding ASCII

auth.json(配置api key)

复制代码
@"
{
  "OPENAI_API_KEY": "your-actual-token-here"(修改)
}
"@ | Out-File -FilePath $env:USERPROFILE\.codex\auth.json -Encoding ASCII

进入

env:USERPROFILE\.codex

C:\Users\24408\.codex

中进行修改

如果系统不让允许脚本

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

相关推荐
回眸&啤酒鸭2 天前
【回眸】Minicart 电商购物车核心功能落地指南
人工智能
一隅论数智2 天前
给AI一张“业务概念地图“:本体如何从哲学走向企业智能
大数据·人工智能·经验分享·笔记·学习·学习方法·政务
AI的探索之旅2 天前
97 个 OpenCV 实例(三十):双目立体,从标定到点云
人工智能·opencv·计算机视觉
AlbertZein2 天前
Step-5-Preview 上手实测:3D 游戏、金融分析、网页设计一次跑完
人工智能·aigc
LaughingZhu2 天前
Product Hunt 每日热榜 | 2026-09-19
人工智能·深度学习·神经网络·搜索引擎·百度
美狐美颜SDK开放平台2 天前
开发直播APP时如何接入视频美颜SDK?开发流程与注意事项
android·人工智能·计算机视觉·音视频·直播美颜sdk
wukangjupingbb3 天前
智能网联汽车安全能力框架
人工智能
龙亘川3 天前
明月照湾区,智启新赛道:从顶流文旅IP盛会看智慧文旅升级路径
人工智能·智慧城市·开源软件·数据可视化
飞猫的边缘AI3 天前
边缘AI应用:家用AI摄像头怎么做数据训练?
人工智能·边缘计算·ai算法·边缘ai