Term
命令行界面(CLI)
Next Token / Wiki

Command-Line Interface (CLI)

A command-line interface (CLI) is a way to interact with programs through text commands: the user types commands and arguments in a terminal, and the program responds with text output. It is the foundation of scripting and automation.

Also known as

CLI · 命令行 · command line · 命令行界面 · Command-Line Interface

Definition

A command-line interface (CLI) is a way to interact with programs through text commands: the user types a command and arguments in a terminal, and the program responds with text output. It contrasts with graphical user interfaces (GUI).

How it works

A shell parses the input and invokes the corresponding executable; the program reads options such as -v or --help and prints results or errors back to the terminal. CLIs commonly support pipes and redirection so one command’s output can feed another’s input.

Usage

Version control (git), package management (npm, pip), and build and deployment scripts rely heavily on CLIs. On servers and in automation scripts, the CLI is often the primary — or only — way to operate.

An IDE integrates the same development workflows behind a graphical interface and often invokes CLI tools internally. An API is an interface for programs to call, whereas a CLI is for humans. An SDK usually ships with its own CLI tools.

Sources