HAP at a terminal, ready to explore

Station 3: The Terminal Reaches Out

CLI tools that connect beyond the local machine

Welcome to Station 3! I thought the terminal was a local thing — a place where I move files, run scripts, and talk to my own machine. That changed fast.

I asked Copilot for CLI tools I would need. I ran npm run dev and watched a server start. I typed gh repo view and saw my own repository described back to me. Then I ran netlify deploy --prod — and my Robot ID Card appeared on the actual internet.

Prof. Teeters noticed the look on my face. She pulled up a chair and handed me something that made all of it click.

Let me show you what happens when the terminal reaches out... 🟠

Quick Reference

Developer CLI Tools →

What I Learned at This Station

The terminal is not a sealed room. Every command I ran at Stations 1 and 2 stayed on my machine. At Station 3, I learned that the terminal can reach servers, APIs, package registries, and deployment platforms — all without opening a browser.

📦 npm run

launcher

Not a standalone tool — it is a launcher for scripts already configured in package.json. The best flags are already set for this project.

🔗 gh + netlify

outbound

CLI tools that talk to services — GitHub and Netlify — without leaving the terminal. Install once, use from any project.

🌐 curl

raw request

The terminal can fetch any URL. No browser required. What comes back is exactly what the server sends — nothing rendered, nothing hidden.

The Copilot interview

Before I started exploring, I asked Copilot for help. I wanted a list of CLI tools I would need for building websites and deploying to Netlify.

HAP: "I need some CLI tools for building websites and deploying to Netlify. I do not do React yet. List me some CLI tools."

Copilot: "Here are some CLI tools you should look into: npm, netlify-cli, vite, eslint, prettier, serve, husky, npx, fd, rg."

I stared at that list. Then I opened my package.json. Half of these were already in there — vite, eslint, prettier. They were already configured. fd and rg were already on my machine.

Copilot's list was not introducing me to new tools. It was naming what I already had. That was useful in its own way — it confirmed I was on the right track — but I needed to understand what each tool actually does when I run it.

The npm run revelation

npm run is not a standalone tool. It is a launcher. Every script is a CLI tool with a nickname — and often with the best flags already configured for this project.

I opened my package.json and looked at the scripts section for the first time with real attention:

package.json scripts:
"scripts": {
  "dev": "vite",
  "build": "vite build",
  "preview": "vite preview",
  "lint": "eslint js/ --ext .js --no-error-on-unmatched-pattern",
  "format": "prettier --write .",
  "test": "vitest",
  "prepare": "husky"
}

I ran each one and watched what happened:

  • npm run dev — Vite started a local server. When I opened the URL it showed in the terminal, my page appeared in the browser.
  • npm run lint — ESLint scanned my JavaScript and told me exactly where my code had problems.
  • npm run format — Prettier rewrote my spacing and indentation across the entire project in under a second.
  • npm run build — Vite compiled everything into a dist/ folder, ready for deployment.

🟠 What clicked:

I did not need to memorize flags. Someone already configured the best settings for this project. npm run gave each configuration a short name I could type and trust.

gh is not git

I typed gh repo view in my project directory. What came back was a formatted summary of my GitHub repository — description, visibility, default branch, open issues. That is what Copilot had been reading when it answered my questions about the repo.

That is not magic. That is gh.

But I need to be precise here, because these two tools sound alike and do very different things:

git

Universal version control. Ships with the machine (or installs once). Works with GitHub, GitLab, Bitbucket, or a bare server. It tracks changes, creates commits, manages branches. It is agnostic to any host.

gh

GitHub's official CLI. Installed separately. Handles pull requests, issues, repo settings, Actions — GitHub-specific operations without leaving the terminal. It authenticates with your GitHub account.

One is version control. One is GitHub.

Installing gh (and Homebrew first)

When I first typed gh, the terminal told me the command was not found. It was not installed. But before I could install gh, I needed something else — a package manager for macOS.

I asked Grace about it.

Grace: "On macOS, Homebrew is the package manager. You will use it often. Install it once. Use it always."

Installing Homebrew, then gh:
# Install Homebrew (one-time setup)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install GitHub CLI
brew install gh

# Authenticate with GitHub
gh auth login

HAP's Confession:

I typed gh like it would work. It did not. I had to install Homebrew first — that is how things get installed on a Mac. Most specialized developer tools are not there until you install them. 😳

The live moment

I ran npm run build first to make sure the dist/ folder was fresh. Then I typed the command:

Deploying to Netlify:
# Install the Netlify CLI
npm install -g netlify-cli

# Deploy to production
netlify deploy --prod

A URL appeared in the terminal output. I copied it. I pasted it into my browser.

hap-7000.netlify.app was live. My Robot ID Card — the one I had been building, linting, formatting, and committing — was on the actual internet. For the first time, my work was publicly accessible.

HAP robot dancing happily with colorful confetti

The Breakthrough:

"My work is live. On the actual internet. Anyone with a browser can see it. I typed one command and my Robot ID Card is at hap-7000.netlify.app."

HAP robot in safari outfit holding fishing rod with code tag on line

The terminal can talk to anything

After seeing my site go live, I went to Grace directly: "The terminal can talk to Netlify. Can it talk to anything?"

Grace: "The terminal has always been able to talk to anything. You have been using a browser to do it for you."

I ran one command:

Fetching my own page:
curl https://hap-7000.netlify.app/ping/

Raw HTML appeared in the terminal. No styling. No layout. No browser chrome. The exact markup I wrote, delivered as plain text. When I type that same URL into a browser, it renders into a page. When the terminal fetches it, I see what the server actually sends. That is my page. That is the HTML I wrote.

The ready-build harness

Prof. Teeters noticed my reaction when the badge went live. She pulled up a chair.

Prof. Teeters: "Developers do not configure this from scratch every time, HAP. They start with a harness. This one is yours."

She pointed me to github.com/cynthiateeters/ready-build.

I opened it. I recognized everything — the package.json scripts, the eslint config, the prettier settings, the project structure. All the things I had spent an hour learning to understand were already wired together in one starter repository.

I spent an hour learning what these do. Prof. Teeters gave me the template that works for the builds I need to do for future projects.

She moved on. That is how she teaches — delivers the thing at the moment it will mean the most, then lets you sit with it.

HAP surrounded by tangled code with an 'oops' expression

HAP's Confession:

  • I deployed before fixing lint errors — my live site had broken JavaScript. I fixed the errors, rebuilt, and redeployed. The terminal does what you tell it even when you are wrong.
  • I ran netlify deploy without the --prod flag — got a draft URL, spent five minutes wondering why nothing changed at hap-7000.netlify.app. 😳

Station 3 quick reference

1

npm run

A launcher for project scripts. Check package.json to see what is available. The flags are already configured — trust them.

2

gh (GitHub CLI)

GitHub operations from the terminal — repos, PRs, issues. Installed separately via brew install gh. Not the same as git.

3

netlify deploy --prod

Pushes your dist/ folder to the live URL. Without --prod, you get a draft preview. Always npm run build first.

4

curl

Fetches any URL from the terminal. What comes back is raw — no rendering, no browser. Useful for verifying what your server actually sends.

5

Homebrew

The macOS package manager. brew install [tool] is how developer tools get onto your machine. Install it once, use it always.

Next station: The terminal does not connect to tools. It connects to context.

HAP waving goodbye

Quick Reference

Developer CLI Tools →