New to Claude Skills? Learn how to install them →

Ahkuds on GitHub

AdGuard Home CLI

Free

Manage AdGuard Home from the command line.

by hkuds46.9k stars on hkuds/cli-anything
4 views
Updated Aug 3, 2026
Get this skill

Free · Opens the source repo

What AdGuard Home CLI does

The AdGuard Home CLI provides a command-line interface for managing network-wide ad blocking and DNS settings via the AdGuard Home REST API. This tool is particularly useful for power users and developers who prefer to operate without a graphical user interface. It allows for comprehensive management of filtering rules, DNS rewrites, client configurations, DHCP settings, and query logs, all from the terminal.

With this CLI, users can execute a variety of commands to check server status, manage filter lists, and configure parental controls. The interactive REPL mode enhances usability by providing command history and tab completion, making it easier to navigate through commands. Additionally, the tool supports dual output formats, allowing users to choose between human-readable and machine-readable JSON outputs, which is ideal for integration with AI agents or other automated systems.

Installation is straightforward, requiring Python 3.10 or higher and a running instance of AdGuard Home. Once set up, users can leverage commands to manage their DNS filtering, view statistics, and control DHCP settings efficiently. This skill is designed for those who need to perform these tasks programmatically or through scripts, making it a valuable addition for anyone looking to automate their network management tasks.

When to use it

Use this CLI when you need to manage AdGuard Home settings quickly and efficiently from the command line, especially in environments where a GUI is impractical.

When not to use it

This tool is not suitable for users who prefer graphical interfaces or are unfamiliar with command-line operations.

What you can build with it

Check Server Status

Quickly verify the operational status of your AdGuard Home server with a simple command.

Manage Filter Lists

Easily add, remove, or refresh DNS filter lists to optimize your ad blocking.

Client Management

Add or remove client devices from the network with straightforward commands.

How to install AdGuard Home CLI

View source

1. Install with the skills CLI

npx skills add hkuds/cli-anything/skills --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by hkuds

cli-anything-adguardhome

Network-wide ad blocking and DNS management via the AdGuard Home REST API. Designed for AI agents and power users who need to manage filtering, DNS rewrites, clients, DHCP, and query logs without a GUI.

Installation

This CLI is installed as part of the cli-anything-adguardhome package:

pip install cli-anything-adguardhome

Prerequisites:

  • Python 3.10+
  • AdGuard Home must be installed and running
  • Install AdGuard Home: curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v

Usage

Basic Commands

# Show help
cli-anything-adguardhome --help

# Start interactive REPL mode
cli-anything-adguardhome

# Check server status
cli-anything-adguardhome server status

# Run with JSON output (for agent consumption)
cli-anything-adguardhome --json server status

REPL Mode

When invoked without a subcommand, the CLI enters an interactive REPL session:

cli-anything-adguardhome
# Enter commands interactively with tab-completion and history

Command Groups

Config

Connection and configuration management.

CommandDescription
showShow current connection configuration
saveSave connection settings to a config file
testTest the connection to AdGuard Home

Server

Server status and control commands.

CommandDescription
statusShow server protection status
versionShow AdGuard Home version
restartRestart the AdGuard Home server

Filter

DNS filter list management.

CommandDescription
listList all configured filter lists
statusShow filtering status
toggleEnable or disable filtering globally
addAdd a new filter list by URL
removeRemove a filter list
enableEnable a specific filter list
disableDisable a specific filter list
refreshForce-refresh all filter lists

Blocking

Parental control, safe browsing, and safe search settings.

CommandDescription
parental statusShow parental control status
parental enableEnable parental control
parental disableDisable parental control
safebrowsing statusShow safe browsing status
safebrowsing enableEnable safe browsing
safebrowsing disableDisable safe browsing
safesearch statusShow safe search status
safesearch enableEnable safe search
safesearch disableDisable safe search

Blocked-Services

Manage blocked internet services.

CommandDescription
listList currently blocked services
setSet the list of blocked services

Clients

Client device management.

CommandDescription
listList all configured clients
addAdd a new client by name and IP
removeRemove a client
showShow details for a specific client

Stats

Query statistics.

CommandDescription
showShow DNS query statistics
resetReset all statistics
configView or update statistics retention interval

Log

DNS query log management.

CommandDescription
showShow recent DNS query log entries
configView or update query log settings
clearClear the query log

Rewrite

DNS rewrite rules.

CommandDescription
listList all DNS rewrite rules
addAdd a DNS rewrite rule
removeRemove a DNS rewrite rule

DHCP

DHCP server management.

CommandDescription
statusShow DHCP server status
leasesList active DHCP leases
add-staticAdd a static DHCP lease
remove-staticRemove a static DHCP lease

TLS

TLS/HTTPS configuration.

CommandDescription
statusShow TLS configuration status

Examples

Check Server Status

cli-anything-adguardhome server status
cli-anything-adguardhome server version

Manage Filter Lists

# List current filters
cli-anything-adguardhome filter list

# Add a new blocklist
cli-anything-adguardhome filter add --url https://somehost.com/list.txt --name "My List"

# Refresh all filters
cli-anything-adguardhome filter refresh

DNS Rewrites

# Add a local DNS entry
cli-anything-adguardhome rewrite add --domain "myserver.local" --answer "192.168.1.50"

# List all rewrites
cli-anything-adguardhome rewrite list

Client Management

cli-anything-adguardhome clients add --name "My PC" --ip 192.168.1.100
cli-anything-adguardhome clients list

Query Statistics

# Show stats (human-readable)
cli-anything-adguardhome stats show

# Show stats (JSON for agents)
cli-anything-adguardhome --json stats show

Output Formats

All commands support dual output modes:

  • Human-readable (default): Tables, colors, formatted text
  • Machine-readable (--json flag): Structured JSON for agent consumption
# Human output
cli-anything-adguardhome filter list

# JSON output for agents
cli-anything-adguardhome --json filter list

For AI Agents

When using this CLI programmatically:

  1. Always use --json flag for parseable output
  2. Check return codes - 0 for success, non-zero for errors
  3. Parse stderr for error messages on failure
  4. Use absolute paths for all file operations
  5. Test connection first with config test before other commands

More Information

  • Full documentation: See README.md in the package
  • Test coverage: See TEST.md in the package
  • Methodology: See HARNESS.md in the cli-anything-plugin

Version

1.0.0

Frequently asked questions about AdGuard Home CLI

Similar skills