Skip to main content

A CLI tool for managing NextDNS profiles

Project description

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 nextdnsctl
    

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nextdnsctl-0.2.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nextdnsctl-0.2.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file nextdnsctl-0.2.0.tar.gz.

File metadata

  • Download URL: nextdnsctl-0.2.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for nextdnsctl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ec7999b6c3fc04ad955637fbcab455e4845388f4a6f2a45cfd5496e0f6ff40bf
MD5 9cd34333827b13575af4d356201d65a2
BLAKE2b-256 9e7c1691987d1c9be4958cdaa40a4ff64bdb36a8b05607eb9964ef0174339e1b

See more details on using hashes here.

File details

Details for the file nextdnsctl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: nextdnsctl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for nextdnsctl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 254512fb1fbe24f744a573b49fa3260362f5eebf45f16d4d5dd05583fe12b672
MD5 e454f41e440c3d57193b245a85e737c5
BLAKE2b-256 fa58424be65792d128d0e56cf27df0fe7239e0b4254f0bba8f99611cd1c071af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page