Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/glossary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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 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.
Comment on lines +24 to +31
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I'm wrong here. But I feel like "CLI" is common nomenclature for the application, regardless of what the true acronym stands for.

Suggested change
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 Application
Application meant to be interacted with using a command-line interface.
Often referred to as a CLI as well, even though it's not the true acronym.
Command-line Interface (CLI)
A text-based interface for interacting with a program through commands,
options, and arguments. While CLI is its acronym, a CLI often refers to
an application written for the command-line interface.


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.

Comment on lines +33 to +37
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Personally I'd remove this to avoid confusion.

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``).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not too familiar with how glossaries work in Sphinx. But will "option" here link to the glossary for that word down below automatically or does that need to be done explicitly here and elsewhere in the code? I hope it's the latter.

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.
Comment on lines +50 to +53
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Multi-command
A command that groups multiple subcommands together. Groups and
multi-commands are similar concepts in Click.
Multi-command
Alias for Group, used to have a slightly different implementation.
Planned for removal in 9.0.


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()``.

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.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ General Reference
--------------------

.. toctree::
glossary
:maxdepth: 1

parameters
Expand Down
Loading