V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
SilenceLL
V2EX  ›  程序员

各位在 Windows 下使用 codex 是用的什么终端工具

  •  
  •   SilenceLL · 3 月 25 日 · 3520 次点击

    我感觉他在 Windows 下真的有点蠢,不管是 cmd 还是 powershell 各种工具调用都在反复试,运行的又慢。

    然后就想着迁移到 wsl ,代码还是在 Windows 系统,结果 codex 跑的各种编译测试又慢的要命。

    顺着这个思路我把代码也丢到 wsl 了,但是 Windows 上面通过 idea 运行 wsl 的项目又慢的要命。

    气的我把家里的笔记本带来公司干活了。

    35 条回复    2026-03-26 15:08:14 +08:00
    zouri
        1
    zouri  
       3 月 25 日
    用 vscode + remote development + wsl
    rxc420902911
        2
    rxc420902911  
    PRO
       3 月 25 日
    用 claude cli
    Jed2020
        3
    Jed2020  
       3 月 25 日
    就是用 codex ,他不是自己有客户端吗?
    ShuovO
        4
    ShuovO  
       3 月 25 日
    用客户端
    chinafengzhao
        5
    chinafengzhao  
       3 月 25 日
    有 GUI 可以用,不用 CLI
    weixiaoyun
        6
    weixiaoyun  
       3 月 25 日
    @rxc420902911 codex 能在 claude 上使用吗?
    evan1
        7
    evan1  
    PRO
       3 月 25 日
    项目里加上 AGENTS.md ,里面让他自己写一下。就让它把第一次调用/写入成功的步骤标准化、流程化写入到 AGENTS.md 。这样后面就不会反复重试了。比如我的就是:
    jigi330
        8
    jigi330  
       3 月 25 日
    要么直接用 codex app ,在 windows native 下工作;
    要么在 wsl 下使用 codex cli ,但是需要把项目放到 ~/projects 类似的 \\wsl$ 文件夹里,不要放在 /mnt/c 或者 /mnt/d 下面,不然 git 都跑不动,官方是有明确文档介绍说明的。
    IceRovah
        9
    IceRovah  
       3 月 25 日
    我也是 windows 的 IDEA ,wsl 的 codex+项目+jdk+maven+git ,折腾了两天,现在基本能用了。
    就是 IDEA 确实没有读取 windows 下项目那么丝滑,有时代码更新了还得手动刷新,不然识别不到。
    17681880207
        10
    17681880207  
       3 月 25 日
    windows 就用 powershell
    macos 就用 terminal

    都是自带的
    holaux
        11
    holaux  
       3 月 25 日
    ghostty
    qianghaha
        12
    qianghaha  
       3 月 25 日
    WindowsTerminal
    COW
        13
    COW  
       3 月 25 日
    windows terminal + wsl + nvim
    maemolee
        14
    maemolee  
       3 月 25 日
    codex 用 app ,cc 用的 git bash
    riscv
        15
    riscv  
       3 月 25 日 via Android
    我就喜欢看 ai 执行 powershell ,味很纯
    Danswerme
        16
    Danswerme  
       3 月 25 日
    你们在 pwsh 里运行 codex 会出现乱码的情况吗? 我已经按照各种教程设置了字符编码,现在虽然写入和读取文件的内容是正确的,但是在控制台中读取文件时的输出莫名其妙还是会乱码。
    iorilu
        17
    iorilu  
       3 月 25 日
    现在新模型比如 gpt5.4 强了很多, 反正我用 powershell 也没啥问题, 使用命令都正常
    不一定非要走 wsl
    我个人觉得没什么特殊原因就因该用本地 shell 跑
    除非你那个项目本来就要 linux 环境, 那你就用 wsl
    否则就直接默认, 用 powershell
    lujiaosama
        18
    lujiaosama  
       3 月 25 日
    @Danswerme 一开始会.在 AGENTS.md 里设置了门禁之后强制它用 UTF8 读取和修改就不会了.
    dobelee
        19
    dobelee  
       3 月 25 日 via iPhone
    全部放 wsl2 ,包括代码,避免跨文件系统。win 上只安装 ide 壳、浏览器壳、终端壳。
    Zeyes
        20
    Zeyes  
       3 月 25 日
    Docker 上装 Claude 、Codex 、Gemini 等等,ubuntu 24.04 ,丢公司测试服务器上,使用 Mutagen 同步源代码,Idea Review 代码。本机电脑非常轻量,不用跑什么 wsl 了。

    终端使用 Windows Terminal 。

    个人体验 codex 在 windows 上就是不好,而且容易出现乱码问题。
    lagrange7
        21
    lagrange7  
       3 月 25 日
    微软推出的 powershell 很好用 简洁,个性化强
    acrisliu
        22
    acrisliu  
       3 月 26 日
    “但是 Windows 上面通过 idea 运行 wsl 的项目又慢的要命。”
    你用的哪个版本?新版本(貌似 2025.3 )或者更早,能原生直接打开 WSL 中的项目(官方叫 Open WSL project natively as local projects ),很丝滑。
    stoicb
        23
    stoicb  
       3 月 26 日
    cli
    DAMNCRAB
        24
    DAMNCRAB  
       3 月 26 日
    Jonz
        25
    Jonz  
       3 月 26 日
    不用自带的 Windows PowerShell,去下载 PowerShell7 来用
    a0210077
        26
    a0210077  
       3 月 26 日
    Windows 下运行并不慢。PowerShell7 + Codex CLI + VS Code

    PowerShell7 更好支持 UTF-8 编码显示( codex 自己说的)
    Codex CLI 吃 HTTPS_PROXY 系统变量,用 PowerShell 设置系统变量再启动,不用上系统代理和 TUN 模式,也不干扰其他程序
    doraemonki
        27
    doraemonki  
       3 月 26 日 via Android
    https://github.com/yotsuda/PowerShell.MCP

    Windows 上面真心推荐这个 mcp 代替内置 bash 。先安装 pwsh7 ,然后全局提示词加上下面的话,让 codex 比你更懂 Windows ,除了终端弹的有点多没啥大毛病😂

    Always use the `mcp__PowerShell` tool instead of the built-in tool for all command execution. Exception: for Codex-injected helper commands such as `apply_patch` and `applypatch`, use the built-in `pwsh` shell.
    asd999cxcx
        28
    asd999cxcx  
       3 月 26 日
    @acrisliu 但是这样所有的 agent 得装在 wsl 吧?我尝试使用 acp 就是这样,每次通过原生模式打开 acp 在 windows 本地就会出问题
    acrisliu
        29
    acrisliu  
       3 月 26 日
    @asd999cxcx 目前 IDEA 上的 ACP 还不支持 WSL ,官网有说明,等后续更新吧。我直接在 WSL 里面用 Junie CLI 之类的了。
    asd999cxcx
        30
    asd999cxcx  
       3 月 26 日
    @acrisliu 终端中使用么
    SilenceLL
        31
    SilenceLL  
    OP
       3 月 26 日
    @acrisliu #22 是可以,但是大型项目可以很明显的感觉到运行慢太多了。所以我又放弃了。
    qianlifeng
        32
    qianlifeng  
       3 月 26 日
    codex desktop 不是挺好用的
    youshangdemajia
        33
    youshangdemajia  
       3 月 26 日
    Codex app 有权限问题,没法执行 cargo check 。不知道为什么要封装成 Windows app
    shitshit666
        34
    shitshit666  
       3 月 26 日
    @weixiaoyun 没这么麻烦,直接装一个新版的 powershell7 就行了,他会自己去用新版的,新版的没有乱码
    prosgtsr
        35
    prosgtsr  
       3 月 26 日
    @Danswerme PowerShell7
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2450 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 85ms · UTC 06:17 · PVG 14:17 · LAX 23:17 · JFK 02:17
    ♥ Do have faith in what you're doing.