Switch config format from YAML to TOML

Replaces gopkg.in/yaml.v3 with github.com/BurntSushi/toml. Updates
struct tags, default config path, Dockerfile CMD, README, and ships
config.example.toml in place of the YAML example. ${ENV_VAR}
expansion still runs on the raw file before parsing, so the behavior
is unchanged.
This commit is contained in:
prosolis
2026-05-24 21:05:41 -07:00
parent 035089c159
commit 8f38d3d9f4
8 changed files with 72 additions and 71 deletions

View File

@@ -19,7 +19,7 @@ Any member of an allowlisted room may issue commands. The bot auto-joins on invi
## Configuration
Copy `config.example.yaml` to `config.yaml` and edit. The loader expands `${ENV_VAR}` references at load time, so secrets can come from the environment.
Copy `config.example.toml` to `config.toml` and edit. The loader expands `${ENV_VAR}` references at load time, so secrets can come from the environment.
Required:
@@ -43,7 +43,7 @@ curl -H "X-Api-Key: YOUR_KEY" https://radarr.example.com/api/v3/qualityprofile
```bash
go build -tags goolm -o bellhop ./
./bellhop -config config.yaml
./bellhop -config config.toml
```
The `goolm` tag uses the pure-Go olm implementation so libolm isn't needed.
@@ -54,7 +54,7 @@ The `goolm` tag uses the pure-Go olm implementation so libolm isn't needed.
docker build -t bellhop .
docker run -d \
--name bellhop \
-v "$PWD/config.yaml:/app/config.yaml:ro" \
-v "$PWD/config.toml:/app/config.toml:ro" \
-v bellhop-data:/app/data \
bellhop
```
@@ -70,7 +70,7 @@ The bot bootstraps cross-signing on first run and persists Olm/Megolm sessions i
```
main.go
internal/
config/ — YAML loader with ${ENV_VAR} expansion
config/ — TOML loader with ${ENV_VAR} expansion
matrix/ — mautrix client: login, device persistence, E2EE, sync loop
arr/ — Radarr/Sonarr/Lidarr HTTP clients
bot/ — command parser + dispatch + threaded replies