DaddyNote

UK, Irish and EU money and travel rules, worked through step by step, with the date each figure was checked.

AI how-to notes · 2026-09-17 · last run 2026-09-17 · 한국어 원문

Installing Codex CLI (@openai/codex) on Windows with npm, through first run — temp-folder field test

One line summary

On Windows, Codex CLI installs as a single npm package, @openai/codex. It finished in 7 seconds on our PC, and the actual executable turned out to be codex.exe inside a separate package called codex-win32-x64. If codex isn't found after the install, or shows a version you didn't expect, start with PATH.

Who this is for

To leave the global environment alone, this round used --prefix into a temp folder instead of npm install -g. We deleted the temp folder once the checks were done.

Test environment

ItemValue
OSWindows 11 Home (10.0.26200)
ShellsGit Bash, PowerShell 7.6.6
Node.js / npmv24.19.0 / 11.17.0
codex already installed (global)codex-cli 0.153.4 (C:\Users\User\AppData\Roaming\npm)
Version installed this round@openai/codex 0.154.0
Install locationC:\Users\User\AppData\Local\Temp\longtail_A\prefix (deleted afterwards)

1. Check the package name first

npm view @openai/codex name version
name = '@openai/codex'
version = '0.154.0'

On the day we tested, the latest was 0.154.0. The installed package's package.json carried "engines": { "node": ">=16" }.

2. Install

npm install --prefix "C:\Users\User\AppData\Local\Temp\longtail_A\prefix" @openai/codex
added 2 packages in 7s

Exit code 0, 7.6 seconds by the wall clock. Two packages landed. Here is what npm ls --all shows.

`-- @openai/codex@0.154.0
  +-- UNMET OPTIONAL DEPENDENCY @openai/codex-darwin-arm64@npm:@openai/codex@0.154.0-darwin-arm64
  +-- UNMET OPTIONAL DEPENDENCY @openai/codex-darwin-x64@npm:@openai/codex@0.154.0-darwin-x64
  +-- UNMET OPTIONAL DEPENDENCY @openai/codex-linux-arm64@npm:@openai/codex@0.154.0-linux-arm64
  +-- UNMET OPTIONAL DEPENDENCY @openai/codex-linux-x64@npm:@openai/codex@0.154.0-linux-x64
  +-- UNMET OPTIONAL DEPENDENCY @openai/codex-win32-arm64@npm:@openai/codex@0.154.0-win32-arm64
  `-- @openai/codex-win32-x64@npm:@openai/codex@0.154.0-win32-x64

Five UNMET OPTIONAL DEPENDENCY lines show up, but the install itself succeeded. They just mark the optional packages for macOS, Linux and ARM Windows as skipped; only codex-win32-x64, the one that matches this PC (x64 Windows), came down. The whole node_modules tree was 381M.

3. What landed where

FileRole
node_modules\.bin\codexLauncher script for Git Bash
node_modules\.bin\codex.cmdFor Command Prompt
node_modules\.bin\codex.ps1For PowerShell
node_modules\@openai\codex\bin\codex.jsThe entry point npm registers as bin
node_modules\@openai\codex-win32-x64\vendor\x86_64-pc-windows-msvc\bin\codex.exeThe actual executable

The same bin folder as codex.exe also held codex-code-mode-host.exe, and under its parent folder (x86_64-pc-windows-msvc) were codex-path\rg.exe, codex-resources\codex-command-runner.exe and codex-resources\codex-windows-sandbox-setup.exe.

We invoked it three ways and all three returned the same version.

# Git Bash
/c/Users/User/AppData/Local/Temp/longtail_A/prefix/node_modules/.bin/codex --version
# the exe directly
.../codex-win32-x64/vendor/x86_64-pc-windows-msvc/bin/codex.exe --version
# codex.cmd through Command Prompt (cmd.exe)
cmd.exe //c 'C:\Users\User\AppData\Local\Temp\longtail_A\prefix\node_modules\.bin\codex.cmd' --version
codex-cli 0.154.0

The top of --help looks like this.

Codex CLI

If no subcommand is specified, options will be forwarded to the interactive CLI.

Usage: codex [OPTIONS] [PROMPT]

4. What happens when it isn't on PATH

Until we put the .bin folder on PATH, this temp install could not be reached by the bare name codex. Because this PC has a separate global codex, we built a "codex is nowhere on PATH" situation by also removing the global npm folder (AppData\Roaming\npm) from PATH in that shell.

Git Bash gives exit code 127 along with this.

bash: line 1: codex: command not found

PowerShell 7 raises CommandNotFoundException. On this Korean-locale Windows the text reads:

'codex' 용어는 cmdlet, 함수, 스크립트 파일 또는 실행 프로그램의 이름으로 인식되지 않습니다.
이름의 철자를 확인하거나 경로가 포함되어 있으면 경로가 올바른지 확인하고 다시 시도합니다.

In Git Bash, even with the global npm folder off PATH, calling the full path still printed codex-cli 0.154.0. In PowerShell we confirmed the same version from a separately launched pwsh -NoProfile (PATH untouched) by invoking the .ps1 with the call operator.

& "C:\Users\User\AppData\Local\Temp\longtail_A\prefix\node_modules\.bin\codex.ps1" --version

If you'd rather not type the path every time, prepend the .bin folder to PATH for that shell only.

$env:Path = "C:\Users\User\AppData\Local\Temp\longtail_A\prefix\node_modules\.bin;" + $env:Path
(Get-Command codex).Source
codex --version
C:\Users\User\AppData\Local\Temp\longtail_A\prefix\node_modules\.bin\codex.ps1
codex-cli 0.154.0

This PC's execution policy (Get-ExecutionPolicy) was RemoteSigned, and codex.ps1 was not blocked in that state.

5. When you install a new version and still see the old number

In the original shell, with PATH untouched, calling codex ran the old global version. The 0.154.0 we had just installed was never reached.

/c/Users/User/AppData/Roaming/npm/codex
codex-cli 0.153.4

Prepend the temp install's .bin folder to PATH and both Git Bash and PowerShell ran the temp install (0.154.0) instead. When the version isn't what you expect, find out which file is actually being called first: command -v codex in Git Bash, (Get-Command codex).Source in PowerShell.

Results

CheckResult
Package name@openai/codex (latest 0.154.0)
Install time7 seconds (added 2 packages in 7s), exit code 0
Packages installed@openai/codex, @openai/codex-win32-x64
Install sizenode_modules 381M
--versioncodex-cli 0.154.0 (same from Git Bash, cmd, PowerShell and the exe directly)
Not on PATH, Git Bashcodex: command not found, exit code 127
Not on PATH, PowerShell 7CommandNotFoundException, exit code 1
Old global version on PATHcodex-cli 0.153.4 runs
CleanupAfter deleting the temp folder, the global install is still @openai/codex@0.153.4

What failed

What we did not test

Related notes