Installing either agent takes one line in Terminal. The first session should be one where the agent can read but not change anything, so you learn its habits before you let it act. Below, you install both, sign in and run a read-only first session in the ~/veo-work folder from the earlier Veo lessons.
Install Claude Code
Anthropic recommends its native installer, one line pasted into Terminal, which puts claude in ~/.local/bin and updates it in the background. When it works, claude --version prints a version number followed by (Claude Code). claude doctor then checks the install and your settings files without starting a session.
Install Claude CodeTerminal # The installer Anthropic recommends for macOS, Linux and WSLcurl -fsSL https://claude.ai/install.sh | bash# Should print a version number followed by (Claude Code)claude --version# A read-only check of the install, updates and settings files. Starts no session.claude doctor
Homebrew works too, as brew install --cask claude-code. A cask is a Homebrew package for a ready-made program, and this one follows the stable channel, typically about a week behind, and never updates itself, so you run brew upgrade by hand. The npm package needs Node 22 or newer, and the docs warn never to put sudo in front of it.
Install Codex
OpenAI's standalone installer works the same way, and the comment line in the block lists the npm and Homebrew alternatives. codex --version prints the version. Once you have signed in, codex login status shows whether you are using your ChatGPT plan or an API key.
Install CodexTerminal # The standalone installer from OpenAI for macOS and Linuxcurl -fsSL https://chatgpt.com/codex/install.sh | sh# The same program another way: npm install -g @openai/codex or brew install --cask codexcodex --version# After signing in: which method is active, ChatGPT plan or API keycodex login status
Codex saves your login to ~/.codex/auth.json in plain text unless its config.toml says cli_auth_credentials_store = "keyring". Add that line if you would rather the login sat in your system keychain.
Pick one install method per agent and stick with it. Two copies of claude, one from npm and one from the installer, compete for the same name, and which -a claude lists them in the order the shell tries them.
Sign in with your plan
Run claude or codex inside a project folder, choose the subscription option and finish in the browser, and the login is saved. Choose your plan, not an API key, unless you mean to pay per token. In Claude Code, /status shows which account and method are active.
Start the first session read-only
The two agents start in different modes. Claude Code starts in auto mode, in which a separate model approves or blocks each action in place of you, unless your settings name another mode. Anthropic's own page says auto mode does not guarantee safety, and it lists reading .env and sending credentials to their matching API among the actions allowed by default. For a folder whose scripts spend money, that is the wrong default.
Codex looks at the folder. In a git repository it suggests its Auto preset, which edits files and runs commands inside the project freely but asks before touching the network or anything outside the folder. In a folder without git it suggests read-only. So open your first session in Claude Code's plan mode, which reads and proposes and edits nothing until you approve a plan, or in Codex's read-only sandbox.
The first session, read-onlyTerminal cd ~/veo-work# Claude Code: plan mode reads and proposes, and edits nothing until you approve a planclaude --permission-mode plan# Codex: a read-only sandbox that asks before anything outside itcodex --sandbox read-only --ask-for-approval on-request
Then give it a job that cannot cost anything. This first prompt asks it to read your two Veo scripts and explain them. Watch which files it opens and what it asks to run, because that is the habit you are checking.
The first promptText Read first_veo.py and first_veo.sh. In plain English, tell me what each one sends to Google, which model and settings it uses, and what one run costs at today's prices. Do not run anything, and do not open .env.
When you want to change mode later, Shift+Tab does it in Claude Code and /permissions does it in Codex.
Ignore stale tutorials
Guides go out of date fast here. Codex has retired its old untrusted approval policy, and the choices are now on-request and never, so a guide that tells you to run codex -a untrusted will fail. OpenAI's page warns that the retired setting can stop Codex starting at all. Claude Code renamed its default mode Manual, and older videos still call it default.
If something behaves oddly after you change a setting, run claude doctor again. It reports a broken settings file without starting a session, which you will rely on in the last lesson of this module.
The next lesson writes CLAUDE.md and AGENTS.md for a video project.