NonDev Apps

Day 01 of 21

Install Codex and run your first safe prompt

Goal: Install Codex, sign in using the easiest current path, and run one safe prompt without changing files.

What to do

01

Install Node.js

Go to nodejs.org in your browser and download the LTS version. It says "Recommended For Most Users" under it. Run the installer and click through with the default settings. Do not change any options during the install.

02

Check Node.js with node --version

Open a new terminal window, not the same one you used before the install. Type the command exactly as shown and press Enter. The terminal will print the version of Node.js that installed.

node --version
03

Check npm with npm --version

npm comes bundled with Node.js, so you do not install it separately. Run this command in the same terminal to confirm it is available. If it prints a number, npm is ready.

npm --version
04

Install Codex CLI

Use npm to install the Codex command-line tool. The -g in the command means global, so it installs Codex for your whole computer, not just one project. Run this command in your terminal. The install may take one to two minutes. Wait for it to finish before moving on.

npm install -g @openai/codex
05

Start the Codex sign-in flow

Now start the easiest current login path. Open a fresh terminal and run the command below. Codex should open a sign-in flow where you can choose to sign in with ChatGPT. This is now the default path for most beginners.

codex --login
06

Sign in with ChatGPT and confirm Codex opens

Choose the ChatGPT sign-in path if it is offered. Follow the browser prompts, then return to your terminal. Codex should finish the login flow and be ready for use. For many users, this is enough and you do not need manual API keys at all.

07

Use the API key fallback only if ChatGPT sign-in is unavailable

Only do this step if the ChatGPT login path did not work for your account. Go to platform.openai.com, sign in, add billing if required, create an API key, and configure OPENAI_API_KEY on your computer. If ChatGPT sign-in worked, skip this step completely.

08

Run Codex and ask a safe first prompt

Navigate your terminal to your project folder first, or stay in any folder for now if you do not have a project yet. Type codex and press Enter to start. When Codex opens, paste the safe first prompt below. It asks Codex to describe the folder without changing anything.

codex --- Once Codex opens, paste this as your first message: --- Describe this folder to me in plain English. List the main files and what they appear to be for. Do NOT change any files - this is a read-only inspection only.
09

Write down your install notes

Open a plain text file or a notes app. Fill in the template below. It takes two minutes and will save you time in future sessions. Knowing which commands worked and which needed a fix means you will not have to debug the same thing twice.

My Codex install notes - [TODAY'S DATE] Node.js version (from node --version): v___ npm version (from npm --version): ___ Codex installed successfully: yes / no Login method that worked: ChatGPT sign-in / API key Any fix I needed during install or login: ___ First prompt I used: "Describe this folder..." What Codex said in response: [PASTE FIRST 2 LINES OF ITS REPLY] Next session: open terminal, navigate to project folder, type codex

Expected result

Node.js and npm are installed and confirmed. Codex opens, authenticates through either ChatGPT sign-in or the API key fallback, reads a folder, and gives a plain-English description without changing any files. You have a saved install notes file.

Key takeaway

  • The safest first Codex prompt is always "describe, do not change." Confirm Codex is working before you ask it to touch any file. Use the easiest login path that works, and write down exactly what worked for future sessions.
Day 1 - Install Codex and run your first safe... - NonDev Apps