What is going on
You installed the Codex command line tool, but typing codex in the terminal gives command not found (or 'codex' is not recognized on Windows).
Most of the time the install worked. The terminal just does not know where the program was put.
Error messages you might see
Common causes
- The folder where npm puts global programs is not on your PATH, so the shell cannot see the new command.
- You installed the wrong package. The correct one is
@openai/codex. The package named justcodexon npm is an unrelated project. - Your Node.js version is too old. Guides disagree on the minimum, and a recent version (Node 22 or newer) is the safer choice.
- The install failed with a permissions error (EACCES) that scrolled past.
- You installed it, then opened the terminal that was already open before the install, which has not picked up the new PATH.
How to fix it
These steps come from public install guides and user reports.
- Check your Node version with
node --version. If it is old, update Node and install again. - Install the right package:
npm install -g @openai/codex. - Find where npm puts global programs: run
npm prefix -g. The commands live in thebinfolder inside that path. - Add that
binfolder to your PATH in your shell profile (for example~/.zshrc), or in your user PATH settings on Windows, then open a new terminal. - Check with
codex --version. - If the install says permission denied, do not use sudo. Point npm at a folder you own with
npm config set prefix ~/.npm-global, add itsbinfolder to PATH, and install again.
Getting help takes about a minute
No hiring, no back and forth. A real person looks at your app.
-
1
Describe it
Tell us what you need in plain words. You don't have to be technical or have an account to start.
-
2
Free 15-minute call
A verified developer calls you. Many tasks are sorted right there, and it costs nothing.
-
3
Pay after you approve
If there is more to do, you get one fixed price up front. You pay only once you are happy.
Real people, reviewed by hand
Developers who do this every day
Every developer is approved by our team before they can take a task. Describe yours and the first one who is free picks it up.
Get helpQuestions
Which package do I install?
@openai/codex. Installing the package named just codex gives you an unrelated program.
Do I need sudo?
No. Needing sudo means npm is set up to write to a protected folder. Change npm's global folder to one you own instead.