"Open the terminal and run brew install ruby." If that sentence felt opaque, this post is for you. The CLI is one of the highest-leverage skills a returning developer can pick back up, and it's much friendlier than people remember.
What CLI means
CLI = Command-Line Interface. Instead of clicking buttons and menus (a GUI โ Graphical User Interface), you type commands. The computer reads the command, runs it, and prints the result.
The CLI lives in an application called the terminal (or Terminal.app on Mac, also: iTerm2, Ghostty, Warp, Kitty). The thing reading your commands inside the terminal is called the shell โ typically zsh on Mac, bash on Linux. They're all variations on the same idea.
Why developers use it (and why you should too)
- Faster than GUIs for repetitive tasks. One
git commitbeats five menu clicks. - Scriptable. You can save commands in a file and run them again.
- Universal. The same commands work on servers, Docker containers, CI pipelines, anywhere with a shell.
- Required for serious dev tools. Claude Code is a CLI. Git is a CLI. Node, Python, Ruby, Homebrew, Railway, gh โ all CLIs.
- Shows you what's actually happening. GUIs hide complexity. The CLI doesn't.
Opening the terminal
- Mac: Cmd+Space โ "Terminal" โ Enter. Or in Finder: Applications โ Utilities โ Terminal.
- Better Mac terminals (free): iTerm2, Ghostty, Warp, Kitty. Drop-in replacements with better features.
- Windows: "Terminal" from the Start menu. Inside, you'll typically use PowerShell or install WSL (Windows Subsystem for Linux) for a Linux-style experience.
- Linux: Already there.
When you open it, you'll see a prompt โ something like daniel@MacBook ~ % followed by a cursor. That's where you type commands.
The 20 commands you actually need
| Command | What it does |
|---|---|
pwd | Print working directory โ where am I? |
ls | List files in current directory |
ls -la | List with details + hidden files |
cd folder | Change directory into folder |
cd .. | Go up one level |
cd ~ | Go to home directory |
mkdir folder | Make a new directory |
touch file.txt | Create an empty file |
cp source dest | Copy file from source to dest |
mv source dest | Move or rename a file |
rm file | Delete a file. Careful โ no undo. |
rm -rf folder | Delete folder and contents. Very careful. |
cat file | Print file contents to terminal |
less file | View file with scroll (press q to quit) |
grep "text" file | Search for text in a file |
find . -name "*.swift" | Find files matching a pattern |
open . | (Mac) Open current folder in Finder |
history | Show recent commands |
which command | Where is a command installed? |
man command | Read the manual page for any command |
That's 95% of daily CLI usage. Memorize these and you're competent.
How paths work
- Absolute path: starts with
/. Example:/Users/daniel/Documents - Relative path: starts from where you are. Example:
Documents/Resume.pdf - Home directory:
~is shorthand for/Users/your-username - Current directory:
. - Parent directory:
..
Pipes and redirection (the power tools)
- Pipe (
|): send output of one command into another.cat log.txt | grep "ERROR"finds error lines. - Output redirect (
>): save command output to a file.ls > files.txt - Append (
>>): add to a file without overwriting.
Once you grasp pipes, the CLI becomes wildly more powerful. You can chain 5 simple commands to do work that would take 30 minutes of manual clicking.
CLI tools you'll meet as an iOS dev
- git โ version control. See our GitHub guide.
- brew โ Homebrew, Mac package manager.
brew install <package> - xcodebuild โ build iOS apps from the command line.
- xcrun simctl โ control the iOS Simulator.
- node, npm, npx โ Node.js + JavaScript ecosystem.
- python, pip โ Python + its packages.
- gh โ GitHub CLI for repos, PRs, issues.
- railway โ deploy backends to Railway.
- claude โ Claude Code itself, the agentic CLI for development.
Getting comfortable
- Use it daily. Open the terminal first thing each work session. Force yourself.
- Tab completion. Press Tab after partial commands or filenames. The shell auto-completes.
- Up arrow. Cycles through your previous commands.
- Ctrl+R. Reverse-search through command history.
- Ask Claude. "How do I do X on macOS terminal?" The model knows every command.
- Don't fear breaking things. Most commands are safe. The dangerous ones (
rm -rf,sudo) you'll learn to respect over time.
Three weeks of daily use and the CLI feels normal. The keyboard-first muscle memory pays back for the rest of your career.
See: What is an IDE?, GitHub for Beginners, Docker for Beginners.