# Terminal **English** · [Português](pt-BR/cli.md) The `acaua` binary serves both as the CLI command runner and the background daemon. This page describes the commands available in the engine. ```text acaua [options] Commands: serve Start the API and embedded web dashboard analyze Analyze a Zeek log directory doctor Check the local environment update Check for available releases auth Local account recovery (`auth reset`) ``` ## `acaua serve` Starts the HTTP API and the embedded web dashboard. ```bash acaua serve --bind 127.0.0.1:8787 --data-dir .acaua ``` | Option | Default | Meaning | |---|---|---| | `--bind` | `127.0.0.1:8787` | Listen address | | `--data-dir` | `.acaua` | Store and runtime files | The default bind is loopback-only. Login (with MFA) is mandatory in every mode, but plain HTTP is not encrypted: the daemon refuses to start without `ACAUA_TRANSPORT` set to `local`, `tls` or `proxy` (see [docker.md](docker.md#authentication-and-transport)). In `tls` mode `--bind` must be an `IP:port`. The API is documented in [architecture.md](architecture.md#api). ## `acaua analyze` ```bash acaua analyze /var/log/zeek/current acaua analyze /var/log/zeek/current --json ``` Validates the target directory, ingests `conn.log` and `dns.log` traffic into Parquet partitions, and runs threat detection algorithms across pillars 1–4. The human-readable output reports summary metrics, individual alerts, and the `hosts:` ranking section (top 10 by priority score): ```text diretório: /var/log/zeek/current logs lidos: 2 registros: 10450 alertas: 2 [0.850] Beaconing detected: 192.168.1.50:any -> 198.51.100.1:443 (period ~14400s, score 0.850) [0.600] Persistent session: 192.168.1.50 -> 198.51.100.1:443 (6.0h, score 0.600) hosts: [0.784] 192.168.1.50 0.850/0.600/0.000 estado: ok ``` ## `acaua doctor` ```bash acaua doctor acaua doctor --json ``` Runs environment checks: - `zeek`: verifies `zeek --version` or detects containerized execution (`ACAUA_RUNTIME=container`). - `curl`: confirms HTTP download availability. - `duckdb`: confirms dynamic linkage against `libduckdb.so` in runtime. - `research`: verifies that the research workspace remains isolated. ## `acaua auth reset` ```bash acaua auth reset --username admin --data-dir .acaua docker compose exec acaua acaua auth reset --username admin --data-dir /data/acaua ``` Local recovery for an administrator who lost the password or the authenticator. It removes the user's MFA and sessions, clears the login throttle, writes an audit entry and prints a **temporary password once**. The next login with it requires enrolling MFA again and choosing a new password before any ordinary session. The command edits the data directory only: it never starts the daemon and does not need `ACAUA_TRANSPORT`. A running daemon sees the change on its next request. If the secret key is an external file, `ACAUA_SECRET_KEY_FILE` must be set for the command too. An unknown user is refused. ## `acaua update` ```bash acaua update ``` Queries the Gitea Releases API, compares the latest tag against the running version, and prints upgrade instructions (`docker compose pull && docker compose up -d` when running inside a container). ## Exit codes | Code | Meaning | |---|---| | `0` | Success | | `1` | Runtime error (invalid path, query error, I/O error) | | `2` | Invalid command-line usage (clap) | ## Environment | Variable | Meaning | |---|---| | `ACAUA_RUNTIME` | Set to `container` inside Docker images to adapt service checks | | `DUCKDB_LIB_DIR` | Path to directory containing `libduckdb.so` when compiling natively | | `LD_LIBRARY_PATH` | Shared library load path for `libduckdb.so` outside standard paths |