Repository navigation
Fix Windows Codex CLI commands / 修复 Windows CLI 命令与版本检测 - #20
Merged
Merged
Conversation
This was referenced Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English · 简体中文
English
Give Windows users a command their shell can run, and let version discovery find npm's
codex.cmdwithout rewriting Windows PATH as a Unix path.Two Windows-specific mismatches
OPENAI_BASE_URL=... codexis POSIX syntax, not PowerShell syntax.$env:OPENAI_BASE_URL='...'; codexon Windows, escape literal apostrophes, and use the same formatter for the displayed and copied text.:to inherited PATH and invokescodexwithout explicit handling of npm's Windows command shim.codex --versioncommand through the Windows systemcmd.exe, preserve inherited PATH, and suppress a console window.Scope and compatibility
The changes are 4 files, one commit. The existing non-Windows launch-command format and version-probe path are retained.
This does not create terminals, terminate processes, write persistent environment variables or
config.toml, replace the clipboard API, or change providers, credentials, or request routing. It adds no package dependency or Korean localization. The task is to correct shell syntax and executable lookup, not to redesign proxy setup.Verification
Local Windows validation at head
bf091bepassed:The 3 frontend tests check PowerShell quoting, unchanged non-Windows output, and consistent display/copy formatting. The native test checks fixed Windows command arguments and that the probe does not rewrite PATH. These are command-construction tests; they do not claim to cover every Codex installation layout or a live authenticated Codex session.
Independent review: one commit directly on upstream
main(f64a44a), with no dependency on the clipboard, tray, or other split PRs.简体中文
让 Windows 用户复制到的是 PowerShell 能执行的命令,并让版本检测能处理 npm 的
codex.cmd,而不是按 Unix 方式改写 Windows PATH。两处 Windows 平台不匹配
OPENAI_BASE_URL=... codex是 POSIX 写法,不是 PowerShell 写法。$env:OPENAI_BASE_URL='...'; codex,正确处理单引号,并让显示和复制共用同一格式化函数。:向继承的 PATH 追加 Unix 目录,且未显式处理 npm 在 Windows 上的命令入口。cmd.exe执行固定的codex --version命令,保留继承的 PATH,并避免弹出控制台窗口。修改边界与兼容性
**4 个文件、1 个提交。**非 Windows 的启动命令格式和版本检测路径保持原有行为。
不创建终端、不结束进程、不写持久化环境变量或
config.toml,不替换剪贴板 API,也不改 Provider、凭据或请求路由。不增加依赖或韩语本地化。这次只解决命令语法与程序查找,不重新设计代理配置流程。验证依据
在 Windows 上针对当前提交
bf091be完成本地验证:3 个前端测试覆盖 PowerShell 引号处理、非 Windows 输出保持不变,以及显示/复制内容一致;原生测试检查固定的 Windows 命令参数和 PATH 不被改写。验证范围是命令构造,不宣称覆盖所有 Codex 安装方式或真实已登录的 Codex 会话。
**可独立审阅和合并:**直接基于 upstream
main(f64a44a)的单个提交,不依赖剪贴板、托盘或其他拆分 PR。