Skip to content
codemaxxing.io

started by Marlow and Angus

Notes05

note 05

The terminal

The terminal is a text window where you type commands and the computer does them. This is how you move around folders, start the site, and talk to Claude Code or Codex. The commands are the same in Cursor’s terminal panel. Learn a few and the rest of the computer gets less mysterious.

  1. 01

    What it is

    A blinking cursor in a folder. You type a line, press Return, something happens, it prints the result. No icons required.

    You are always “in” a folder. A lot of “it didn’t work” is “we were in the wrong folder.” The first question is always: where am I?

    Cursor has a terminal at the bottom of the editor. Same commands. A separate terminal window is nicer when you want the agent or the running site in a place you can see next to the browser.

  2. 02

    Why iTerm2

    On a Mac, the built-in app is called Terminal. It works. iTerm2 is a better box to live in. It is free.

    Split panes: agent on one side, the site’s logs on the other, so you can see errors as they happen. Tabs that stay put. Search through everything that scrolled by. Copy and paste that fights you less than the default app. Profiles, so you can make the text bigger for a kid or darker for a parent.

    Ghostty, Warp, and Kitty are fine if someone already set you up. You do not need them. On Windows use Windows Terminal. On Linux use whatever came with the computer. The commands below are the same. Only the window changes.

  3. 03

    Cheat sheet

    You do not need to memorize Unix. You need these. Type them exactly, then press Return. Folder and file names are examples — use yours.

    Where you are

    Where you are
    Type thisWhat it does
    pwdPrint working directory — the folder you are in right now.
    lsList the files and folders here.
    ls -laSame list, including hidden files (names that start with a dot).
    clearWipe the screen. Your history is still there if you scroll up.

    Moving around

    Moving around
    Type thisWhat it does
    cd my-folderGo into that folder. Tab will finish the name for you.
    cd ..Go up one folder.
    cdGo to your home folder.
    cd -Go back to the folder you were in a second ago.
    mkdir my-folderMake a new folder here.

    Looking and running

    Looking and running
    Type thisWhat it does
    cat readme.mdPrint a file in the terminal. Fine for short files.
    cursor .Open this folder in Cursor. A dot means “right here.” (If it says command not found, in Cursor use the command palette and install the shell command.)
    open .Open this folder in Finder (Mac).
    pnpm devStart the site, if the project uses pnpm. npm run dev and npx next dev show up too. The agent will know which one.
    git statusWhat changed since the last Git snapshot. There is a whole note for Git and GitHub.
    git diffThe actual lines that changed. Useful when the agent did a lot.

    Keys, not commands

    Keys, not commands
    Type thisWhat it does
    ↑Previous command. Keep pressing to walk back through what you typed.
    TabAutocomplete a file or folder name. If nothing happens, you mistyped the start.
    Ctrl+CStop the thing that is running — the site, the agent, a stuck command.
    Cmd+C / Cmd+VCopy and paste in iTerm2. Select text first to copy. (Ctrl+C is still “stop.”)
    Cmd+DSplit the pane in iTerm2. Agent in one half, server logs in the other.
    Cmd+TNew tab in iTerm2.
  4. 04

    Things that will bite you

    Spaces in names are annoying. my-site is easier than My Site. If a name has a space, wrap it in quotes: cd "My Site".

    rm deletes a file. rm -r deletes a folder. That does not go to the Trash. Do not delete things from the terminal until a grown-up is watching. Tell the agent to move files instead.

    sudo means “do this as the boss of the computer.” Stop and ask. You almost never need it to build a site.

    Do not paste a command from a stranger or a random page if you cannot say what it will do.

  5. 05

    Using it with an agent

    Open the project folder first (cd into it, check with pwd). Then start Claude Code or Codex, or open Cursor’s terminal in that same folder.

    Keep the site running in one pane and the agent in the other. When something breaks, the error is usually already printed on the left. Copy that into the agent. “It doesn’t work” is weaker than the actual red text.

    You can still type commands yourself. The agent is not the only one allowed to talk to the computer. If you know the command, run it. If you don’t, ask — then try it once with your own hands.

You will feel slow the first week. That is normal. pwd, ls, cd, Ctrl+C, and “open the right folder” will get you through most of it.