GLOSSARY /LESS, BUT BETTER

What Is a CLI?

A command-line interface lets you operate software by typing commands instead of clicking through a graphical interface.

THE 10-SECOND ANSWER

Control software with typed commands

A CLI lets you operate software by entering text commands in a terminal instead of clicking buttons in a graphical interface.

Command-Line Interface

In plain language

A command-line interface lets you work with software by entering text commands. Instead of opening menus and clicking buttons, you type an instruction and inspect the output.

Microsoft describes a command-line interface as a way to interact with a computer through text commands. (Microsoft Learn)

Coding agents often use CLI tools because commands are straightforward to execute, automate and inspect.

An everyday example

An analogy

01Graphical interfacePress buttons on a remote
02CLIState the command
03SoftwareCarries it out

Both interfaces can control the same software. They simply provide different ways to communicate with it.

Where you will encounter it

You will find CLI tools in terminals, developer documentation, package managers, Git workflows and coding agents such as Codex or Claude Code. Examples include git, gh, npm and playwright-cli.

Should you care

  • General chat users: usually not necessary.
  • Codex / Claude Code users: worth understanding.
  • Developers: a foundational concept.
  • Automation users: useful because commands can be repeated and inspected.

How it differs

CLI vs terminal: The terminal is the environment in which you enter commands. A CLI is a particular software interface that accepts those commands.

CLI vs GUI: A CLI uses text commands; a graphical user interface uses visual controls such as buttons and menus.

CLI vs : A coding agent can run CLI commands directly. MCP exposes capabilities through a standard AI-tool protocol. If the CLI already works well, adding an MCP server may be unnecessary.

CLI vs : A CLI is used through commands. An API is an interface used by software. A CLI may call an API behind the scenes.

Compare Playwright MCP and Playwright CLI, or see how CLI commands fit into the guide to add MCP servers to Codex.

Related terms

Continue with these published explanations.

Sources & last checked

Sources supplied by the reviewed editorial pack. The check date records our pack cross-check, not a new live verification of these websites. Examples illustrate the concepts.

Official documentation

01
What is a command-line interface? — Microsoft Learnlearn.microsoft.com

Last checked: September 3, 2026