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

相关推荐
鸿栢男子焊胡工6 小时前
汽车焊装线如何实现零漏焊?深度拆解 PIDS-A20AT 自动螺柱焊机全链路防错体系
人工智能·汽车·鸿栢科技
七老板的blog6 小时前
当 Spring StateMachine 遇见大模型:构建工业级 AI 写作流水线
java·人工智能·spring
Sirius Wu6 小时前
意图&实体ToolCall_Prompt调优
人工智能·机器学习·语言模型·prompt·aigc
一叶知秋dong7 小时前
Stable diffusion 工作原理
人工智能·深度学习·stable diffusion
zhumin7267 小时前
一种基于人类行为—内分泌映射的大语言模型动态情绪系统:从生理数据标定到虚拟激素驱动决策的工程化框架
人工智能·语言模型·自然语言处理
云烟成雨TD7 小时前
Spring AI 1.x 系列【46】MCP Security 模块
java·人工智能·spring
CRMEB系统商城7 小时前
CRMEB多商户系统(Java)v2.3公测版发布
java·开发语言·人工智能·小程序·开源·php
Samooyou7 小时前
RAG项目案例--02在线检索&过滤流水线
人工智能·python·ai·全文检索·检索
动能小子ohhh7 小时前
DocForge平台的设计与开发--文件上传接口的实现
开发语言·人工智能·python·langchain·ocr·fastapi