From 8716512900ce78b7c9fef8711cc7483cc1164b19 Mon Sep 17 00:00:00 2001 From: by22Jy <122969909+by22Jy@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:24:41 +0800 Subject: [PATCH 1/4] Add glossary of terms to documentation Adds a glossary section defining key terms used throughout Click's documentation. Terms defined: - Argument - Callback - Command - Command Line Interface (CLI) - Context - Flag - Group - Multi-command - Option - Parameter Closes #3077 --- docs/glossary.rst | 53 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 docs/glossary.rst diff --git a/docs/glossary.rst b/docs/glossary.rst new file mode 100644 index 0000000000..fc103042a4 --- /dev/null +++ b/docs/glossary.rst @@ -0,0 +1,53 @@ +Glossary +======== + +This glossary defines key terms used throughout Click's documentation. + +.. glossary:: + :sorted: + + Argument + A positional parameter passed to a command without a name prefix. + Arguments are identified by their position in the command line. + For example, in ``mycli command file.txt``, ``file.txt`` is an argument. + + Callback + A function that is invoked when a parameter is processed. Callbacks can be + attached to options or arguments for custom validation or processing. + See :doc:`/parameters` for more information. + + Command + A function decorated with ``@click.command()`` or ``@click.group()`` + that can be invoked from the command line. Commands can accept options + and arguments. + + Command Line Interface (CLI) + A text-based interface for interacting with a program through commands, + options, and arguments. Click helps you build CLIs in Python. + + Context + An object that carries state between commands in a group hierarchy. + The context is created for each command invocation and can be accessed + via the ``@click.pass_context`` decorator. + + Flag + A boolean option that doesn't take a value (e.g., ``--verbose`` or ``-v``). + Flags are either present (True) or absent (False). + + Group + A command that contains other commands (subcommands). Created with + ``@click.group()``. Groups allow organizing commands hierarchically. + + Multi-command + A command that groups multiple subcommands together. Groups and + multi-commands are similar concepts in Click. + + Option + A named parameter passed to a command, typically with a dash prefix + (e.g., ``--name value`` or ``-n value``). Options can have values + or be used as flags. + + Parameter + The general term for both options and arguments that can be passed + to a command. Parameters are defined using decorators like + ``@click.option()`` or ``@click.argument()``. From 53e7d4f92d10d0ccd6a17965396cbf4e2fd4278a Mon Sep 17 00:00:00 2001 From: by22Jy <122969909+by22Jy@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:24:43 +0800 Subject: [PATCH 2/4] Add glossary to documentation index --- docs/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/index.rst b/docs/index.rst index e705cc6d48..74349298fc 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -95,6 +95,7 @@ General Reference -------------------- .. toctree:: + glossary :maxdepth: 1 parameters From 6167b1ddd469a627d47b6ee1193408ee2156a5e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 08:25:22 +0000 Subject: [PATCH 3/4] [pre-commit.ci lite] apply automatic fixes --- docs/glossary.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/glossary.rst b/docs/glossary.rst index fc103042a4..c946deda50 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -17,7 +17,7 @@ This glossary defines key terms used throughout Click's documentation. See :doc:`/parameters` for more information. Command - A function decorated with ``@click.command()`` or ``@click.group()`` + A function decorated with ``@click.command()`` or ``@click.group()`` that can be invoked from the command line. Commands can accept options and arguments. From d855e2028f7179ae87555c86f0fb9584e2a3285a Mon Sep 17 00:00:00 2001 From: by22Jy <122969909+by22Jy@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:05:02 +0800 Subject: [PATCH 4/4] docs: Add terminal, command line application, and command line utility to glossary Following maintainer feedback to include more commonly used terms. --- docs/glossary.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/glossary.rst b/docs/glossary.rst index c946deda50..03b34ad486 100644 --- a/docs/glossary.rst +++ b/docs/glossary.rst @@ -21,10 +21,20 @@ This glossary defines key terms used throughout Click's documentation. that can be invoked from the command line. Commands can accept options and arguments. + Command Line Application + A Python program built with Click that provides a command line interface. + Command line applications use commands, options, and arguments to interact + with users through the terminal. + Command Line Interface (CLI) A text-based interface for interacting with a program through commands, options, and arguments. Click helps you build CLIs in Python. + Command Line Utility + A command line application designed to perform a specific task or set of + tasks. Command line utilities are often used for system administration, + file manipulation, or development workflows. + Context An object that carries state between commands in a group hierarchy. The context is created for each command invocation and can be accessed @@ -51,3 +61,8 @@ This glossary defines key terms used throughout Click's documentation. The general term for both options and arguments that can be passed to a command. Parameters are defined using decorators like ``@click.option()`` or ``@click.argument()``. + + Terminal + A text-based interface for interacting with the operating system. + Also known as a command prompt, console, or shell. Command line + interfaces are used within a terminal to run commands and applications.