LinuxCommandLibrary

flarectl

Cloudflare management from the command line

TLDR

List DNS records

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

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.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community