1.0.3 • Published 4 years ago

cfdns-cli v1.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

cfdns

A command line tool for managing Cloudflare DNS records

Install

$ npm i -g cfdns-cli

Usage

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]

Login

Syntax:

$ cfdns login <email> <key>

Examples:

$ cfdns login admin@example.com 8c9ec98e451df3a798029dd98abee27d

Logout

Syntax:

$ cfdns logout

List

Syntax:

$ cfdns list [domain]

Examples:

$ cfdns list
$ cfdns list example.com

Add

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

Modify

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

Remove

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