## glossary
What is CLI?
A CLI (Command Line Interface) is a way of interacting with a program or operating system by typing text commands instead of clicking on graphical elements. It is the oldest interface in computing — and still the favorite of people who build software.
The reason it endures is not nostalgia. A command is precise (there is no ambiguity in what was asked), reproducible (it can be saved, versioned and re-run) and composable (one command’s output becomes another’s input).
Anatomy of a command
git commit -m "corrige cálculo de frete" --no-verify
│ │ │ │
│ │ └─ short flag with argument └─ long flag
│ └─ subcommand
└─ program
# combining commands: one's output feeds the next
cat acesso.log | grep "500" | wc -lThat last example shows the real power of the CLI. Three simple programs, each doing one thing, chained through pipes to answer "how many 500 errors did we have?". None of them was written with the others in mind — that is the Unix philosophy in action.
CLI, terminal and shell: not synonyms
- Terminal — the program with the black window (Terminal.app, iTerm2, Windows Terminal). It is just the emulator that displays text.
- Shell — the interpreter that reads what you type and executes it: Bash, Zsh, Fish, PowerShell. See the Shell entry.
- CLI — the concept of a command-driven interface, and also each specific program that exposes one (git, docker, npm).
Why developers depend on the CLI
Practically the entire modern development toolchain is operated from the command line: Git for versioning, npm or pnpm for dependencies, Docker for containers, kubectl for clusters. More importantly, it is what makes automation possible — a CI/CD pipeline is nothing more than a sequence of commands executed by a machine. There is no graphical interface on a build runner.
Commands worth knowing
pwd # where am I
ls -lah # list files, including hidden ones, with readable sizes
cd ../projetos # move between directories
find . -name "*.log" # find files by pattern
grep -rn "TODO" src/ # search for text inside files
tail -f app.log # follow a log in real time
chmod +x deploy.sh # make a script executableTo go deeper, we have guides on fundamental terminal commands, SSH in practice and npx as an execution tool.
## faq
Frequently asked questions
Is the CLI the same thing as the terminal?
No. The terminal is the window that displays text and receives what you type. The CLI is the command interface itself, interpreted by the shell. In everyday conversation the terms blur together, but technically they are distinct layers.
Is the CLI worth learning if there is a GUI for everything?
Yes, for three reasons: automation (commands become scripts, clicks do not), remote access (servers rarely have a graphical interface) and speed on repetitive tasks. On top of that, many tools expose features in the CLI that the GUI does not even offer.
Which shell should I use?
On macOS the default is Zsh and there is no strong reason to switch. On Linux, Bash is the most universal and what you will find on servers. On Windows, PowerShell is native, but WSL lets you run a full Linux environment, which is usually closer to what production looks like.