Pihole
@magistr/piholev2026.05.21.1
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 plussync(add missing) andsync-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.
02Models
@magistr/piholev2026.05.21.1pihole.ts
Global Arguments
| Argument | Type | Description |
|---|---|---|
| host | string | Pi-hole host, e.g. pihole.local or 10.0.0.53 (a scheme/port may be included, e.g. https://pi.lan:8443) |
| password | string | Pi-hole web password — use a vault reference: ${{ vault.get(my-vault, PIHOLE_PASSWORD) }} |
| scheme | enum | URL scheme (default http). Use https to avoid sending the password over cleartext. |
| caCert? | string | Optional inline PEM CA certificate to trust a self-signed Pi-hole HTTPS certificate |
| records? | array | Declarative 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
| Argument | Type | Description |
|---|---|---|
| deleteExtras? | boolean | Delete records not present in globalArguments.records |
03Previous Versions
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
Repository
https://github.com/umag/swamp-workspace05Platforms
06Labels