Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

flares

> 编程语言
Open source

Flares is a CloudFlare DNS backup tool

194 stars0 likes1 views
WebsiteGitHub

About

Flares is a CloudFlare DNS backup tool

Flares

Cloudflare DNS backup tool — exports DNS records as BIND-formatted zone files to stdout or disk.

Quick Start

bash
export CLOUDFLARE_API_TOKEN="KClp4y8BgD2LQiz2..."

# Show DNS records for a domain
flares show example.com

# Export as BIND zone file
flares export example.com

# All zones at once
flares show --all
flares export --all

# List zones
flares zones

Get your token at https://dash.cloudflare.com/profile/api-tokens (Create Token → Zone.DNS → Read → All zones).

Install

One-liner

bash
curl -sfL https://raw.githubusercontent.com/lfaoro/flares/main/install.sh | sh

Install a specific version to a custom path:

bash
curl -sfL https://raw.githubusercontent.com/lfaoro/flares/main/install.sh | sh -s -- -b /usr/local/bin v4.0.1

Package Managers

Platform Command
macOS / Linux brew install lfaoro/tap/flares
Arch Linux yay -S flares-bin (AUR)
Nix nix profile install github:lfaoro/tap#flares
Go go install github.com/lfaoro/flares/cmd/flares@latest

Pre-built Binaries

Download the latest archive for your platform from the releases page, then:

bash
tar xzf flares_*.tar.gz
sudo mv flares /usr/local/bin/

Docker

bash
docker pull ghcr.io/lfaoro/flares
docker run --rm -e CLOUDFLARE_API_TOKEN="$CLOUDFLARE_API_TOKEN" \
  ghcr.io/lfaoro/flares show example.com

Usage

flares [--token TOKEN] [--debug]  [flags] [...]

Commands:
  show      Print DNS records
    --all, -a             All zones
    --output, -o FORMAT   Output format: text (default) or json

  export    Write BIND zone files
    --all, -a             All zones

  zones     List all zone IDs and names

Global flags:
  --token, -t   Cloudflare API token  [$CLOUDFLARE_API_TOKEN, $CF_API_TOKEN]
  --debug, -d   Enable debug output   [$FLARES_DEBUG]
  --threads, -c Max concurrent API requests for --all (default: 10) [$FLARES_THREADS]

JSON Output

bash
flares show --output json example.com

Returns {"example.com": "; Domain: example.com\n...BIND records..."} — useful for scripting.

Using --all

bash
# Dump all zones to stdout
flares show --all

# Export every zone to its own file in the current directory
flares export --all

Concurrent exports are throttled to 10 simultaneous requests to avoid Cloudflare rate limits.

Token

Create a token at https://dash.cloudflare.com/profile/api-tokens with:

  • Permissions: Zone → DNS → Read
  • Zone Resources: Include → All zones

Verify your token:

bash
curl -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
  https://api.cloudflare.com/client/v4/user/tokens/verify

Development

bash
nix-shell                 # Go 1.26, golangci-lint, goreleaser, gofumpt
make build               # Build binary
make test                # Run all tests
make lint                # golangci-lint (30+ linters)
make reltest             # Dry-run goreleaser snapshot

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Gobackupcloudflarednsexport

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言