πŸ¦€ CLI for Cloudflare API πŸ¦€

Overview

cliffy

build publish Coverage Status crates.io downloads license

  • πŸ›  CLI️ to interact with Cloudflare APIs
  • πŸ₯³ An excuse to write some Rust
  • πŸ‘· Under heavy development

Setup

Install Rust πŸ“

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Install

cargo install cliflare

Generate a Cloudflare API token πŸ“

Grab Account And Zone IDs πŸ“

Environment

# add your token value to a startup script
echo CLOUDFLARE_TOKEN=abcd1234**API_TOKEN**4321dcba >> ~/.zshrc
echo CLOUDFLARE_ACCOUNT_ID=abcd1234**ACCOUNT_ID**4321dcba >> ~/.zshrc

Examples

Token Verify πŸ“

cliflare token verify

Zone List πŸ“

# print out all zone info
cliflare zone list
# print only zone "name" field -- i.e. domains
cliflare zone list --domains

Create a Zone πŸ“

cliflare zone create newzone.com

Delete a Zone πŸ“

cliflare zone delete newzone.com

List DNS Records For A Zone πŸ“

cliflare dns list --zone_id <ZONE_ID>
cliflare dns list --zone_name <DOMAIN>

Export DNS Records For A Zone πŸ“

cliflare dns export --zone_id <ZONE_ID>
cliflare dns export --zone_name <DOMAIN>

Import DNS Records For A Zone πŸ“

cliflare dns import --file <PATH> --zone_id <ZONE_ID>
cliflare dns import -file <PATH> --zone_name <DOMAIN>

Delete All DNS Records For A Zone πŸ“

cliflare dns clear --zone_id <ZONE_ID>
cliflare dns clear --zone_name <DOMAIN>

Coming Soon

Feature Requests

Fill out this form and I'll get back to you.

You might also like...
CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.
CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not.

CFD is a tool that allows you to check one or more domains to see if they are protected by CloudFlare or not. The check is carried out based on five criteria: 3 headers in the HTTP response, IP, and SSL certificate issuer. The check result can be displayed on the screen or saved to a file.

Pass cloudflare IUAM using headless chrome without hassle.
Pass cloudflare IUAM using headless chrome without hassle.

FlarelessHeadlessChrome Pass cloudflare turnstile challenge using patched chrome binary (Windows/Linux x64). How it works Currently, with new headless

Scan all IP nodes of CloudFlare to find the fastest IP node.
Scan all IP nodes of CloudFlare to find the fastest IP node.

δΈ­ζ–‡η‰ˆ | English πŸ“– Introduction Scan all IP nodes of CloudFlare to find the fastest IP node. ⚑️ Get Started πŸ”¨οΈ Build git clone https://github.com/golan

Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects

Modrinth API is a simple library for using, you guessed it, the Modrinth API in Rust projects. It uses reqwest as its HTTP(S) client and deserialises responses to typed structs using serde.

API wrapper for the tankerkΓΆnig api

tankerkoenig-rs API wrapper for the tankerkoenig-api written in rust. Gives you ready deserialized structs and a easy to use and strictly typed api. I

A repository full of manually generated hand curated JSON files, which contain the API Types that the Discord API returns.

Discord API Types A repository full of manually generated hand curated JSON files, which contain the API Types that the Discord API returns. Also did

Notion Offical API client library for rust

Notion API client library for rust.

Rust lib for Scaleway API

Notes This Scaleway API Crate is created and maintained by Qovery and used in production in the Qovery Engine. This project relies on OpenAPI Generato

mdzk is a plain text Zettelkasten system that is based on the mdBook API.

mdzk A lovingly designed system and static publishing tool for your plain text Zettelkasten mdzk is a plain text Zettelkasten system that is based on

Comments
  • README badge links, lints, and clippy

    README badge links, lints, and clippy

    cool project! this PR is just a pile of little fiddly things

    • some of the readme badges just took you to the badge svg when you clicked them, now they should take you somewhere useful for the stat / staus
    • markdownlint had a lot of things to say about the readme so addressed those
    • clippy had opionions about initializing structs in place vs creating then mutating them

    feel free to pick and choose what things you like and drop the things you dont πŸ˜„

    opened by shnewto 6
Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys.

worker-kv Rust bindings to Cloudflare Worker KV Stores using wasm-bindgen and js-sys

Zeb Piasecki 39 Dec 4, 2022
Telegram Bot Template with Cloudflare Workers

cf-workers-telegram-bot-template Usage This template starts you off with a src/lib.rs file, acting as an entrypoint for requests hitting your Worker.

Lee Taehoon 2 Sep 23, 2021
A template for kick starting a Cloudflare worker project using workers-rs.

Getting Started A template for kick starting a Cloudflare worker project using workers-rs. This template is designed for compiling Rust to WebAssembly

Abid Omar 1 Oct 13, 2021
Cloudflare worker for embedding polls anywhere.

poll.fizzy.wtf Cloudflare worker for embedding polls anywhere. ?? Pineapple on pizza? ?? Yes ?? No ?? Total Features Unlimited polls and unlimited opt

Valentin Berlier 39 Dec 10, 2022
Blueboat is an open-source alternative to Cloudflare Workers. The monolithic engine for serverless web apps.

Blueboat Blueboat is an open-source alternative to Cloudflare Workers. Blueboat aims to be a developer-friendly, multi-tenant platform for serverless

Heyang Zhou 1.8k Jan 9, 2023
Verify Discord interactions on Cloudflare Workers with Twilight

twilight-cloudflare-workers Verify Discord interactions on Cloudflare Workers with Twilight. API The primary function in the API is process. It takes

Zeyla 5 Jun 6, 2022
Edgelord is a library for Cloudflare Workers. You can scaffold a basic bot for discord, slack, etc.

Edge Computing + chūnibyō = Edgelord ✨ ?? Edgelord Edgelord is now working. You can contribute for it. Edgelord is a Rust library for cloudflare worke

null 23 Dec 26, 2022
A pure-Rust serverless discord chatbot hosted on Cloudflare Workers.

About A pure-Rust serverless discord chatbot hosted on Cloudflare Workers. With a free account you have up to 100k requests per day. For storing state

Mike Dallas 31 Nov 21, 2022
Log your spending in seconds with short text snippets. Powered by Rust, Cloudflare Workers and Svelte.

FastSpend Log your daily spending lightning fast with short text snippets! FastSpend is a tool to log your spending in seconds, powered by a lightning

Phoomparin Mano 24 Sep 13, 2022
Write Cloudflare Workers in 100% Rust via WebAssembly. (A fork of workers-rs)

Note: This is a fork to workers-rs. Work-in-progress ergonomic Rust bindings to Cloudflare Workers environment. Write your entire worker in Rust! Read

Abid Omar 7 Jan 11, 2023