Codex CLI Setup on Windows: Sign In with ChatGPT, by Laxmi Kant | KGP Talkie on YouTube. 12 min 39 s.
- Video length
- 12 min 39 s
- Time to do it
- 20 minutes
- Difficulty
- Easy
- Steps
- 10
What you need
Steps
Open PowerShell and install Codex with the official installer, or run npm install -g @openai/codex if you already use Node. Check that the codex command responds.
Create a new project folder and run git init inside it. Git lets you undo any change the agent makes, so you can always roll back.
Start Codex in that folder and sign in with your ChatGPT account when the browser prompt appears. Then choose to trust the folder so the agent can read and edit files.
Run /status to see your plan and monthly usage limit, then /model to pick the model and reasoning effort. Lower effort is faster and uses less of your limit.
Give Codex your first task, such as building an expense tracker with tests. Let it write the code, run the tests, and fix any failing test on its own.
Review the sandbox and approval settings with /permissions. Pick the mode you are comfortable with, and read each approval prompt before you accept it.
Run /init to generate an AGENTS.md file that records project rules for the agent. Edit it so future tasks follow your conventions.
Ask for a second change, such as adding a --top option to the tool. Check the diff and run the tests again before you commit.
If you hit Access is denied on Windows, switch to the built-in Windows PowerShell 5.1 or the standard PowerShell 7 download instead of the packaged Store or winget version.
For a fully local setup, install Ollama, pull a model such as Qwen with a 64k context, and start Codex with the --oss flag pointed at Ollama. No account is needed.
Tips and common mistakes
Read every approval prompt before accepting, since the agent can run commands and change files.
Commit your work to Git before each big task so you can undo a bad change in one step.
Keep AGENTS.md short and specific, because the agent reads it on every task.
The packaged PowerShell 7 from the Store or winget can cause Access is denied errors, so use the standard installer instead.
Questions
Do I need a paid ChatGPT plan to use Codex CLI?
No. The setup works on a free ChatGPT account, though the free plan has a monthly usage limit you can check with /status.
Can I run Codex CLI without any account?
Yes. Install Ollama, pull a local model, and start Codex with the --oss flag. Everything then runs on your own machine.
Why do I get Access is denied on Windows?
It usually comes from the packaged Store or winget version of PowerShell 7. Use the built-in Windows PowerShell 5.1 or the standard PowerShell 7 installer instead.
This guide was drafted from the video's details and general task knowledge. It has not been checked against the full video. Check the video and relevant product instructions before following a procedure. Report a correction.



