Command-line interface (CLI) agents operate directly in the terminal, reading and writing files, running commands, and iterating on code without requiring a graphical IDE, which means they work in any environment with a shell, including headless servers and Docker containers. Tools like Claude Code, Aider, and OpenAI Codex excel at large-scale refactors, headless workflows, and tasks where you want an agent to operate independently across many files with full access to your system tools.