Skip to content

A community-driven CLI tool for managing NextDNS profiles declaratively.

License

Notifications You must be signed in to change notification settings

danielmeint/nextdnsctl

Repository files navigation

nextdnsctl

License: MIT Build Status

A community-driven CLI tool for managing NextDNS profiles declaratively.

Disclaimer: This is an unofficial tool, not affiliated with NextDNS. Built by a user, for users.

Features

  • Bulk add/remove domains to the NextDNS denylist and allowlist.
  • Import domains from a file or URL to the denylist and allowlist.
  • List all profiles to find their IDs.
  • More to come: full config sync, etc.

Installation

  1. Install Python 3.6+.
  2. Clone or install:
    pip install git+https://github.com/danielmeint/nextdnsctl.git

Usage

  1. Set up your API key (find it at https://my.nextdns.io/account):
    nextdnsctl auth <your-api-key>
  2. List profiles:
    nextdnsctl profile-list

Denylist Management

  1. Add domains to denylist:
    nextdnsctl denylist add <profile_id> bad.com evil.com
  2. Remove domains from denylist:
    nextdnsctl denylist remove <profile_id> bad.com
  3. Import domains from a file or URL:
    • From a file:
      nextdnsctl denylist import <profile_id> /path/to/blocklist.txt
    • From a URL:
      nextdnsctl denylist import <profile_id> https://example.com/blocklist.txt
    • Use --inactive to add domains as inactive (not blocked):
      nextdnsctl denylist import <profile_id> blocklist.txt --inactive

Allowlist Management

  1. Add domains to allowlist:
    nextdnsctl allowlist add <profile_id> good.com trusted.com
  2. Remove domains from allowlist:
    nextdnsctl allowlist remove <profile_id> good.com
  3. Import domains from a file or URL:
    • From a file:
      nextdnsctl allowlist import <profile_id> /path/to/allowlist.txt
    • From a URL:
      nextdnsctl allowlist import <profile_id> https://example.com/allowlist.txt
    • Use --inactive to add domains as inactive (not allowed):
      nextdnsctl allowlist import <profile_id> allowlist.txt --inactive

Contributing

Pull requests welcome! See docs/contributing.md for details.

License

MIT License - see LICENSE.

About

A community-driven CLI tool for managing NextDNS profiles declaratively.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages