Documentation

Bewitch is a system monitoring daemon (bewitchd) and TUI client (bewitch) for Linux. It collects CPU, memory, disk, network, temperature, power, GPU, and process metrics, stores them persistently, and provides a rich interactive interface with historical charts, alerting, and a SQL REPL.

Architecture

bewitchd (daemon)
├── Collectors (procfs/sysfs, parallel goroutines) → Store (DuckDB)
├── Alert Engine (threshold + predictive + variance → notifications)
├── Pruner / Compactor / Archiver
└── API Server
    ├── Unix socket (always, plain HTTP)
    └── TCP listener (optional, TLS by default)

bewitch (TUI)
└── Daemon Client (unix socket or TCP+TLS)

bewitch repl (SQL console)
└── Daemon Client (POST /api/query)

Sections