CLI - Command line interface
What is the Pacemaker CLI?
-
The Pacemaker Command Line Interface (Pacemaker CLI) is a simple tool that allows you to control, run, and optionally configure Pacemaker and all installed components and modules from your terminal application’s command prompt.
-
Pacemaker CLI uses as base command the well known Magento CLI
bin/magento
command -
Pacemaker's CLI is the user’s primary entry point into Pacemaker
-
The use of the command line requires a basic knowledge of using a command-line tool (terminal) in general
-
When using the Pacemaker command-line interface, you can specify optional configuration overrides using CLI options or environment variables as needed
Usage
Open the CLI tool of your choice (Terminal, ITerm2,…), type the desired command in the prompt of your terminal application and then press Enter to execute it.
The command consists of the program name (or the program path), followed by the required command and/or the options and arguments needed for it.
In the next sections we will break these down in basic terms for the Pacemaker command line.
-
Every command starts with the base call (i.e., program name or path)
Command inputs and structure
bin/magento [command]:[action|shortcut] [--option1 --option2] [optional arguments]
Example
bin/magento pacemaker:pipeline:status
bin/magento [command]:[step][action|shortcut] [--option1 --option2] [optional arguments] (1)
1 | For some commands, it is possible to call a more defined command. |
Example extended
bin/magento pipeline:step:process 173
bin/magento pacemaker:pipeline:details 21
- base call:
-
-
The Pacemaker CLI command starts with the base call, which is the base Magento CLI command (i.e., 'bin/magento').
-
This tells the command interpreter to execute the Magento CLI.
If the system cannot find the program name by itself, you must specify the full path to the Magento |
- command:
-
-
A command tells Pacemaker or component what operation to perform
-
Only one command can be specified at a time
-
A command can apply to an import as well as for a pacemaker pipeline
-
- action:
-
-
An action describes what precisely the command should do
-
That can be both an action and an action shortcut
-
- option:
-
-
One or more options can be specified after a command
-
The full name of an option is prefixed with two hyphens (
--
) -
A shorthand name is prefixed with one hyphen (
-
)
-
Some options toggle behavior on or off and others accept values. Options that accept values can be written
using a single space between the option’s name and value (--option value
) or using an equals sign between the
name and value (--option=value
).
- argument:
-
-
An argument is entered after the base call and any options
-
You can think of an argument as an anonymous options
-
The generate command only accepts one single argument, which is a ID or name
-