1- [ ![ Sponsor] ( https://img.shields.io/badge/Sponsor-%E2%9D%A4-pink?logo=github )] ( https://github.com/sponsors/hyperpolymath )
2-
3- // SPDX-License-Identifier: CC-BY-SA-4.0
4-
5- = CloudGuard CLI
6- :toc: macro
7- :toc-title: Contents
8- :toclevels: 2
1+ <!--
2+ SPDX-License-Identifier: CC-BY-SA-4.0
3+ SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+ -->
95
106Standalone command-line tool for Cloudflare domain security management.
11- Audit compliance, apply hardening, manage DNS records, sync offline configs,
12- and manage Cloudflare Pages projects — all from the terminal.
7+ Audit compliance, apply hardening, manage DNS records, sync offline
8+ configs, and manage Cloudflare Pages projects — all from the terminal.
9+
10+ <div id =" toc " >
1311
14- toc:: [ ]
12+ </ div >
1513
16- == Overview
14+ # Overview
1715
1816CloudGuard CLI automates the tedious, error-prone process of hardening
19- Cloudflare domains. Instead of manually toggling dozens of settings across
20- dozens of domains, run a single command to audit or harden everything.
17+ Cloudflare domains. Instead of manually toggling dozens of settings
18+ across dozens of domains, run a single command to audit or harden
19+ everything.
2120
2221Companion projects:
2322
24- * ** cloudguard-server** — REST + WebSocket API for dashboards and CI/CD
25- * ** PanLL CloudGuard module** — GUI panel with three-panel compliance view
23+ - ** cloudguard-server** — REST + WebSocket API for dashboards and CI/CD
2624
27- == Installation
25+ - ** PanLL CloudGuard module** — GUI panel with three-panel compliance
26+ view
2827
29- === From source
28+ # Installation
3029
31- [ source,bash]
32- ----
30+ ## From source
31+
32+ ``` bash
3333git clone https://github.com/hyperpolymath/cloudguard-cli
3434cd cloudguard-cli
3535cargo build --release
3636# Binary at target/release/cloudguard-cli
37- ----
37+ ```
3838
39- === Environment
39+ ## Environment
4040
4141Set your Cloudflare API token:
4242
43- [ source,bash]
44- ----
43+ ``` bash
4544export CLOUDFLARE_API_TOKEN=" your-token-here"
46- ----
45+ ```
4746
48- == Usage
47+ # Usage
4948
50- === Audit domains against security policy
49+ ## Audit domains against security policy
5150
52- [ source,bash]
53- ----
51+ ``` bash
5452# Audit all domains
5553cloudguard-cli audit
5654
@@ -59,12 +57,11 @@ cloudguard-cli audit --domain example.com
5957
6058# Output JSON report
6159cloudguard-cli audit --output report.json
62- ----
60+ ```
6361
64- === Apply hardening settings
62+ ## Apply hardening settings
6563
66- [ source,bash]
67- ----
64+ ``` bash
6865# Harden all domains (dry run)
6966cloudguard-cli harden --dry-run
7067
@@ -73,12 +70,11 @@ cloudguard-cli harden --domain example.com --apply
7370
7471# Harden all domains
7572cloudguard-cli harden --apply
76- ----
73+ ```
7774
78- === DNS management
75+ ## DNS management
7976
80- [ source,bash]
81- ----
77+ ``` bash
8278# List DNS records
8379cloudguard-cli dns list --domain example.com
8480
@@ -90,68 +86,48 @@ cloudguard-cli dns bulk-add --domain example.com
9086
9187# Delete a record
9288cloudguard-cli dns delete --domain example.com --record-id abc123
93- ----
89+ ```
9490
95- === Offline config sync
91+ ## Offline config sync
9692
97- [ source,bash]
98- ----
93+ ``` bash
9994# Download configs locally
10095cloudguard-cli sync download --dir ./configs
10196
10297# Upload local changes (dry run)
10398cloudguard-cli sync upload ./configs --dry-run
104- ----
99+ ```
105100
106- === Zone management
101+ ## Zone management
107102
108- [ source,bash]
109- ----
103+ ``` bash
110104# List all zones
111105cloudguard-cli zones list
112106
113107# Check zone status
114108cloudguard-cli zones status --domain example.com
115- ----
109+ ```
116110
117- === Pages projects
111+ ## Pages projects
118112
119- [ source,bash]
120- ----
113+ ``` bash
121114# List Pages projects
122115cloudguard-cli pages list
123- ----
116+ ```
124117
125- == Hardening Policy
118+ # Hardening Policy
126119
127120CloudGuard applies 16 security settings across these categories:
128121
129- [ cols="1,2,1"]
130- |===
131- | Category | Settings | Severity
132-
133- | SSL/TLS
134- | Full strict mode, TLS 1.2 minimum, always HTTPS, auto rewrites, opportunistic encryption, TLS 1.3
135- | CRITICAL–LOW
136-
137- | Security Headers
138- | HSTS with preload, subdomains, nosniff
139- | HIGH
140-
141- | WAF & Bot Defense
142- | Browser check, hotlink protection, email obfuscation, security level
143- | MEDIUM–LOW
144-
145- | Performance
146- | Brotli, early hints, HTTP/3
147- | LOW
148-
149- | Network
150- | WebSockets, opportunistic onion
151- | LOW
152- |===
122+ | Category | Settings | Severity |
123+ | ----| ----| ----|
124+ | SSL/TLS | Full strict mode, TLS 1.2 minimum, always HTTPS, auto rewrites, opportunistic encryption, TLS 1.3 | CRITICAL–LOW |
125+ | Security Headers | HSTS with preload, subdomains, nosniff | HIGH |
126+ | WAF & Bot Defense | Browser check, hotlink protection, email obfuscation, security level | MEDIUM–LOW |
127+ | Performance | Brotli, early hints, HTTP/3 | LOW |
128+ | Network | WebSockets, opportunistic onion | LOW |
153129
154- == License
130+ # License
155131
156132MPL-2.0
157133
0 commit comments