# cfdns-cli

> A command line tool for managing Cloudflare DNS records

Latest version **1.0.3** (published 2020-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install cfdns-cli
pnpm add cfdns-cli
yarn add cfdns-cli
bun add cfdns-cli
```

Provides the command `cfdns`.

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2020-06-01 |
| First published | 2019-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 42.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | qiujun |
| Maintainers | qiujun |

## Links

- npm: https://www.npmjs.com/package/cfdns-cli
- Repository: https://github.com/qiujun8023/cfdns
- Homepage: https://github.com/qiujun8023/cfdns#readme
- Issues: https://github.com/qiujun8023/cfdns/issues
- npm.io page: https://npm.io/package/cfdns-cli

## Dependencies (6)

- [ms](https://npm.io/package/ms.md) ^2.1.1
- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [lodash](https://npm.io/package/lodash.md) ^4.17.11
- [cli-table](https://npm.io/package/cli-table.md) ^0.3.1
- [commander](https://npm.io/package/commander.md) ^2.20.3
- [cloudflare](https://npm.io/package/cloudflare.md) ^2.7.0

## Recent versions

- 1.0.3 (latest) — 2020-06-01
- 1.0.2 — 2019-09-12
- 1.0.1 — 2019-06-03
- 1.0.0 — 2019-05-28

## 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 <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:**

```shell
$ cfdns login <email> <key>
```

**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 <name> <type> <content>
```

**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 <name> <type> <new-content>
```

**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 <name> [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
```

---
_Source: https://npm.io/package/cfdns-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
