Sign in to Codex
Codex is OpenAI's AI helper for the terminal. It is the part that thinks: your agent uses it to understand messages and write answers. You also use Codex later in this course, to change your agent.
The script on the last page installed Codex, but it could not sign in for you. That is this page, and it is the last thing your computer needs.
Codex needs at least a ChatGPT Plus subscription.
TL;DR
Three commands, all in your terminal.
Check if it's installed.
bashcodex --versionA line like
codex-cli 0.154.0means the script got this far.command not foundusually just means your terminal is older than Codex: close it, open a new one, and try again.Sign in. The script installed Codex but could not sign in for you. Start it:
bashcodexChoose Sign in with ChatGPT, sign in in the browser that opens, come back to the terminal, and type
/quitto leave Codex.Check that it works.
bashcodex login statusYou want
Logged in using ChatGPT.
Details
Check that Codex is installed
In your terminal, run:
codex --version- If you see a line like
codex-cli 0.154.0, carry on to Sign in. - If you see
command not found: codex, close the terminal and open a new one, then try again. A terminal only finds the tools that existed when it opened. - If it still isn't there, the script didn't get this far. Run it again, and read what it says:
bash ~/nanoclaw/install-dependencies.sh
Sign in
In your terminal, start Codex:
codex- Choose Sign in with ChatGPT. Your browser opens.
- Sign in to your ChatGPT account, then go back to the terminal. If no browser opens, copy the link that Codex shows into your browser.
- Type
/quitand press Enter to leave Codex.
Check that it works
In your terminal, run:
codex login statusYou should see Logged in using ChatGPT.
If you see anything else, run codex again and sign in. If you see command not found: codex, close the terminal, open a new one, and try again.
Next
Your computer is ready. Next, set up NanoClaw in Setting up NanoClaw.