A CLI tool to manage Pi-hole DNS hosts via the v6 API.
Download the latest binary from Releases or build from source:
cargo install --path .Save your Pi-hole server URL and password to the config file:
pihosts login https://pihole.example.com 'yourpassword'This stores credentials in ~/.config/pihosts/config.json and caches the session in ~/.config/pihosts/sid.
pihosts listWith options:
pihosts -c list # colored output
pihosts -t list # table format
pihosts -ct list # colored table
pihosts -j list # JSON outputpihosts add 192.168.1.100 myhost.example.compihosts remove 192.168.1.100 myhost.example.comCredentials can be provided via:
- Config file (created by
pihosts login) - Environment variables:
PIHOLE_URLandPIHOLE_PASSWORD - Command line flags:
-s/--serverand-p/--password
Priority: CLI flags > environment variables > config file
GPL-3.0