Skip to content
Damir Mukimov edited this page Dec 15, 2025 · 9 revisions

Usage Guide

Table of Contents


Account Management

Command Reference

Command Description Example
account list List all configured accounts zonekit account list
account add [name] Add new account (interactive) zonekit account add work
account switch <name> Switch default account zonekit account switch work
account show [name] Show account details zonekit account show
account edit [name] Edit account (interactive) zonekit account edit work
account remove <name> Remove account zonekit account remove work

Examples

View account management examples
# List all accounts
zonekit account list
# Output:
#   default (current)
#   work
#   personal

# Add new account interactively
zonekit account add work
# Prompts for: username, API user, API key, client IP, sandbox mode, description

# Switch default account
zonekit account switch work
# Now 'work' is the default account

# Show current account details (API keys are masked)
zonekit account show
# Output:
#   Account: work
#   Username: workuser
#   API User: workapiuser
#   API Key: abcd***xyz
#   Client IP: 203.0.113.1
#   Sandbox: false

Domain Management

Command Reference

Command Description Example
domain list List all domains zonekit domain list
domain info <domain> Get domain details zonekit domain info example.com
domain check <domain> Check availability zonekit domain check example.com
domain renew <domain> [years] Renew domain zonekit domain renew example.com 1
domain nameservers get <domain> Get nameservers zonekit domain nameservers get example.com
domain nameservers set <domain> <ns1> [ns2]... Set nameservers zonekit domain nameservers set example.com ns1.example.com ns2.example.com
domain nameservers default <domain> Reset to default zonekit domain nameservers default example.com

Domain List Output

$ zonekit domain list

Domain                    Expires        Auto-Renew  Premium
────────────────────────────────────────────────────────────
example.com               2026-01-15   Yes         No
test.com                   2025-12-20   No          Yes
demo.org                   2026-03-10   Yes         No

DNS Record Management

Command Reference

Command Description Example
dns list <domain> List all DNS records zonekit dns list example.com
dns add <domain> <host> <type> <value> [ttl] Add DNS record zonekit dns add example.com www A 192.0.2.1
dns update <domain> <host> <type> <value> [ttl] Update DNS record zonekit dns update example.com www A 192.0.2.2
dns delete <domain> <host> <type> Delete DNS record zonekit dns delete example.com www A
dns clear <domain> Clear all records zonekit dns clear example.com
dns bulk <domain> <file> Bulk operations zonekit dns bulk example.com ops.yaml
dns import <domain> <file> Import zone file zonekit dns import example.com zone.txt
dns export <domain> [file] Export zone file zonekit dns export example.com

DNS Record Types

Type Description Example Value
A IPv4 address 192.0.2.1
AAAA IPv6 address 2001:db8::1
CNAME Canonical name www.example.com
MX Mail exchange mail.example.com (priority: 10)
TXT Text record "v=spf1 include:_spf.example.com ~all"
NS Name server ns1.example.com
SRV Service record _service._tcp.example.com

Tip: Use @ for root domain, not empty string. Example: zonekit dns add example.com @ A 192.0.2.1

Examples

Basic DNS Operations

Add an A Record
zonekit dns add example.com www A 192.0.2.1

# Output:
# Successfully added A record: www.example.com -> 192.0.2.1
Add an MX Record
zonekit dns add example.com @ MX mail.example.com 10

# Output:
# Successfully added MX record: @example.com -> mail.example.com (priority: 10)

Note: MX records require a priority number (lower = higher priority)

Add a CNAME Record
zonekit dns add example.com www CNAME example.com

# Output:
# Successfully added CNAME record: www.example.com -> example.com
Add a TXT Record (SPF)
zonekit dns add example.com @ TXT "v=spf1 include:_spf.example.com ~all"

# Output:
# Successfully added TXT record: @example.com -> "v=spf1 include:_spf.example.com ~all"

Filtering Records

# List only A records
zonekit dns list example.com | grep "A "

# List only MX records
zonekit dns list example.com | grep "MX "

# List records for specific host
zonekit dns list example.com | grep "www"

Using Specific Accounts

Switch Account Permanently

zonekit account switch work
zonekit domain list  # Uses 'work' account

Use Account for Single Command

zonekit --account work domain list
zonekit --account personal dns list example.com

Plugins

List Available Plugins

zonekit plugin list

Plugin Information

zonekit plugin info <plugin-name>

Using Plugins

# Migadu email hosting setup
zonekit migadu setup example.com

# Verify Migadu setup
zonekit migadu verify example.com

# Remove Migadu records
zonekit migadu remove example.com

Bulk Operations

Bulk DNS Updates

Create a file with operations:

operations:
  - action: add
    host: www
    type: A
    value: 192.0.2.1
    ttl: 3600
  - action: update
    host: mail
    type: A
    value: 192.0.2.2
    ttl: 3600
  - action: delete
    host: old
    type: A

Run:

zonekit dns bulk example.com operations.yaml

Dry Run Mode

Some commands support --dry-run to preview changes:

zonekit migadu setup example.com --dry-run

Getting Help

# General help
zonekit help

# Command-specific help
zonekit account --help
zonekit domain --help
zonekit dns --help
zonekit plugin --help

Common Workflows

Setting Up a New Domain

# 1. Check domain
zonekit domain check newdomain.com

# 2. List current DNS records
zonekit dns list newdomain.com

# 3. Add required records
zonekit dns add newdomain.com @ A 192.0.2.1
zonekit dns add newdomain.com www CNAME newdomain.com

# 4. Verify setup
zonekit dns list newdomain.com

Migrating Email Hosting (Migadu)

# 1. Setup Migadu DNS records
zonekit migadu setup example.com --dry-run

# 2. Review changes, then apply
zonekit migadu setup example.com

# 3. Verify setup
zonekit migadu verify example.com

Managing Multiple Accounts

# 1. Add accounts
zonekit account add personal
zonekit account add work

# 2. List domains from different accounts
zonekit --account personal domain list
zonekit --account work domain list

# 3. Switch default account
zonekit account switch work

Clone this wiki locally