Commands Overview
NextDNS Blocker provides a comprehensive set of commands organized into logical groups.
Command Structure
Section titled “Command Structure”nextdns-blocker [OPTIONS] COMMAND [ARGS]Global Options
Section titled “Global Options”| Option | Description |
|---|---|
--version | Show version and exit |
--no-color | Disable colored output |
--help | Show help message |
Setup Commands
Section titled “Setup Commands”| Command | Description |
|---|---|
init | Initialize configuration with interactive wizard |
config validate | Validate configuration files before deployment |
completion | Generate shell completion script |
Main Commands
Section titled “Main Commands”| Command | Description |
|---|---|
config push | Synchronize domain states based on schedules |
status | Show current blocking status |
unblock | Request manual domain unblock |
update | Check for and install updates |
Diagnostic & Maintenance Commands
Section titled “Diagnostic & Maintenance Commands”| Command | Description |
|---|---|
health | Run system health checks |
fix | Auto-repair common issues |
stats | Show usage statistics |
test-notifications | Test Discord integration |
uninstall | Completely remove NextDNS Blocker |
Command Groups
Section titled “Command Groups”config
Section titled “config”Manage configuration files.
| Subcommand | Description |
|---|---|
config show | Display current configuration |
config edit | Open config in editor |
config validate | Validate configuration syntax |
config set | Set configuration values |
config push | Synchronize domain states based on schedules |
config diff | Show differences between local and remote |
config pull | Fetch domains from NextDNS to local config |
watchdog
Section titled “watchdog”Manage automatic synchronization.
| Subcommand | Description |
|---|---|
watchdog status | Check scheduler status |
watchdog install | Create scheduled sync jobs |
watchdog uninstall | Remove scheduled jobs |
watchdog enable | Re-enable after disable |
watchdog disable | Temporarily disable |
Emergency lockdown mode.
| Subcommand | Description |
|---|---|
panic MINUTES | Activate panic mode |
panic status | Check panic mode status |
panic extend | Extend panic duration |
pending
Section titled “pending”Manage pending unblock actions.
| Subcommand | Description |
|---|---|
pending list | List pending actions |
pending show | Show action details |
pending cancel | Cancel pending action |
category
Section titled “category”Manage domain categories.
| Subcommand | Description |
|---|---|
category list | List all categories |
category show | Show category details |
category create | Create new category |
category add | Add domain to category |
category remove | Remove domain from category |
category delete | Delete category |
nextdns
Section titled “nextdns”Manage NextDNS Parental Control.
| Subcommand | Description |
|---|---|
nextdns list | List configured items |
nextdns status | Show Parental Control status |
nextdns add-category | Activate category |
nextdns remove-category | Deactivate category |
nextdns add-service | Activate service |
nextdns remove-service | Deactivate service |
nextdns categories | Show valid category IDs |
nextdns services | Show valid service IDs |
denylist
Section titled “denylist”Manage NextDNS denylist (blocked domains).
| Subcommand | Description |
|---|---|
denylist list | List all denylist domains |
denylist add | Add domains to denylist |
denylist remove | Remove domains from denylist |
denylist export | Export to JSON or CSV |
denylist import | Import from file |
allowlist
Section titled “allowlist”Manage NextDNS allowlist (whitelisted domains).
| Subcommand | Description |
|---|---|
allowlist list | List all allowlist domains |
allowlist add | Add domains to allowlist |
allowlist remove | Remove domains from allowlist |
allowlist export | Export to JSON or CSV |
allowlist import | Import from file |
Legacy Allowlist Commands
Section titled “Legacy Allowlist Commands”| Command | Description |
|---|---|
allow | Add domain to allowlist |
disallow | Remove domain from allowlist |
protection
Section titled “protection”Manage addiction protection features.
| Subcommand | Description |
|---|---|
protection status | Show protection status and locked items |
protection unlock-request | Request to unlock a protected item |
protection cancel | Cancel a pending unlock request |
protection list | List pending unlock requests |
protection pin set | Set or change PIN |
protection pin status | Show PIN status |
protection pin verify | Verify PIN and start session |
protection pin remove | Remove PIN (with 24h delay) |
View usage statistics and patterns.
| Subcommand | Description |
|---|---|
stats | Show summary statistics |
stats domains | Show top blocked domains |
stats hours | Show hourly activity patterns |
stats actions | Show action breakdown |
stats export | Export to CSV |
Quick Reference
Section titled “Quick Reference”First Time Setup
Section titled “First Time Setup”# Initialize configurationnextdns-blocker init
# Install schedulernextdns-blocker watchdog install
# Verify setupnextdns-blocker statusDaily Usage
Section titled “Daily Usage”# Check what's blockednextdns-blocker status
# Emergency modenextdns-blocker panic 60Management
Section titled “Management”# Edit domainsnextdns-blocker config edit
# Force sync nownextdns-blocker config push
# Check watchdognextdns-blocker watchdog statusTroubleshooting
Section titled “Troubleshooting”# Validate confignextdns-blocker config validate
# Preview changesnextdns-blocker config push --dry-run
# Verbose outputnextdns-blocker config push -v
# Run health checksnextdns-blocker health
# Auto-fix common issuesnextdns-blocker fix
# View usage statisticsnextdns-blocker stats
# Test Discord notificationsnextdns-blocker test-notificationsShell Completion
Section titled “Shell Completion”# Basheval "$(nextdns-blocker completion bash)"
# Zsheval "$(nextdns-blocker completion zsh)"
# Fishnextdns-blocker completion fish > ~/.config/fish/completions/nextdns-blocker.fishExit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | API error |
| 4 | Validation error |
See Exit Codes Reference for complete details.