Command Line Interface

OTRS has command line interface (CLI) to perform various actions on the system.

Megjegyzés

You need command line access in the operating system to use this feature.

All commands have to run from the bin folder inside OTRS home folder. In Update Guide we recommended to install OTRS into the /opt/otrs/ folder. If your system is installed in this folder, you can either switch to /opt/otrs/bin/ and run the command from there or you can run the command by using absolute path.

To list all available commands using relative path:

cd /opt/otrs/bin/
perl otrs.Console.pl

To list all available commands using absolute path:

perl /opt/otrs/bin/otrs.Console.pl

If the execution bit is set, you can run the file as a program.

chmod u+x /opt/otrs/bin/otrs.Console.pl
/opt/otrs/bin/otrs.Console.pl

Each command has --help option to print its help and usage. For example, the --help option of Admin::Queue::List command prints this:

List existing queues.

Usage:
 otrs.Console.pl Admin::Queue::List [--all] [--verbose]

Options:
 [--all]                        - Show all queues.
 [--verbose]                    - More detailled output.
 [--help]                       - Display help for this command.
 [--print]                      - Format for console output messages. Possible values (json|plain|raw). Default: raw.
 [--no-ansi]                    - Do not perform ANSI terminal output coloring.
 [--verbosity]                  - Verbosity level for the output. Possible values (debug|info|notice|error). Default: info.
 [--quiet]                      - Suppress informative output, only retain error messages (same as --verbosity error).
 [--profile]                    - Profile the console command.

The help of each command should be easy to understand.

Scroll to Top