Investigating with AI Agents:

the Command Line for Journalists

01
Chapter 01

Why the Terminal?

What AI agents can do that chatbots can't

Why the Terminal?

AI agents in the terminal can do things ChatGPT can't

Long-Running Tasks
Run research overnight. No timeouts, no session limits.
Local File Access
Read, write, and transform files directly on your machine.
Chain Operations
Pipe tools together. Download, parse, analyze in one go.
Parallel Research
Run multiple agents simultaneously on different tasks.
Reproducible
Save commands as scripts. Re-run and share your methodology.
02
Chapter 02

Setup

Tools and terminal basics

Prerequisites

Install these free tools before we start

Terminal Basics

Navigate your file system with these commands

pwd Print working directory — where am I?
ls List files and folders in current directory
cd folder Change directory — go into a folder
cd .. Go up one level
mkdir name Create a new folder
# Example workflow
$ cd Projects
$ mkdir new-project
$ cd new-project
$ pwd
/Users/you/Projects/new-project

Install Commands

Scan the QR code to get all setup commands

Installing Agents

Three AI agents you can run from the terminal

Free · Google account required
# Install
$ npm i -g @google/gemini-cli
# Launch
$ gemini
03
Chapter 03

Vibe Coding

Three hands-on exercises

Exercise 1

15 min Data Extraction

Take a messy data source and turn it into a clean, publishable dataset using an AI agent.

  • Extract structured data from a PDF or webpage
  • Clean and normalize the data
  • Format as CSV ready for Datawrapper
  • Generate a summary of findings

Exercise 2

15 min Document Analysis

Use an AI agent to analyze a document, translate key sections, and extract media references.

  • Analyze a multi-page document
  • Translate relevant sections
  • Extract names, dates, and key facts
  • Identify media and image references

Exercise 3

15 min Scrollytelling

Code an interactive scrollytelling article using an AI agent — no prior coding experience needed.

  • Describe your story concept to the agent
  • Generate an HTML scrollytelling page
  • Add images, charts, and transitions
  • Preview and iterate locally
04
Chapter 04

GitHub & Deployment

Publish your work to the web

What is GitHub?

Where your code lives online — like Google Drive for code, with version history

Repository
A project folder stored online with full version history.
Commits
Snapshots of your work. Like save points you can always go back to.
GitHub Pages
Free web hosting. Push code → get a live website.

Deploy with Your Agent

Tell your AI agent what to do — step by step

1
“Initialize a git repository and create a .gitignore”
2
“Commit all files with a descriptive message”
3
“Check for any issues before deploying (broken links, missing files)”
4
“Push to GitHub and set up GitHub Pages”

You're a vibe coding journalist!

Terminal, AI agents, GitHub — you've got the tools