flarectl

Cloudflare management from the command line

TLDR

List DNS records
$ flarectl dns list --zone [example.com]
Create DNS record
$ flarectl dns create --zone [example.com] --name [www] --type [A] --content [1.2.3.4]
Delete DNS record
$ flarectl dns delete --zone [example.com] --id [record_id]
List zones
$ flarectl zone list
Purge cache
$ flarectl zone purge --zone [example.com] --everything
List firewall rules
$ flarectl firewall rules list --zone [example.com]

SYNOPSIS

flarectl command subcommand [options]

DESCRIPTION

Flarectl is the official command-line interface for managing Cloudflare services. It provides programmatic access to Cloudflare's API, enabling automation of DNS management, zone configuration, firewall rules, and CDN settings without using the web dashboard.The tool supports common operations including creating and modifying DNS records, managing zone settings like caching and security features, configuring firewall rules and access controls, and retrieving analytics data. Authentication uses API tokens or legacy API keys stored in environment variables or configuration files.Flarectl is particularly useful for infrastructure-as-code workflows, CI/CD pipelines, and bulk operations across multiple domains. It outputs results in human-readable format by default, with JSON output available for scripting and automation.

PARAMETERS

--zone zone

Zone name.
--name name
Record name.
--type type
Record type.
--content content
Record content.

SUBCOMMANDS

zone

Manage zones.
dns
Manage DNS records.
firewall
Manage firewall rules.
user
User information.

INSTALL

sudo apk add flarectl
brew install flarectl
nix profile install nixpkgs#flarectl

SEE ALSO

cloudflared(1)

RESOURCES

Source code