Skip to main content

Pihole

@magistr/piholev2026.05.21.1· 12d agoMODELS
01README

Pi-hole custom DNS record management for swamp — list, add, delete, and declaratively sync local DNS A-records on a Pi-hole v6 (FTL) appliance.

Model:

  • @magistr/pihole — custom DNS host records with full CRUD plus sync (add missing) and sync-clean (declarative converge: add missing + delete extras).

Hardened for shared use: the web password is marked sensitive and never persisted in cleartext; HTTPS is supported with an optional inline CA certificate for self-signed appliances (no insecure verify-skip); every FTL session is released after use (DELETE /api/auth) so the appliance's concurrent-session limit is never exhausted; requests are bounded by a timeout; and captured API error bodies are redacted before they are logged or persisted.

02Models1
@magistr/piholev2026.05.21.1pihole.ts

Global Arguments

ArgumentTypeDescription
hoststringPi-hole host, e.g. pihole.local or 10.0.0.53 (a scheme/port may be included, e.g. https://pi.lan:8443)
passwordstringPi-hole web password — use a vault reference: ${{ vault.get(my-vault, PIHOLE_PASSWORD) }}
schemeenumURL scheme (default http). Use https to avoid sending the password over cleartext.
caCert?stringOptional inline PEM CA certificate to trust a self-signed Pi-hole HTTPS certificate
records?arrayDeclarative DNS records used by add/sync
fn list()
List all custom DNS records
fn add()
Add the DNS records from globalArguments.records (idempotent: already-present records are reported unchanged)
fn sync(deleteExtras?: boolean)
Add missing records from globalArguments.records; optionally delete extras
ArgumentTypeDescription
deleteExtras?booleanDelete records not present in globalArguments.records
03Previous Versions1
2026.02.27.1Feb 27, 2026
04Stats
A
100 / 100
Downloads
4
Archive size
14.7 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels