48 lines
1.2 KiB
Markdown
48 lines
1.2 KiB
Markdown
CLI tool to manage cloudflare DNS records
|
||
|
||
## Installation
|
||
|
||
```bash
|
||
❯ go install go.balki.me/cloudflare-dns-cli@latest
|
||
```
|
||
|
||
## Features
|
||
|
||
1. Add/Modify `A`, `AAAA`, `CNAME` records
|
||
2. List/Delete records
|
||
3. Save all records in JSON format
|
||
|
||
## Usage
|
||
|
||
```help
|
||
Usage of cloudflare-dns-cli:
|
||
-a string
|
||
Cloudflare API Token. env var: CF_TOKEN
|
||
-c string
|
||
CNAME target
|
||
-d string
|
||
Domain name, e.g. example.com. env var: DOMAIN
|
||
-i value
|
||
IP address (default 127.0.0.1)
|
||
-o string
|
||
Path to save all records as json, e.g. ./records.json
|
||
-s string
|
||
Subdomain, e.g. blog. Use @ for root (default "<UNSET>")
|
||
-x Delete records of subdomain
|
||
```
|
||
|
||
## Demo
|
||
|
||
===> [HERE](./demo.cast) <===
|
||
|
||
## Similar
|
||
* https://github.com/earlchew/cloudflare-cli
|
||
* https://github.com/tech-otaku/cloudflare-dns
|
||
* (official) https://github.com/cloudflare/python-cloudflare#cli
|
||
|
||
## Why another cli?
|
||
1. Keep it simple with minimum dependency and features
|
||
2. Uses [libdns](https://github.com/libdns) library maintained by [caddy](https://caddyserver.com) team
|
||
libdns provides uniform api for many dns providers. Mostly `s/cloudflare/XYZ/` should work when moving to a different dns provider
|
||
|