How to: Codex CLI Windows Terminal in a PowerShell console
Resolved 💬 6 comments Opened Apr 16, 2025 by dfinke Closed Apr 16, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator)
responded on this thread — see the highlighted reply below.
Is there a way to get the cli to work on the Windows Terminal in a PowerShell console? - Thank you
6 Comments
Few of us on Windows over here, but if you need to do anything to get it to work then please send a PR with the steps!
Set your
OPENAI_API_KEYenvironment variable without quotes:Using quotes (
export OPENAI_API_KEY="your_actual_key"orset OPENAI_API_KEY="your_actual_key") is incorrect ❌ and makes the key invalid.I'm assuming that was your issue, but you need to provide details!! 😅
I've never misinterpreted a comment so badly in my LIFE... My message was meant for @dfinke and I'm terribly sorry, the commits you've commited are great 👍
Just run it on WSL instead. Works perfectly for me :)
Going to close this, please re-open if you run into other issues.