跳到正文
Skillpedia
部署与云(DevOps)58k · #3181

cli-anything-adguardhome

它能做什么

这个技能让智能体管理 AdGuard Home,这是一款在家庭或办公网络中拦截广告并管理 DNS 的软件。适合运行 AdGuard Home、并希望通过命令行管理它的人。

适用场景

  • ✓当你想检查 AdGuard Home 是否在你的网络中运行的时候。
  • ✓当你想修改过滤规则或添加 DNS 重写的时候。
  • ✓当你想查看某台设备最近的 DNS 查询日志的时候。

技能链接

https://github.com/HKUDS/CLI-Anything/blob/main/adguardhome/agent-harness/cli_anything/adguardhome/skills/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/HKUDS/CLI-Anything/blob/main/adguardhome/agent-harness/cli_anything/adguardhome/skills/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查 AdGuard Home 是否正在运行,然后显示最近十条被拦截的查询。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能通过 REST API 向 AdGuard Home 发送命令。它可以显示状态、修改设置并读取日志,并以智能体易于读取的形式返回输出。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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.

Command Description
show Show current connection configuration
save Save connection settings to a config file
test Test the connection to AdGuard Home

Server

Server status and control commands.

Command Description
status Show server protection status
version Show AdGuard Home version
restart Restart the AdGuard Home server

Filter

DNS filter list management.

Command Description
list List all configured filter lists
status Show filtering status
toggle Enable or disable filtering globally
add Add a new filter list by URL
remove Remove a filter list
enable Enable a specific filter list
disable Disable a specific filter list
refresh Force-refresh all filter lists

Blocking

Parental control, safe browsing, and safe search settings.

Command Description
parental status Show parental control status
parental enable Enable parental control
parental disable Disable parental control
safebrowsing status Show safe browsing status
safebrowsing enable Enable safe browsing
safebrowsing disable Disable safe browsing
safesearch status Show safe search status
safesearch enable Enable safe search
safesearch disable Disable safe search

Blocked-Services

Manage blocked internet services.

Command Description
list List currently blocked services
set Set the list of blocked services

Clients

Client device management.

Command Description
list List all configured clients
add Add a new client by name and IP
remove Remove a client
show Show details for a specific client

Stats

Query statistics.

Command Description
show Show DNS query statistics
reset Reset all statistics
config View or update statistics retention interval

Log

DNS query log management.

Command Description
show Show recent DNS query log entries
config View or update query log settings
clear Clear the query log

Rewrite

DNS rewrite rules.

Command Description
list List all DNS rewrite rules
add Add a DNS rewrite rule
remove Remove a DNS rewrite rule

DHCP

DHCP server management.

Command Description
status Show DHCP server status
leases List active DHCP leases
add-static Add a static DHCP lease
remove-static Remove a static DHCP lease

TLS

TLS/HTTPS configuration.

Command Description
status Show 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 ref
常见问题

我需要安装 AdGuard Home 吗?

需要。AdGuard Home 必须已经在你的网络中安装并运行。

它能修改我的过滤设置吗?

可以。它可以通过 AdGuard Home API 管理过滤、DNS 重写和客户端。

它也涵盖 DHCP 吗?

涵盖。该技能除了过滤和查询日志,还包括 DHCP 设置。

详情

作者的原始描述

Command-line interface for AdGuard Home - Network-wide ad blocking and DNS management via 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.

repo: HKUDS/CLI-Anything

热度

GitHub 星标
58k
排名
#3181
许可证
Apache-2.0
更新时间
2026/9/21

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能