Metadata-Version: 2.4
Name: nextdnsctl
Version: 0.2.0
Summary: A CLI tool for managing NextDNS profiles
Home-page: https://github.com/danielmeint/nextdnsctl
Author: Daniel Meint
Author-email: pilots-4-trilogy@icloud.com
License: MIT
Keywords: nextdns,cli,dns,security,networking
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: click
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# nextdnsctl

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://github.com/danielmeint/nextdnsctl/actions/workflows/lint.yml/badge.svg)](https://github.com/danielmeint/nextdnsctl/actions/workflows/lint.yml)

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:
   ```bash
   pip install nextdnsctl
   ```

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

### Denylist Management
3. Add domains to denylist:
   ```bash
   nextdnsctl denylist add <profile_id> bad.com evil.com
   ```
4. Remove domains from denylist:
   ```bash
   nextdnsctl denylist remove <profile_id> bad.com
   ```
5. Import domains from a file or URL:
   - From a file:
     ```bash
     nextdnsctl denylist import <profile_id> /path/to/blocklist.txt
     ```
   - From a URL:
     ```bash
     nextdnsctl denylist import <profile_id> https://example.com/blocklist.txt
     ```
   - Use `--inactive` to add domains as inactive (not blocked):
     ```bash
     nextdnsctl denylist import <profile_id> blocklist.txt --inactive
     ```

### Allowlist Management
6. Add domains to allowlist:
   ```bash
   nextdnsctl allowlist add <profile_id> good.com trusted.com
   ```
7. Remove domains from allowlist:
   ```bash
   nextdnsctl allowlist remove <profile_id> good.com
   ```
8. Import domains from a file or URL:
   - From a file:
     ```bash
     nextdnsctl allowlist import <profile_id> /path/to/allowlist.txt
     ```
   - From a URL:
     ```bash
     nextdnsctl allowlist import <profile_id> https://example.com/allowlist.txt
     ```
   - Use `--inactive` to add domains as inactive (not allowed):
     ```bash
     nextdnsctl allowlist import <profile_id> allowlist.txt --inactive
     ```

## Contributing
Pull requests welcome! See [docs/contributing.md](docs/contributing.md) for details.

## License
MIT License - see [LICENSE](LICENSE).
