LooT Manuals
Deutsch

Interactive mode and console

Enter commands line by line and complete commands, options and node paths with Tab, in the terminal with loot -i and in the workbench console.

Interactive mode in the terminal#

In interactive mode loot stays open and takes commands line by line. You do not have to type loot every time, and the Tab key completes commands, options and the paths of your nodes. This is the quickest way to get to know and explore LooT. Single calls and scripts keep running without -i.

text
loot -i
loot --interactive

You must be signed in first (Sign-in). Then the prompt loot> appears:

text
LooT interaktiv: 'help' zeigt die Befehle, 'exit' beendet, Tab vervollständigt Befehle und Node-Pfade.
loot> node list Brewery
Id   Name   Werttyp  Einheit  Richtung
---  -----  -------  -------  --------
101  Plant  -        -        -
loot> node show Brewery/Plant.Line1.Temperature
Pfad:         Brewery/Plant.Line1.Temperature
Id:           103
Name:         Temperature
Beschreibung: -
Werttyp:      Double
Einheit:      °C
Richtung:     InOut
Duplikate:    LastServe
Letzter Wert: 18.9
loot> exit

The rules at a glance:

  • One command per line, just like on the command line. A leading loot is ignored, so you can paste commands from this manual unchanged.
  • help shows the commands (like loot --help). Ask a command for details with --help, for example node create --help.
  • exit or quit end the session, as does Ctrl+D (Windows: Ctrl+Z) on an empty line.
  • Every line is evaluated on its own. An error in one command does not end the session.
  • Global options apply only to the line they are on: query ... --utc. To run the whole session in UTC, start with loot -i --utc.
  • -i cannot be combined with a command, and inside the session it is unnecessary.
  • Signing in and out (login, logout) also work inside the session and take effect immediately.
  • Commands that run forever, such as live, end with Ctrl+C. The session stays open.

Keys#

KeyEffect
TabCompletes the word at the cursor (see below)
↑ / ↓Scrolls through earlier inputs. The history lives only in the memory of this session.
← / →, Home, EndMoves the cursor within the line
Delete, BackspaceDeletes characters
Esc, Ctrl+CClears the line (does not end the session)
Ctrl+DEnds the session when the line is empty

Tab completion#

The Tab key completes the word before the cursor:

  • Commands and subcommands: no becomes node, node cr becomes node create.
  • Options: After a hyphen, loot suggests the options of the command, for example --unit or --recursive.
  • Paths: For commands that expect a path, loot suggests tenants, root nodes and children, taken live from your installation. Brewery/Pl becomes Brewery/Plant, and after a dot the children follow. You must be signed in for this, and only nodes you are allowed to see are offered.

With exactly one match, Tab inserts it. With several, Tab adds the common beginning; if nothing more can be added, Tab lists the possibilities. Case does not matter. Paths with spaces or umlauts are put in quotation marks automatically, and for long paths such as "Hallifax/Werk Süd.Lager.Tür offen" you only type the beginning.

The workbench console#

The workbench contains a console that runs the same commands as loot, without installing anything. Open and close it with Ctrl+J or with the Console switch in the rail. The cross in the console hides it. The interface is described in the workbench manual.

The console works with the account you are signed in with in the workbench; you do not need loot login. Otherwise it behaves like interactive mode:

  • The prompt is loot> ; a leading loot is allowed but unnecessary.
  • Tab completes commands, options and node paths. Several matches appear as a hint below the line.
  • ↑ and ↓ scroll through your inputs.
  • For an exit code other than 0, Exitcode 1 (or 2) appears below the output.
  • Esc or Ctrl+C cancel a running command, for example live. On a non-empty line, Ctrl+C discards the input.
  • clear or Ctrl+L clear the console.
  • -i is unnecessary in the console: it is interactive itself.

Blocked commands#

The console runs inside the web server's process. Files that a command would read or write would therefore live on the web server, not on your computer. The console refuses such commands before running them, with a message (… ist in der Konsole der Oberfläche gesperrt, that is: blocked in the console of the interface) and exit code 2:

  • loot upload, loot download, loot import
  • loot stream download
  • loot values export
  • loot exchange export, loot exchange verify, loot exchange store download
  • loot stack pull
  • every command where you name a file, for example --file, --output, --map, --client-secret-file or an archive file, as well as loot spectrum -o

For these tasks use the loot program on your own computer.

A product of Rheinwert Datentechnik · rheinwert.deVersion: LooT 0.9.10