A simple Cloudflare DNS CLI tool
Project description
cfcommander
cfcommander is a simple CLI tool for managing DNS records in Cloudflare. After installing via pip, you can use it with the cf command.
Installation
pip install cfcommander
Configuration
Before using the tool, configure your Cloudflare API credentials:
cf config your_email@example.com your_api_key
This saves your credentials to ~/.cfcli_config.json.
Usage
Add a DNS record
cf add example.com A home 192.0.2.1 yes 120
example.com– The zone name (your domain).A– Record type (A, CNAME, etc.).home– Subdomain (createshome.example.com).192.0.2.1– The record value (e.g., an IP address).yes– Whether the record is proxied through Cloudflare (yes/no).120– TTL (Time-To-Live in seconds).
Edit a DNS record
cf edit example.com A home 198.51.100.42 no 300
Delete a DNS record
cf del example.com A home
List all DNS records for a domain
cf list example.com
List all manageable domains
cf domains
Examples
# Configure API credentials
cf config user@example.com my_api_key
# Add an A record for home.example.com
cf add example.com A home 203.0.113.10 no 3600
# Modify an existing record
cf edit example.com A home 198.51.100.42 yes 1800
# Delete a record
cf del example.com A home
# List all DNS records for a domain
cf list example.com
# List all domains under your Cloudflare account
cf domains
Dependencies
- Python 3.6+
- Required libraries:
requests,argparse,tabulate,json,sys,os,textwrap
License
MIT License © Jakub Jim Zacek
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cfcommander-0.1.15.tar.gz.
File metadata
- Download URL: cfcommander-0.1.15.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4647ab889c7c0b62b5f3cd61ccfd6e9a280f126732e8c90bc2b334e290aca271
|
|
| MD5 |
3039232e64fddbd424e43e7e3fb95982
|
|
| BLAKE2b-256 |
65bdb9995a049eb0d474a11532a2cbbee221414ab9d8ff352a6e8a861dea555c
|
File details
Details for the file cfcommander-0.1.15-py3-none-any.whl.
File metadata
- Download URL: cfcommander-0.1.15-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b9391e808b8d2d3410ec0954092de65283969d6537088b2d495b3b554b054cb
|
|
| MD5 |
04c691869c9f6fa99cee31094467c169
|
|
| BLAKE2b-256 |
aeee6246b52d80fca7de03c28cfdbbb2c8e9737b3dab86dffffe69a67540884f
|