CV Google Scholar MSU
Using AI in your research

Setting up the terminal

The terminal is a window where you type commands instead of clicking. Here you need it for one thing: running an agent, Claude Code or Codex, inside a folder on your computer. Setup takes about fifteen minutes. The labs are demonstrated, so you don’t need any of this to follow them.

Last verified November 4, 2026, against each company’s own instructions.

Before you start

Pick a tool your plan and your data allow.

The full rules, tool by tool, are on Choosing a tool.

You may not need the terminal at all. Both agents also run in an ordinary app window: the Code tab in the Claude desktop app, and Codex mode in the ChatGPT desktop app. They do nearly everything the terminal does. What the terminal adds is running the same task over and over by itself.

1. Open the terminal

MacWindows
Open itPress Cmd+Space, type Terminal, and press Return. It’s also in Applications, then Utilities.Right-click the Start button (or press Win+X) and choose Terminal. On Windows 10, choose Windows PowerShell, not the one marked (x86).
What you’ll seeA line ending in % and a blinking cursor.A line starting with PS. That’s PowerShell, which is what you want.
Where it startsYour home folder, /Users/yournameYour home folder, C:\Users\yourname

2. The commands you need

Type a command, then press Return or Enter. Most are the same on both.

What it doesMacWindows
Show where you arepwdpwd
List what’s herelsls
Go into a foldercd Documentscd Documents
Go up one levelcd ..cd ..
Make a foldermkdir agent-testmkdir agent-test
Open this folder in a normal windowopen .explorer .
Clear the screenclear or Cmd+Kcls
Stop whatever is runningCtrl+CCtrl+C
Bring back an earlier commandUp arrowUp arrow
Finish a long name for youTabTab
Get a folder’s full pathDrag the folder from Finder into the terminal window.Shift+right-click the folder, choose Copy as path, then paste.

To go to a folder you can see on screen, type cd and a space, drag the folder in (Mac) or paste its path (Windows), and press Return.

3. Install the agent

Copy one command into the terminal and press Return. Install whichever tool you’ll use, or both. Each command is the company’s own.

Codex

Mac:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Windows, in PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

Claude Code

Mac:

curl -fsSL https://claude.ai/install.sh | bash

Windows, in PowerShell:

irm https://claude.ai/install.ps1 | iex

On Windows, Anthropic also recommends installing Git for Windows, which lets Claude Code use the same command tools it uses on a Mac. Without it, Claude Code works through PowerShell.

Check that it worked

Close the terminal, open a new one, and type codex --version or claude --version. A version number means it’s installed.

4. Sign in and try it

Make a practice folder, go into it, and start the agent. The first time, a browser window opens so you can sign in with your ChatGPT or Claude account. With an Edu seat, sign in with the MSU account that has the seat.

mkdir agent-test
cd agent-test
codex

Type claude instead of codex for Claude Code. Then ask for something small in plain English, for example:

Make a file called notes.md with three ideas for organizing a literature review.

The agent shows each step as it works. If it asks for permission, read what it wants to do before you approve it. Press Esc to stop it at any point, and type /exit to leave. Then run open . or explorer . to see the file it made.

For the commands inside each agent, see Claude Code and Codex, side by side.

If something goes wrong

What you seeWhat to do
Mac: command not found after installingClose the terminal and open a new one. If Claude Code still isn’t found, run this line, then open a new terminal:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
Mac: a window asks to install command line developer toolsClick Install. These are Apple’s free developer tools, and the agents use them. It takes a few minutes.
Windows: running scripts is disabled on this systemRun this, answer Y, and try again:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Windows: an error about 32-bitYou opened Windows PowerShell (x86). Close it and open Terminal, or Windows PowerShell without (x86).

Optional add-ons

None of these is needed. Each one fixes a particular annoyance.

A nicer terminal

An editor alongside

Talking instead of typing

Good prompts are long and specific, and they’re faster to say than to type.

Reading the files agents write

Agents often write Markdown files (ending in .md): plain text with headings and bullets. Obsidian (free) and Typora ($14.99 once) show them formatted. In VS Code, press Shift+Cmd+V (Mac) or Ctrl+Shift+V (Windows) for a preview.

An undo button: Git

Git saves snapshots of a folder, so you can roll back anything an agent changed. OpenAI’s advice is to save a snapshot before and after each task. GitHub Desktop (Mac, Windows, free, no account needed) does it with buttons. Codex also behaves differently in a Git folder: it can edit files there, while in other folders it starts out read-only.

Installing other tools

Homebrew (Mac, needs macOS 15 or newer) and winget (built into Windows 11) install and update other command-line tools with one command. Neither is needed for the agents.

Windows: WSL

WSL runs Linux inside Windows. Both agents now run directly on Windows, so skip it unless you already work in Linux. The one exception is Claude Code’s optional sandbox, which on Windows works only under WSL 2. To install it, run wsl --install in PowerShell opened as Administrator, then restart.