https://github.com/qiujun8023/cfdns
A command line tool for managing Cloudflare DNS records
https://github.com/qiujun8023/cfdns
cloudflare cloudflare-cli cloudflare-dns
Last synced: about 2 months ago
JSON representation
A command line tool for managing Cloudflare DNS records
- Host: GitHub
- URL: https://github.com/qiujun8023/cfdns
- Owner: qiujun8023
- Created: 2019-05-27T03:39:17.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-10T12:50:55.000Z (about 4 years ago)
- Last Synced: 2025-09-23T02:24:06.369Z (9 months ago)
- Topics: cloudflare, cloudflare-cli, cloudflare-dns
- Language: TypeScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cfdns
A command line tool for managing Cloudflare DNS records
## Install
```shell
$ npm i -g cfdns-cli
```
## Usage
```
Usage: cfdns [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
login login Cloudflare with email and key
logout logout Cloudflare
list [domain] list all DNS records
add add a DNS record
modify [new_content] modify a DNS record
remove [content] remove a DNS record
help [cmd] display help for [cmd]
```
### Login
**Syntax:**
```shell
$ cfdns login
```
**Examples:**
```shell
$ cfdns login admin@example.com 8c9ec98e451df3a798029dd98abee27d
```
### Logout
**Syntax:**
```shell
$ cfdns logout
```
### List
**Syntax:**
```shell
$ cfdns list [domain]
```
**Examples:**
```shell
$ cfdns list
$ cfdns list example.com
```
### Add
**Syntax:**
```shell
$ cfdns add
```
**Arguments:**
* `--ttl` Special TTL value (default: 1)
* `--proxy` Enable Cloudflare's proxy
**Examples:**
```shell
$ 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:**
```shell
$ cfdns modify
```
**Arguments:**
* `--ttl` Special TTL value (default: 1)
* `--proxy` Enable Cloudflare's proxy
* `--old-content` Old DNS record content
**Examples:**
```shell
$ 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:**
```shell
$ cfdns remove [type] [content]
```
**Arguments:**
* `-f, --force` Force to delete multiple records
**Examples:**
```shell
$ 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
```