Glossary Updates6 new terms added to the glossaries · October 11, 2026, 13:38 CEST
AI TechDocKnowledge

Glossary · 1 · SDK fundamentals

Command-line interface (CLI)

Also known as: CLI, command-line tool, command-line utility

German: Befehlszeilenschnittstelle

In software engineering, a command-line interface (CLI) is a text-based interface in which a user or a script invokes a program by typing its name together with options, arguments and operands, and receives text output plus a numeric exit status. CLIs are executed in a shell or terminal, so they can be recorded, parameterized and replayed without human interaction. Most software development kits ship at least one CLI that drives recurring tasks such as project scaffolding, code generation, building, packaging, publishing, deployment and flashing of devices. Because the calling syntax is text, CLIs are the usual integration point between an SDK and continuous integration pipelines or build servers.

  • CLI
  • SDK
  • toolchain
  • automation
  • developer experience

In one sentence

What a command-line interface (CLI) is, how its syntax and exit codes work, and the role CLIs play in SDK toolchains.

Example

A technical writer builds the documentation deliverable by running the DITA Open Toolkit command `dita --input=userguide.ditamap --format=html5` in the same pipeline step that the engineering team uses for nightly builds.

A CLI has three visible parts: the utility name, the options and arguments passed to it, and the results it returns — text on standard output and standard error plus an exit status, where zero conventionally signals success and any non-zero value signals an error. On POSIX-like systems the expected spelling of options (single-letter options after a hyphen, -- as the end-of-options delimiter, operands last) follows the utility conventions of the Open Group Base Specifications; many modern SDK CLIs add GNU-style long options such as --output=json. Shells add quoting, redirection and pipelines around this, which is why a documented command can be copied into a script unchanged.

A CLI is not a separate feature set. In most SDKs it is a client over the same application programming interface or build engine that the libraries use, which makes the command line a scriptable view of documented behavior rather than a second product.

How it applies

  • Developer SDKs. Cloud CLIs (for example the AWS CLI) send the same requests as the language libraries do against a REST API, read profiles and credentials from a configuration file or environment variables, and can usually emit JSON for machine parsing. Document which authentication mechanism a command expects, and never claim that using the CLI by itself satisfies a security or regulatory requirement.
  • Publishing SDKs. The DITA Open Toolkit is driven by the dita command, which takes an input DITA map, a transformation type and parameters; this makes DITA output generation reproducible in a pipeline and lets conditional processing profiles be selected per build instead of per author session.
  • Platform SDKs. Extension toolkits expose CLIs for scaffolding a project skeleton, running schema validation on manifests, packaging and signing the artifact, and uploading it to a marketplace. The scaffolding step is usually a thin front end for automatic code generation.
  • Hardware SDKs. Embedded toolchains wrap the compiler, linker, flasher and serial monitor in one front end — Espressif's idf.py is a documented example — so that building, writing firmware to a target and starting a debugging session are single commands. Document the required board, port and toolchain version, because a command that silently targets the wrong board produces misleading results.
  • Documentation work. Reproduce commands verbatim in code blocks, name every required option, state the exit codes that automation should check, and pin the tool version you tested against, ideally with a semantic versioning range. Mark commands that change remote state or erase device memory.
  • Engineering work. CLI flags, environment variables and configuration files form part of the tool's public surface; removing or renaming a flag is a breaking change for pipelines, so treat the CLI as an interface contract with its own deprecation notes.

CLI vs. API

An API is the programmatic contract a program calls in process or over a network; a CLI is a process a human or a script starts and whose output it parses. A CLI is therefore often narrower than the API behind it and shaped for automation ergonomics — exit codes, stable machine-readable output, idempotent commands. When both exist, the API is the authority for available operations, and the CLI documentation should say which API version or build engine it invokes.

External references

By knowledge.aitechdoc.world · Published October 11, 2026 · Last reviewed

Source: The Open Group Base Specifications Issue 7, Utility Conventions (IEEE Std 1003.1)

Definitions follow the cited standards and specifications. Where a source is a copyrighted publication, such as an ISO, IEC or EN standard, the definition is a close paraphrase, not a verbatim quotation, so as not to infringe copyright. We recommend reading the original publication. The sections “How it applies” are editorial commentary by AI TechDoc Knowledge and are not part of any standard.

Seen a mistake? Send us a note!