Skip to content

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.

  1. Check if it's installed.

    bash
    codex --version

    A line like codex-cli 0.154.0 means the script got this far. command not found usually just means your terminal is older than Codex: close it, open a new one, and try again.

  2. Sign in. The script installed Codex but could not sign in for you. Start it:

    bash
    codex

    Choose Sign in with ChatGPT, sign in in the browser that opens, come back to the terminal, and type /quit to leave Codex.

  3. Check that it works.

    bash
    codex login status

    You want Logged in using ChatGPT.

Details ​

Check that Codex is installed ​

In your terminal, run:

bash
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:

bash
codex
  1. Choose Sign in with ChatGPT. Your browser opens.
  2. 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.
  3. Type /quit and press Enter to leave Codex.

Check that it works ​

In your terminal, run:

bash
codex login status

You 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.

Open-source course materials by Aijutsu, free for self-learning. Terms of Use