# Einführung

<p class="callout info">Das CLI steht erst ab Squeeze 2.5 zur Verfügung.</p>

Im Projektverzeichnis von Squeeze (htdocs unter Windows, /var/www/html/squeeze unter Linux) liegt das CLI (Kommandozeilen-Tool) für Squeeze namens **squeezer**.

Mit diesem Tool sind administrative Tätigkeiten möglich, die ggf. nicht über die HTTP Schnittstelle oder Benutzeroberfläche möglich sind. Zusätzlich lässt sich die Verwendung des CLIs mittels Skripten automatisieren, falls gewünscht.

[![image-1687522140224.png](https://docs.squeeze.one/uploads/images/gallery/2023-06/scaled-1680-/image-1687522140224.png)](https://docs.squeeze.one/uploads/images/gallery/2023-06/image-1687522140224.png)

## Verwendung

### Windows

Öffnen Sie ein Terminal (Kommandozeile oder Powershell) und verwenden sie diese Befehle:

```Powershell
# htdocs Ordner öffnen, nutzen Sie hier Ihren Installationspfad
cd C:\\SQUEEZE\\htdocs

# CLI testen
php ./squeezer --help
```

### Linux

```shell
# Installationspfad öffnen
cd /var/www/html/squeeze

# CLI testen
./squeezer --help
```

## Befehle

Das Tool dokumentiert die Unterstützen Befehle und ihre Argumente selbstständig. Nutzen sie folgendes Flag, um herauszufinden welche Befehle es gibt und was sie tun:

```shell
# Mögliche Befehle auflisten
./squeezer
# oder
./squeezer list

# Ausgabe:
Squeezer

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi|--no-ansi  Force (or disable --no-ansi) ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  completion          Dump the shell completion script
  help                Display help for a command
  list                List commands
 ci
  ci:strict-types     
 jobs
  jobs:schedule       Schedules internal jobs for tenants
 server
  server:check        Checks the System functionality
  server:migrate      You can use this command to migrate more then one tenant or directly all tenants on server
  server:reindex      Reindex all documents of all tenants.
 setup
  setup:server        Configure and setup a squeeze server using yaml settings given via either stdin or config option.
  setup:tenant        Configure and setup a squeeze tenant using yaml settings given via either stdin or config option. You can also pass a tenant argument to specify for which tenant installation should be done
 tenant
  tenant:backup       Backup a tenant
  tenant:check        Checks the tenant functionality
  tenant:reindex      Reindex documents of all document classes
  tenant:restore      Restore a tenant from backup:tenant dump
  tenant:upload-file  Uploads a file into the processing pipeline for a specific tenant.

```

So lassen Sie sich einen Befehl erklären:

```shell
# Hilfe für Command server:check ausgeben
./squeezer server:check --help

# Ausgabe:
Description:
  Checks the System functionality

Usage:
  server:check

Options:
  -h, --help Display help for the given command. When no command is given display help for the list command
  -q, --quiet Do not output any message
  -V, --version Display this application version
  --ansi|--no-ansi Force (or disable --no-ansi) ANSI output
  -n, --no-interaction Do not ask any interactive question
  -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
```