A command line tool for managing Cloudflare DNS records
$ npm i -g cfdns-cli
Usage: cfdns [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
login <email> <key> login Cloudflare with email and key
logout logout Cloudflare
list [domain] list all DNS records
add <name> <type> <content> add a DNS record
modify <name> [new_content] modify a DNS record
remove <name> [content] remove a DNS record
help [cmd] display help for [cmd]
Syntax:
$ cfdns login <email> <key>
Examples:
$ cfdns login admin@example.com 8c9ec98e451df3a798029dd98abee27d
Syntax:
$ cfdns logout
Syntax:
$ cfdns list [domain]
Examples:
$ cfdns list
$ cfdns list example.com
Syntax:
$ cfdns add <name> <type> <content>
Arguments:
--ttl
Special TTL value (default: 1)--proxy
Enable Cloudflare's proxy
Examples:
$ cfdns add www.example.com A 8.8.8.8
$ cfdns add www.example.com A 8.8.8.8 --ttl 120
$ cfdns add www.example.com A 8.8.8.8 --ttl 120 --proxy
Syntax:
$ cfdns modify <name> <type> <new-content>
Arguments:
--ttl
Special TTL value (default: 1)--proxy
Enable Cloudflare's proxy--old-content
Old DNS record content
Examples:
$ cfdns modify www.example.com A 8.8.4.4
$ cfdns modify www.example.com A 8.8.4.4 --ttl 360
$ cfdns modify www.example.com A 8.8.4.4 --proxy
$ cfdns modify www.example.com A 8.8.4.4 --old-content 8.8.8.8
Syntax:
$ cfdns remove <name> [type] [content]
Arguments:
-f, --force
Force to delete multiple records
Examples:
$ cfdns remove www.example.com
$ cfdns remove www.example.com A
$ cfdns remove www.example.com A 8.8.4.4
$ cfdns remove www.example.com A 8.8.4.4 --force