A command-line interface for AdGuard Home — the network-wide ad and tracker blocker that runs as a self-hosted DNS sinkhole. This CLI wraps the full AdGuard Home REST API so you can manage your DNS filtering, parental controls, safe browsing, DHCP server, TLS certificates, filter lists, DNS rewrites, client rules, and query logs from a terminal or AI agent.
Key capabilities:
- DNS filtering — manage blocklists, custom filter rules, per-client access controls, and blocked services (YouTube, Facebook, TikTok, etc.)
- Local sync & offline search —
syncpulls all data into a local SQLite database for instant full-text search, analytics, and health reporting without hitting the API - DNS health dashboard —
healthsummarizes protection status, block rate, top blocked domains, stale data detection, and query volume trends - Parental & safe browsing controls — enable/disable safe search, safe browsing (malware/phishing), and parental filtering from the command line
- DHCP management — configure the built-in DHCP server, manage static leases, check for conflicts
- TLS & encryption — configure DoH/DoT/DoQ, validate TLS certificates, generate Apple mobile config profiles
- Real-time monitoring —
tailstreams live DNS query changes;analyticsruns aggregate queries on synced data - Agent-ready —
--agentflag sets JSON output, compact mode, no-color, and no-prompts in one flag for AI agent workflows
Created by @e-jung (Eric Jung).
The recommended path installs both the adguard-home-pp-cli binary and the pp-adguard-home agent skill (Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, and other agents supported by the upstream skills CLI) in one shot:
npx -y @mvanhorn/printing-press-library install adguard-homeFor CLI only (no skill):
npx -y @mvanhorn/printing-press-library install adguard-home --cli-onlyFor skill only — installs the skill into the same agents as the default command above, but skips the CLI binary (use this to update or reinstall just the skill):
npx -y @mvanhorn/printing-press-library install adguard-home --skill-onlyTo constrain the skill install to one or more specific agents (repeatable — agent names match the skills CLI):
npx -y @mvanhorn/printing-press-library install adguard-home --agent claude-code
npx -y @mvanhorn/printing-press-library install adguard-home --agent claude-code --agent codexIf npx isn't available (no Node, offline), install the CLI directly via Go (requires Go 1.26.4 or newer):
go install github.com/mvanhorn/printing-press-library/library/monitoring/adguard-home/cmd/adguard-home-pp-cli@latestThis installs the CLI only — no skill.
Download a pre-built binary for your platform from the latest release. On macOS, clear the Gatekeeper quarantine: xattr -d com.apple.quarantine <binary>. On Unix, mark it executable: chmod +x <binary>.
Install the CLI binary first. The installer writes binaries to a per-user managed bin directory by default: $HOME/.local/bin on macOS/Linux and %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows.
npx -y @mvanhorn/printing-press-library install adguard-home --cli-onlyThen install the focused Hermes skill.
From the Hermes CLI:
hermes skills install mvanhorn/printing-press-library/cli-skills/pp-adguard-home --forceInside a Hermes chat session:
/skills install mvanhorn/printing-press-library/cli-skills/pp-adguard-home --forceRestart the Hermes session or gateway if the newly installed skill is not visible immediately.
Install both the CLI binary and the focused OpenClaw skill. The installer defaults binaries to a per-user bin directory ($HOME/.local/bin on macOS/Linux, %LOCALAPPDATA%\Programs\PrintingPress\bin on Windows):
npx -y @mvanhorn/printing-press-library install adguard-home --agent openclawRestart the OpenClaw session or gateway if the newly installed skill is not visible immediately.
This CLI ships an MCPB bundle — Claude Desktop's standard format for one-click MCP extension installs (no JSON config required).
To install:
- Download the
.mcpbfor your platform from the latest release. - Double-click the
.mcpbfile. Claude Desktop opens and walks you through the install. - Fill in
ADGUARD_HOME_USERNAMEwhen Claude Desktop prompts you.
Requires Claude Desktop 1.0.0 or later. Pre-built bundles ship for macOS Apple Silicon (darwin-arm64) and Windows (amd64, arm64); for other platforms, use the manual config below.
Manual JSON config (advanced)
If you can't use the MCPB bundle (older Claude Desktop, unsupported platform), install the MCP binary and configure it manually.
go install github.com/mvanhorn/printing-press-library/library/monitoring/adguard-home/cmd/adguard-home-pp-mcp@latestAdd to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"adguard-home": {
"command": "adguard-home-pp-mcp",
"env": {
"ADGUARD_HOME_USERNAME": "<your-key>"
}
}
}
}See Install above.
Get your API key from your API provider's developer portal. The key typically looks like a long alphanumeric string.
export ADGUARD_HOME_USERNAME="<paste-your-key>"You can also persist this in your config file at ~/.config/adguard-home-pp-cli/config.toml.
adguard-home-pp-cli doctorThis checks your configuration and credentials.
adguard-home-pp-cli access listRun adguard-home-pp-cli --help for the full command reference and flag list.
Manage access
adguard-home-pp-cli access list- List (dis)allowed clients, blocked hosts, etc.adguard-home-pp-cli access set- Set (dis)allowed clients, blocked hosts, etc.
Manage adguard home profile
adguard-home-pp-cli adguard-home-profile get- Getadguard-home-pp-cli adguard-home-profile update- Updates current user info
Manage apple
adguard-home-pp-cli apple mobile-config-do-h- Get DNS over HTTPS .mobileconfig.adguard-home-pp-cli apple mobile-config-do-t- Get DNS over TLS .mobileconfig.
Blocked services controls
adguard-home-pp-cli blocked-services all- Get available services to use for blockingadguard-home-pp-cli blocked-services available-services- Deprecated: UseGET /blocked_services/allinstead.adguard-home-pp-cli blocked-services list- Deprecated: UseGET /blocked_services/getinstead.adguard-home-pp-cli blocked-services schedule- Get blocked servicesadguard-home-pp-cli blocked-services schedule-update- Update blocked servicesadguard-home-pp-cli blocked-services set- Deprecated: UsePUT /blocked_services/updateinstead.
Manage cache clear
adguard-home-pp-cli cache-clear- Clear DNS cache
Clients list operations
adguard-home-pp-cli clients add- Add a new clientadguard-home-pp-cli clients delete- Remove a clientadguard-home-pp-cli clients find- Get information about clients by their IP addresses or ClientIDs.adguard-home-pp-cli clients search- Retrieve information about clients by performing an exact match search using IP addresses, CIDRs, MAC addresses, or ClientIDs.adguard-home-pp-cli clients status- Get information about configured clientsadguard-home-pp-cli clients update- Update client information
Built-in DHCP server controls
adguard-home-pp-cli dhcp add-static-lease- Adds a static leaseadguard-home-pp-cli dhcp check-active- Searches for an active DHCP server on the networkadguard-home-pp-cli dhcp interfaces- Gets the available interfacesadguard-home-pp-cli dhcp remove-static-lease- Removes a static leaseadguard-home-pp-cli dhcp reset- Reset DHCP configurationadguard-home-pp-cli dhcp reset-leases- Reset DHCP leasesadguard-home-pp-cli dhcp set-config- Updates the current DHCP server configurationadguard-home-pp-cli dhcp status- Gets the current DHCP settings and statusadguard-home-pp-cli dhcp update-static-lease- Updates IP address, hostname of the static lease. IP version must be the same as previous.
Manage dns config
adguard-home-pp-cli dns-config- Set general DNS parameters
Manage dns info
adguard-home-pp-cli dns-info- Get general DNS parameters
Rule-based filtering
adguard-home-pp-cli filtering add-url- Add filter URL or an absolute file pathadguard-home-pp-cli filtering check-host- Check if host name is filteredadguard-home-pp-cli filtering config- Set filtering parametersadguard-home-pp-cli filtering refresh- Reload filtering rules from URLs. This might be needed if new URL was just added and you don't want to wait for automatic refresh to kick in. This API request is ratelimited, so you can call it freely as often as you like, it wont create unnecessary burden on servers that host the URL. This should work as intended, aforceparameter is offered as last-resort attempt to make filter lists fresh. If you ever find yourself usingforceto make something work that otherwise wont, this is a bug and report it accordingly.adguard-home-pp-cli filtering remove-url- Remove filter URLadguard-home-pp-cli filtering set-rules- Set user-defined filter rulesadguard-home-pp-cli filtering set-url- Set URL parametersadguard-home-pp-cli filtering status- Get filtering parameters
Application localization
adguard-home-pp-cli i18n change-language- Change current language. Argument must be an ISO 639-1 two-letter code.adguard-home-pp-cli i18n current-language- Get currently set language. Result is ISO 639-1 two-letter code. Empty result means default language.
First-time install configuration handlers
adguard-home-pp-cli install check-config- Checks configurationadguard-home-pp-cli install configure- Applies the initial configuration.adguard-home-pp-cli install get-addresses- Gets the network interfaces information.
Manage login
adguard-home-pp-cli login- Perform administrator log-in
Manage logout
adguard-home-pp-cli logout- Perform administrator log-out
Blocking adult and explicit materials
adguard-home-pp-cli parental disable- Disable parental filteringadguard-home-pp-cli parental enable- Enable parental filteringadguard-home-pp-cli parental status- Get parental filtering status
Manage protection
adguard-home-pp-cli protection- Set protection state and duration
Manage querylog
adguard-home-pp-cli querylog get-query-log-config- Get query log parametersadguard-home-pp-cli querylog put-query-log-config- Set query log parametersadguard-home-pp-cli querylog query-log- Get DNS server query log.
Manage querylog clear
adguard-home-pp-cli querylog-clear- Clear query log
Manage querylog config
adguard-home-pp-cli querylog-config- Deprecated: UsePUT /querylog/config/updateinstead.
Manage querylog info
adguard-home-pp-cli querylog-info- Deprecated: UseGET /querylog/configinstead.
NOTE: If interval was configured by editing configuration file or new
HTTP API call PUT /querylog/config/update and it's not equal to
previous allowed enum values then it will be equal to 90 days for
compatibility reasons.
DNS rewrites
adguard-home-pp-cli rewrite add- Add a new Rewrite ruleadguard-home-pp-cli rewrite delete- Remove a Rewrite ruleadguard-home-pp-cli rewrite list- Get list of Rewrite rulesadguard-home-pp-cli rewrite settings-get- Get rewrite settingsadguard-home-pp-cli rewrite settings-update- Update rewrite settingsadguard-home-pp-cli rewrite update- Update a Rewrite rule
Blocking malware/phishing sites
adguard-home-pp-cli safebrowsing disable- Disable safebrowsingadguard-home-pp-cli safebrowsing enable- Enable safebrowsingadguard-home-pp-cli safebrowsing status- Get safebrowsing status
Enforce family-friendly results in search engines
adguard-home-pp-cli safesearch disable- Disable safesearchadguard-home-pp-cli safesearch enable- Enable safesearchadguard-home-pp-cli safesearch settings- Update safesearch settingsadguard-home-pp-cli safesearch status- Get safesearch status
AdGuard Home statistics
adguard-home-pp-cli stats get-config- Get statistics parametersadguard-home-pp-cli stats put-config- Set statistics parametersadguard-home-pp-cli stats stats- Get DNS server statistics
Manage stats config
adguard-home-pp-cli stats-config- Deprecated: UsePUT /stats/config/updateinstead.
Manage stats info
adguard-home-pp-cli stats-info- Deprecated: UseGET /stats/configinstead.
NOTE: If interval was configured by editing configuration file or new
HTTP API call PUT /stats/config/update and it's not equal to
previous allowed enum values then it will be equal to 90 days for
compatibility reasons.
Manage stats reset
adguard-home-pp-cli stats-reset- Reset all statistics to zeroes
Manage status
adguard-home-pp-cli status- Get DNS server current status and general settings
Manage test upstream dns
adguard-home-pp-cli test-upstream-dns- Test upstream configuration
AdGuard Home HTTPS/DoH/DoQ/DoT settings
adguard-home-pp-cli tls configure- Updates current TLS configurationadguard-home-pp-cli tls status- Returns TLS configuration and its statusadguard-home-pp-cli tls validate- Checks if the current TLS configuration is valid
Manage update
adguard-home-pp-cli update- Begin auto-upgrade procedure
Manage version json
adguard-home-pp-cli version-json- Gets information about the latest available version of AdGuard
# Human-readable table (default in terminal, JSON when piped)
adguard-home-pp-cli access list
# JSON for scripting and agents
adguard-home-pp-cli access list --json
# Filter to specific fields
adguard-home-pp-cli access list --json --select id,name,status
# Dry run — show the request without sending
adguard-home-pp-cli access list --dry-run
# Agent mode — JSON + compact + no prompts in one flag
adguard-home-pp-cli access list --agentThis CLI is designed for AI agent consumption:
- Non-interactive - never prompts, every input is a flag
- Pipeable -
--jsonoutput to stdout, errors to stderr - Filterable -
--select id,namereturns only fields you need - Previewable -
--dry-runshows the request without sending - Explicit retries - add
--idempotentto create retries when a no-op success is acceptable - Confirmable -
--yesfor explicit confirmation of destructive actions - Piped input - write commands can accept structured input when their help lists
--stdin - Offline-friendly - sync/search commands can use the local SQLite store when available
- Agent-safe by default - no colors or formatting unless
--human-friendlyis set
Exit codes: 0 success, 2 usage error, 3 not found, 4 auth error, 5 API error, 7 rate limited, 10 config error.
adguard-home-pp-cli doctorVerifies configuration, credentials, and connectivity to the API.
Config file: ~/.config/adguard-home-pp-cli/config.toml
Static request headers can be configured under headers; per-command header overrides take precedence.
Environment variables:
| Name | Kind | Required | Description |
|---|---|---|---|
ADGUARD_HOME_USERNAME |
per_call | Yes | |
ADGUARD_HOME_PASSWORD |
per_call | Yes | Set to your API credential. |
Authentication errors (exit code 4)
- Run
adguard-home-pp-cli doctorto check credentials - Verify the environment variable is set:
echo $ADGUARD_HOME_USERNAMENot found errors (exit code 3) - Check the resource ID is correct
- Run the
listcommand to see available items
Generated by CLI Printing Press