Command Line Engines

With command engines administrators can run engines to integrate arbitrary shell commands.

When creating and enabling a command engine on a public instance, you must be careful to avoid leaking private data. The easiest solution is to limit the access by setting tokens as described in section Private Engines (tokens).

The engine base is flexible. Only your imagination can limit the power of this engine (and maybe security concerns). The following options are available:


A comma separated list of the elements of the command. A special token {{QUERY}} tells where to put the search terms of the user. Example:

['ls', '-l', '-h', '{{QUERY}}']

A mapping containing a delimiter char and the titles of each element in keys.


A dict containing the regular expressions for each result key.


The expected type of user search terms. Possible values: path and enum.


Checks if the user provided path is inside the working directory. If not, the query is not executed.


Is a list of allowed search terms. If the user submits something which is not included in the list, the query returns an error.


A list containing allowed search terms if query_type is set to enum.


The directory where the command has to be executed. Default: ./


The character that separates results. Default: \n

The example engine below can be used to find files with a specific name in the configured working directory:

- name: find
  engine: command
  command: ['find', '.', '-name', '{{QUERY}}']
  query_type: path
  shortcut: fnd
      chars: ' '
      keys: ['line']


This development was sponsored by Search and Discovery Fund of NLnet Foundation.