cloudflarefetchcli
v1.0.0
Published
π A beautiful read-only CLI for exploring and auditing Cloudflare infrastructure. Safe, secure, zero-risk insights for your domains, DNS, Workers, and more.
Maintainers
Readme
π cloudflarefetchcli
Read-Only. Beautiful. Insightful.
Explore your Cloudflare infrastructure with zero risk. No changes, no deletions, just pure visibility.
β¨ Why cloudflarefetchcli?
100% Read-Only Operations β Zero risk to your infrastructure. Perfect for:
- π Auditing your Cloudflare setup
- π Monitoring traffic and security
- π Exploring DNS configurations
- π Documenting your infrastructure
- π‘οΈ Security reviews without touching anything
Beautiful Terminal Output β Because CLI tools should be gorgeous:
- π¨ Color-coded status indicators
- π Formatted tables with borders
- π Visual analytics and insights
- β Clear success/error messaging
π Installation
npm install -g cloudflarefetchcliπ Quick Setup
1. Get Your Cloudflare API Token
- Visit Cloudflare API Tokens
- Click "Create Token"
- Use the "Read all resources" template
- Copy your token
2. Configure cloudflarefetchcli
# Save your API token (read-only recommended)
cloudflarefetchcli set-token YOUR_API_TOKEN
# Save your Account ID (optional, for Workers/Pages/Tunnels)
cloudflarefetchcli set-account YOUR_ACCOUNT_ID
# Verify configuration
cloudflarefetchcli configπ‘ Security Tip: Create a token with read-only permissions for maximum safety. The CLI never modifies anything.
π Commands
π Domain Exploration
# List all your domains with status and plan
cloudflarefetchcli domains
# Get comprehensive domain details
cloudflarefetchcli info example.com
# Check domain availability (WHOIS lookup)
cloudflarefetchcli check google.comπ DNS Inspection
# View all DNS records beautifully formatted
cloudflarefetchcli dns example.com
# Export DNS records as JSON
cloudflarefetchcli dns example.com --rawπ Analytics & Insights
# View domain analytics (requires Pro plan)
cloudflarefetchcli analytics example.com
# See traffic by country
cloudflarefetchcli countries example.com --days 7π‘οΈ Security Audit
# Review firewall rules
cloudflarefetchcli firewall example.com
# Check SSL/TLS configuration
cloudflarefetchcli ssl example.com
# View page rules
cloudflarefetchcli pagerules example.comβ‘ Cloudflare Platform
# List Workers scripts
cloudflarefetchcli workers
# View KV namespaces
cloudflarefetchcli kv
# List D1 databases
cloudflarefetchcli d1
# View R2 buckets
cloudflarefetchcli r2
# List Cloudflare Tunnels
cloudflarefetchcli tunnels
# View Pages projects
cloudflarefetchcli pages
# Check registered domains
cloudflarefetchcli registeredποΈ Cache Inspection
# View cache status (shows what would be purged)
cloudflarefetchcli purge example.com --dry-runπ¨ Beautiful Output Examples
Domain List
βοΈ Your Cloudflare Domains
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Domain Status Plan Zone ID
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
example.com active Free Website abc123...
mydomain.net active Pro def456...
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2 domain(s) foundDNS Records
π DNS Records for example.com
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Type Name Content TTL
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
A @ 192.0.2.1 3600 βοΈ
CNAME www example.com 3600 βοΈ
MX @ 10 mail.example.com 3600
TXT @ v=spf1 include:_spf... 3600
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 4 record(s) foundWHOIS Lookup
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π Checking: example.com
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Status: β REGISTERED
Registrar: Example Registrar, LLC
π
Dates:
Created: 2020-01-15
Updated: 2024-01-10
Expires: 2025-01-15
β Expires in 312 days
π Domain Status:
β ok - Active
β clientTransferProhibited - Transfer lockedπ Security & Privacy
- Read-Only by Design β No modifications, ever
- Local Config Storage β API tokens stored in
~/.config/cloudflarefetchcli/with0600permissions - No Telemetry β Zero tracking or analytics
- Environment Variable Support β Use
CF_API_TOKENandCF_ACCOUNT_IDif preferred
βοΈ Configuration
Environment Variables
export CF_API_TOKEN="your-api-token"
export CF_ACCOUNT_ID="your-account-id"
cloudflarefetchcli domainsConfig File Location
- Linux/macOS:
~/.config/cloudflarefetchcli/config.json - Windows:
%APPDATA%\cloudflarefetchcli\config.json
π¦ Requirements
- Node.js 18.0.0 or higher
- whois command (for domain availability checks)
- dig command (optional, for DNS resolution display)
Installing Dependencies
Ubuntu/Debian:
sudo apt-get install whois dnsutilsmacOS:
brew install whois bindRHEL/CentOS:
sudo yum install whois bind-utilsπ€ Contributing
Contributions welcome! This is a read-only tool focused on safe infrastructure exploration.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
π Changelog
v1.0.0
- β¨ Initial release
- π Read-only domain exploration
- π DNS record inspection
- π Analytics viewing
- π‘οΈ Security audit features
- β‘ Workers, KV, D1, R2, Tunnels support
- π¨ Beautiful terminal output
π₯ Credits
- Created by: tri (@fevnem)
- Contributors: cakecommand β AI Assistant
π License
MIT Β© tri
