LooT Manuals
Deutsch

Introduction

What the loot program is, how paths, timestamps, options, output and exit codes work, and how to write and read your first value in five minutes.

What loot is#

loot is the command line of LooT. It operates the same installation as the web interface (the workbench), but by command: you create tenants and nodes, write and read time series values, follow values live, manage charts, scripts and components, and back up whole subtrees. This pays off for scripts, recurring tasks, imports of large files and automation. Every command ends with an exit code so scripts can react to success and failure.

The output consists of tables meant for people. Some commands print the server's response unchanged with --json, for machines.

Getting and starting loot#

loot is a single program: you need the executable loot (loot.exe on Windows) for your operating system. The person who runs your LooT installation tells you which build fits it and where to get it. Put the file in a folder on your PATH and check it:

console
$ loot --version

You can also work without installing anything on your own computer: the workbench contains a console that runs the same commands. Open it with Ctrl+J. Interactive mode and console describes details and limits.

Then sign in once (Sign-in):

console
$ loot login --server loot.example.org

loot --help lists all commands. Every command and subcommand has its own help, for example loot node create --help. These help texts are in German; this manual describes every command in detail.

Paths#

Every tenant and every node has a path. The scheme is always the same:

text
Tenant/Root.Child.Grandchild
  • The slash / separates the tenant from the rest, exactly once.
  • From there the dot . separates the levels of the hierarchy.
  • The tenant alone (Brewery) denotes the tenant. Brewery/Plant is a root node of the tenant, Brewery/Plant.Line1.Temperature a node three levels deep.
  • Names must not contain . or /. Spaces and umlauts are allowed.
  • A trailing slash is ignored: Brewery/ is the same as Brewery. This way you can keep using a tenant that was completed with the Tab key.
  • Aliases of a node (additional names) count as a path segment just like the name itself.

Timestamps#

Timestamps are ISO 8601, for example 2026-11-30T14:00:00, 2026-11-30T14:00 or just 2026-11-30 (midnight). A space instead of the T is accepted, as spreadsheets export it.

SituationBehavior
Input with an offset (Z, +01:00)used as given
Input without an offsetread as your local system time, with --utc as UTC
Outputin local system time with offset, for example 2026-11-30T14:00:00.000000+01:00; with --utc in UTC with Z
Times in the CSV file of loot importwithout an offset always UTC, regardless of --utc (see loot import)

Ranges with --from and --to are half-open: --from includes the instant, --to excludes it.

Global options#

OptionEffect
--utcPrint times in UTC and read input without an offset as UTC. The option may stand anywhere on the line.
-i, --interactiveStarts interactive mode. Only without a command.
--versionShows the version of the program.
-?, -h, --helpShows the help of the command.

--json is not a global option but belongs to individual commands (for example loot query, see Queries and live values). The description of each command says whether it supports it.

Output and errors#

Normal results go to the standard output, errors and notices to the error output. An error always starts with Fehler::

console
$ loot node show "Brewery/Plant.Gibt.Es.Nicht"
Fehler: Pfad 'Brewery/Plant.Gibt.Es.Nicht' existiert nicht.

Scripts check whether everything worked with the exit code of the last command (echo $? in Bash, $LASTEXITCODE in PowerShell).

Exit codes#

Exit codeMeaning
0Success
1The server or the data rejected the request (for example unknown path, missing permission, invalid file, rejected values)
2Wrong invocation or missing configuration (for example unknown option, invalid timestamp, not signed in yet)
130The command was cancelled

A command that you end with Ctrl+C because it is meant to run forever (loot live) ends with exit code 0.

Your first value in five minutes#

The example creates a small hierarchy, writes a measurement and reads it back. You need a tenant (here Brewery) and the Manage permission on the tenant to create root nodes. If the tenant does not exist yet, a system admin creates it with loot tenant create (Tenants).

  1. Sign in. loot shows an address and a code; open the address in your browser and confirm the code.
    console
    $ loot login --server loot.example.org
    Zum Anmelden diese Adresse im Browser öffnen und den Code bestätigen:
      Adresse: https://auth.loot.example.org/realms/loot/device?user_code=OOKL-URGS
      Code:    OOKL-URGS
    Warte auf die Bestätigung …
    Angemeldet als alice.
  2. See which tenants you can use:
    console
    $ loot tenant list
    Id  Name     Demo
    --  -------  ----
    7   Brewery
  3. Create the hierarchy, first the levels above, then the node that holds the time series:
    console
    $ loot node create "Brewery/Plant"
    Node 'Brewery/Plant' angelegt (Id 101).
    $ loot node create "Brewery/Plant.Line1"
    Node 'Brewery/Plant.Line1' angelegt (Id 102).
    $ loot node create "Brewery/Plant.Line1.Temperature" --type double --unit °C
    Node 'Brewery/Plant.Line1.Temperature' angelegt (Id 103).
  4. Write two values, one with the current time and one with your own timestamp:
    console
    $ loot write "Brewery/Plant.Line1.Temperature" 18.4
    Wert geschrieben: Brewery/Plant.Line1.Temperature = 18.4 (2026-11-30T14:02:11.482913+01:00).
    $ loot write "Brewery/Plant.Line1.Temperature" 18.9 --ts 2026-11-30T14:05:00
    Wert geschrieben: Brewery/Plant.Line1.Temperature = 18.9 (2026-11-30T14:05:00.000000+01:00).
  5. Read the values:
    console
    $ loot query "Brewery/Plant.Line1.Temperature"
    Zeitstempel                       Wert [°C]
    --------------------------------  ---------
    2026-11-30T14:02:11.482913+01:00  18.4
    2026-11-30T14:05:00.000000+01:00  18.9
  6. Follow new values live. Write further values in a second terminal; Ctrl+C ends the display.
    console
    $ loot live "Brewery/Plant.Line1.Temperature"
    Warte auf Werte von 1 Node(s) … (Strg+C beendet)
    2026-11-30T14:07:30.120044+01:00  Brewery/Plant.Line1.Temperature = 19.1
  7. Clean up if it was only a test:
    console
    $ loot node delete "Brewery/Plant" --recursive
    Gelöscht: Brewery/Plant

Where to go next#

You want to …Page
sign in, use service accountsSign-in
work interactively with tab completionInteractive mode and console
create and rename tenantsTenants
grant permissionsPermissions
manage nodes, templates and clonesNodes
write values, import CSV, upload filesWriting and importing values
query values and follow them liveQueries and live values

The web interface for the same topics is described in the workbench manual.

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