MODULE 01

FROM CHAT WINDOW TO COMMAND LINE

Move from browser-based AI to terminal tools, then build a persistent beat environment with a CLAUDE.md context file — so every session starts with the AI already knowing your work.

Watch

Module 1 is two videos. Watch them in order — the second one builds on the first.

From chat window to command line

Joe frames the shift from browser-based AI to terminal-based AI, walks through a PowerShell setup, then runs Claude Code and Claude on the Web on the same research task side by side. The video ends by running /init to scaffold a first CLAUDE.md.

TOPICS COVERED

Apps vs harnesses
Mollick's framing — same model, different capabilities based on the tools and environment it's given
Why escape the browser
Scripts, scheduled tasks, overnight scrapers — work a web chat can't do because it can't touch your files
PowerShell install and launch
Open a terminal, cd into a folder, type claude, and you're in an interactive session
Claude Code vs Claude on the Web
Same prompt, side by side. Web hits a tool-use limit; the terminal keeps working and saves files that persist
Running /init
Point Claude at a folder, let it read what's there, and have it scaffold your first CLAUDE.md automatically
Global vs project CLAUDE.md
Two tiers. User-level settings live in ~/.claude/; project-specific context lives in the folder. Edit both as you work

KEY TAKEAWAYS

  • You need a paid account for one of the three major models — Claude Code, Codex/ChatGPT, or Gemini CLI. The $20/month plan is fine. Free accounts can't do most of what this course covers (Gemini CLI's free tier is the one exception).
  • GitHub is your Google Drive for code. Joe spent a year wrestling with Google Drive as a code store before moving to GitHub — version history mismatches, overwrites, accidental deletions. GitHub fixed all of it.
  • The terminal gives you more from the same prompt. In the side-by-side, Claude on the Web finished faster but hit its tool-use limit. Claude Code kept going, saved persistent files, and produced a more thorough report that any future session can read back.
  • CLAUDE.md is your bread and butter. Every launch in a folder reads that file first. Put global preferences at the user level, project-specific rules in the folder, and update both as you learn what the model keeps getting wrong.

TIMESTAMPS

00:00Introduction and course framing
01:17IDE alternatives if you can't use the terminal
02:26Why a GitHub account matters
03:27Paid accounts for Claude, Gemini, or Codex
06:09Apps vs harnesses — Mollick's framework
08:29Setup walkthrough in PowerShell
11:14Side by side — Claude Code vs Claude on the Web
17:03The Web hits a tool-use limit, the CLI keeps going
19:13Running /init to scaffold CLAUDE.md
22:00The "Senator Joe" test — CLAUDE.md in action
23:20Global vs project-level CLAUDE.md
25:31Exercise prompt and wrap-up

Context files, CLAUDE.md, and memory

Joe walks through the three layers of context (global, project, session), what belongs in each CLAUDE.md, a "deletion test" for deciding what context is worth keeping, MEMORY.md and sub-memory files, and the four types of memory. The video closes with an argument for treating context files as workflow infrastructure — written once, committed to GitHub, reused forever.

TOPICS COVERED

The stateless problem
Every session starts from zero. Context files fix this so you stop re-explaining yourself each chat
Three layers of context
Global in ~/.claude/, project in the folder, session is the live conversation. The first two auto-load
The deletion test
Strip a line from your context file, re-run the same prompt, compare outputs. If nothing changes, cut it
Specific beats generic
"Verify facts" is useless. "Two-pass cross-check against the council spreadsheet" is actually useful
MEMORY.md and the four memory types
Auto-loads alongside CLAUDE.md. User, feedback, project, reference — four buckets for what the model should remember
Context as infrastructure
Not personal notes — workflow pipelines. Commit them to Git so fork-and-clone inherits the knowledge. Strip PII first

KEY TAKEAWAYS

  • Write it once, reap it forever. A small investment up front stops you from re-explaining yourself on every new chat. The outputs slowly and iteratively improve as you refine the file over weeks and months.
  • The four memory types fit everything you'll ever want to remember — user (who you are), feedback (what you've corrected), project (the big picture), reference (pointers to external files). If you can't slot something into one of those four, it probably doesn't need to be saved.
  • Context files aren't Post-it notes. They're infrastructure. Treat them the way you'd treat a config file for a production system — version them, commit them, strip PII before pushing, and update them whenever the model makes a mistake you don't want to see twice.
  • You can always just tell the model to read things on demand — git history, a webpage, the last three sessions. Auto-loading isn't the only pattern. "Go read X before starting" works just as well for one-off needs.

TIMESTAMPS

00:00Introduction and what this video covers
01:34Why context files matter
02:33The stateless problem
03:42Three layers — global, project, session
08:02The deletion test
09:32Specific beats generic
11:47MEMORY.md and the memory folder
13:51The four memory types
15:04Context as infrastructure
15:43Committing CLAUDE.md to Git
20:18Exercise prompt and next module teaser

Two bonus interviews live on the bonus interviews page: Madi McCool on rebuilding a nonprofit site with Claude Code, and Mike Janssen on using Codex CLI in a small public media newsroom.

Learning objectives

  • > Install Claude Code and run your first interactive session
  • > Explain the practical differences between browser-based and terminal-based AI workflows
  • > Execute basic AI prompts from your terminal
  • > Explain what project context files are and how they differ across tools (CLAUDE.md, GEMINI.md, AGENTS.md)
  • > Create a CLAUDE.md context file using the /init command and customize it for your beat
  • > Process journalism documents with and without context, and compare the results
  • > Identify journalism tasks that benefit from programmatic AI access

Before you start

You've used AI through a browser — typed a prompt, read the response, copied it somewhere. That works for quick questions, but a chat box can't run a scraper overnight, process a 500MB dataset, or write files to your hard drive. CLI tools give the AI access to a real machine with real compute power. You can leave a task running while you do other work, process documents too large to paste into a text field, and access local files directly — no uploading, no downloading, no clipboard. The model is the same. The difference is what it can reach.

The second half of this module solves a different problem: every time you open a new chat, the AI starts blank. It doesn't know your beat, your publication's style, or what you were working on last session. A context file — CLAUDE.md for Claude Code — is where you put that background once, so you never have to retype it.

Key concepts

Why leave the browser?

Web-based AI tools like ChatGPT and Claude.ai are convenient, but they run in a sandbox — you can't leave a scraper running, process a dataset that won't fit in a text box, or write output directly to your project folder. CLI tools give the AI access to your actual machine: your filesystem, your network, your compute power. It can read and write files, chain operations together, run long tasks in the background, and integrate with version control. CLI tools give you a real machine, not a sandbox.

What is a CLI?

A command-line interface (CLI) is a text-based way to interact with your computer. Instead of clicking buttons, you type commands. This might feel unfamiliar at first, but it gives you precise control and the ability to automate repetitive work. Think of it as learning keyboard shortcuts for your entire computer.

Node.js and npm

Node.js is a runtime that lets you run JavaScript outside a web browser. npm (Node Package Manager) comes with it and lets you install tools others have built. Many AI CLI tools, including Claude Code, are distributed through npm.

The terminal vs. web interface trade-off

Web interface advantages: No setup required, visual formatting, easy to share conversations.

CLI advantages: Direct file access, real compute power (run scrapers, process large datasets), automation, piping between tools, no copy-paste friction, works offline (for local models).

Working inside a session

Once you type claude and press Enter, you're inside an interactive session. The terminal becomes a conversation interface — paste prompts the same way you would in a browser.

  • Ctrl+C — interrupt whatever Claude is doing; press twice to exit

To continue a previous session after a break, run claude --resume from the same directory. Session commands like /help, /plan, /compact, and /clear are covered in Module 2.

What goes in a context file

A context file contains the things that make your project different from every other project — not things that are true of all journalism. Good content: your beat entities, beat-specific terminology, style preferences that differ from defaults, source attribution standards you want enforced, phrases to avoid. Bad content: "be helpful," "write clearly," "verify facts" — generic instructions the tool already tries to follow.

Think of it as a briefing document for a new reporter joining your beat. Not the journalism 101 stuff — the specific things about your coverage area and your newsroom's conventions.

The deletion test

Before saving a line to your context file, ask: if I delete this, would the AI's output change for someone who already knows my beat?

An experienced city hall reporter doesn't need to be told "verify facts before publishing." But they might need to know "the city uses 'resolution' for binding votes and 'ordinance' for legislation — don't confuse these." The first is generic. The second is beat-specific context that changes the output.

If deleting a line changes nothing for a knowledgeable reporter, cut the line.

Context files should be versioned

Your CLAUDE.md is infrastructure. Not a note to yourself — infrastructure. It gets committed to Git, versioned alongside your project files, and shared with colleagues when you share the project. When you push a project to GitHub, your context file goes with it. When a colleague clones the repo, your accumulated beat knowledge is already there.

This module introduces Git basics — what a repository is, what a commit does, what cloning means — because context files, skills, and workflow scripts are all shared through GitHub repos. You don't need to memorize Git commands; your CLI tool can run them for you. But you need to know what you're asking for and why.

EXERCISE

PART 1 — CLI SETUP AND COMPARISON

GOAL: Run the same task in a browser interface and in Claude Code, then compare what each one required of you.

01 Install Node.js

Download and install Node.js from nodejs.org. Choose the LTS (Long Term Support) version. The installer will also install npm.

After installation, open your terminal and verify:

terminal
node --version
npm --version

You should see version numbers for both. If you get "command not found," restart your terminal or computer.

02 Install Claude Code

Claude Code is Anthropic's official CLI for Claude. Install it with:

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

Then type claude to launch it. The first time, you'll go through a one-time setup — granting permissions and logging in with your Anthropic account. After that, typing claude opens a session immediately.

terminal
claude

Follow the prompts to log in. You'll need an Anthropic account with API access.

03 Try the task in a browser

Go to claude.ai and paste this prompt:

claude.ai
Summarize this news brief in one sentence:

The city council voted 5-2 yesterday to approve a $2.3 million budget for road repairs. Council member Jane Smith opposed the measure, citing concerns about contractor selection. The repairs will begin in March and affect Main Street, Oak Avenue, and Park Road.

Note what it took: open a browser, navigate to the site, paste the text manually, read the response. That works fine for one article.

04 Do the same task in Claude Code

Open your terminal and type claude to start a session. Then paste this prompt:

claude code
Create a file called test-article.txt with this content: "The city council voted 5-2 yesterday to approve a $2.3 million budget for road repairs. Council member Jane Smith opposed the measure, citing concerns about contractor selection. The repairs will begin in March and affect Main Street, Oak Avenue, and Park Road."

Then read the file and summarize it in one sentence. Save the summary to summary.txt.

Claude creates the files, reads them, and saves the output — without you touching the clipboard. Try following up: "Now do the same for every .txt file in this folder."

05 Compare the experience

In the video, you saw this comparison in action — the same research task run in Claude on the web and Claude Code simultaneously. Claude on the web finished faster but hit its tool use limit. Claude Code saved files to the filesystem that persist after the session. Now try a simpler version yourself.

Consider these questions:

  • > Which workflow required more steps from you?
  • > Which would scale better if there were 50 articles in a folder?
  • > What happened to the output in each case — where did it go?

PART 2 — PROJECT CONTEXT

GOAL: Set up a CLAUDE.md context file using /init, customize it for your beat, and verify it works across sessions.

06 Run /init to create your context file

Inside your Claude Code session, type the /init command. This walks you through creating a CLAUDE.md file with sensible defaults based on your project directory.

claude code
/init

Claude will scan your project and generate a CLAUDE.md with sections for project overview, conventions, and key files. Review what it created before moving on.

07 Customize it for your beat

The /init output is a starting point. Now add the beat-specific context that makes it yours. Ask Claude to help:

claude code
Read my CLAUDE.md and add these sections: my beat covers city hall in Greenfield — add the key entities (mayor, city council, departments), my style rules (AP style, Oxford comma, "the city" on second reference), terminology that's specific to my beat (resolution vs. ordinance), and a "things to avoid" section with phrases I don't want in output.

Adapt the prompt above for your own beat. The goal is to add information that would change how Claude handles your documents — not generic journalism instructions it already follows.

08 Test it in a new session

Quit Claude Code with /q, then relaunch it from the same directory. This starts a fresh session that reads your updated CLAUDE.md on startup.

terminal
claude

Now ask it something that tests whether the context loaded:

claude code
What do you know about my beat and my style preferences?

If Claude can describe your beat, your style rules, and your terminology, the context file is working. If it can't, check that CLAUDE.md is in the directory where you launched the session.

PART 3 — CONTEXT IN ACTION

GOAL: Process journalism documents with and without your context file, and compare the results.

Pick whichever scenario is closest to your work. The steps below use "city hall beat" as the example, but adapt the folder name, sample documents, and context file to match your choice:

  • A. City hall / municipal beat — press releases, council minutes, interview notes, reader tips. Good if you cover local government.
  • B. Data tracking project — public spending records, census tables, grant databases, FOIA responses. Good if you work with datasets or public records.
  • C. Content processing workspace — story drafts, source transcripts, editorial calendars, style guides. Good if you're building newsroom tools or managing production workflows.

09 Fork and clone the starter kit

Go to the course starter repo and click Fork (top right). This creates your own copy on GitHub that you can push to freely.

Once you've forked it, you'll clone your fork down to your machine — but you don't type git clone yourself. You let Claude do it. Open your terminal, go to your home folder, and launch Claude Code:

terminal
cd ~
claude

You're now in an active Claude Code session running in your home folder. Paste the URL of your fork into the chat and ask Claude to clone it and stay in the new folder:

claude code
Clone my fork of the course starter kit from
https://github.com/YOUR-USERNAME/mooc-starter-kit and
then stay in the new folder so we can work on the
course exercises together. The repo has sample docs,
skill templates, and a CLAUDE.md file you should read
first.

Replace YOUR-USERNAME with your own GitHub username. Claude will run the clone, change into the new folder, and read the CLAUDE.md inside it. The repo already contains sample journalism documents in sample-docs/, skill templates, starter scripts, and a CLAUDE.md with placeholder sections you'll customize.

This is the course's default install pattern. You cd somewhere, you launch your agent, and from that point on everything happens inside the conversation. Anything that used to mean "type a command into your terminal" — cloning, creating folders, initializing git, installing tools — now means "ask your agent to do it." See the Mac follow-along FAQ for more on the two-commands-only rule.

10 Explore what's in the repo

You're inside a Claude session. Ask it to show you what you're working with:

claude code
List all the files in this project and give me a one-sentence description of what each one contains

The repo is already a Git repository (you cloned it from GitHub). Claude can read every file in it. Notice that it found the CLAUDE.md and the sample documents in sample-docs/ — those are the files you'll work with in the next steps.

11 Process documents without context

You're already inside a session from Step 9. The repo has a CLAUDE.md, but it's still the starter template with placeholders — Claude has no real knowledge of your beat yet. Paste these four prompts one at a time:

claude code
Read sample-docs/press-release-park-closure.md and write a 3-sentence summary suitable for a news brief
claude code
Read sample-docs/council-minutes-excerpt.md. List every factual claim made by a council member, and note which are attributed to a named source vs. unattributed
claude code
Read sample-docs/interview-notes-martinez.md. What follow-up questions should I ask? Flag any claims that need independent verification
claude code
Read sample-docs/tip-email.md. Is this tip actionable? What would you need to verify before pursuing it?

Note the responses — you'll compare them to the with-context versions in Step 13.

12 Write your CLAUDE.md

Your repo already has a CLAUDE.md with placeholder sections. Open it and replace the placeholders with your own beat information. You can do this by asking Claude:

claude code
Read my CLAUDE.md and show me the placeholder sections I need to fill in. Then help me customize it for a city hall beat covering Greenfield city government.

Required sections:

  • Beat description — what you cover, key entities (city name, current officials, agencies)
  • Style rules — AP style, Oxford comma, how to refer to the city on second reference
  • Source standards — how to handle attribution, what to flag as unverified
  • Terminology — beat-specific terms the AI might confuse
  • Things to avoid — phrases or patterns you don't want in the output
  • Hard-won lessons — leave this section empty for now. Add entries as you correct the AI over time.

Apply the deletion test before saving: read each line and ask whether it would change the AI's output for a knowledgeable reporter. If not, cut it.

Then commit it — your context file is infrastructure, not a draft:

claude code
Commit my updated CLAUDE.md with the message "Customize context file for city hall beat"

13 Process the same documents with context

Exit the current session (Ctrl+C twice) and relaunch from the same directory. This starts a fresh session that picks up your new CLAUDE.md:

terminal
claude

Run the exact same four prompts from Step 11. Don't change anything — the only difference is that CLAUDE.md now exists and Claude read it before you typed a word.

Compare the responses side by side. Look for specific differences: terminology, attribution handling, style choices, what Claude flagged as needing verification.

Checkpoint

Self-check: Make sure you can answer these before moving on.

  • ? What command shows your installed Node.js version?
  • ? Why might a journalist prefer CLI tools over web interfaces for batch processing?
  • ? What is the deletion test, and how do you apply it to a line in your CLAUDE.md?
  • ? What filename does Gemini CLI use for its context file? What about Codex?
  • ? What does a Git commit do? Why should your CLAUDE.md be committed?
  • ? What changed in the AI's output once CLAUDE.md was present? Give one specific example.

Resources

Read before the exercise

  • [DOCS] Claude Code documentation — official setup guide, command reference, and CLAUDE.md documentation
  • [DOCS] Claude Code memory and CLAUDE.md — official documentation
  • [DOCS] Gemini CLI configuration and GEMINI.md — official documentation
  • [GUIDE] Introduction to Node.js — background on the runtime

Read after the exercise

  • [READ] What is Git? — Pro Git book, chapter 1
  • [COURSE] The Missing Semester: The Shell — MIT's free course on command-line fundamentals

Troubleshooting

"command not found: node"

Node.js isn't in your system PATH. Try restarting your terminal. On macOS, you may need to restart your computer. On Windows, make sure you checked "Add to PATH" during installation.

"permission denied" when installing globally

The native installer handles permissions automatically. If the curl install fails, see code.claude.com/docs for platform-specific instructions.

Claude Code says "unauthorized"

Your authentication may have expired or your API key may be invalid. Run claude again to re-authenticate, or check your Anthropic account for API access issues.

CLAUDE.md doesn't seem to be working

Make sure the file is named exactly CLAUDE.md (all caps) and is in the same directory where you're running the CLI tool. Run ls to confirm.

The AI is ignoring a rule in my context file

Check whether the rule is specific enough to affect output. Vague instructions ("write clearly") rarely change behavior. Specific ones ("refer to the agency as 'the Department' on second reference") do. If the rule is specific and still ignored, try moving it higher in the file.

Git says "not a git repository"

Ask your agent to handle it. Something like "this folder isn't a git repo yet — can you set it up, and confirm we're in the right folder before doing anything else?" will take care of both the git init and the folder check. You don't run either one yourself.

The AI can't find my document file

File names are case-sensitive on macOS and Linux. Ask your agent to list what's actually in the current folder — something like "show me the exact filenames in this folder so I can reference them correctly" — then use the exact names you see in your next prompt.