Getting Started¶
Download¶
Cloudflare-utils is build for Windows, Mac and Linux and the latest release is available to download from GitHub. Download the tar/zip file for your operating system and then extract the executable.
Deprecated archive naming convention
The archive downloads previously had the version number in the name, for example cloudflare-utils_1.2.3_windows_amd64.zip. This has been deprecated and the new naming convention is just cloudflare-utils_windows_amd64.zip.
The old naming convention will be removed in v2.0.0.
There is also a GitHub Action available to install and run cloudflare-utils in your workflows read more: here.
Additional Installation Methods¶
- Docker
cyb3rjak3/cloudflare-utilsghcr.io/cyb3r-jak3/cloudflare-utils
- Chocolatey: cloudflare-utils
- Homebrew:
brew install cyb3r-jak3/cyberjake/cloudflare-utils
Authentication¶
API Token¶
The recommended method to authenticate is with an API Token. Each command will list the API permissions needed for it to run.
You can use this link to create a token with all the necessary permissions.
To Use
cloudflare-utils --api-token <Token Here>
You can also pass your API Token via an environment variable of CLOUDFLARE_API_TOKEN
API Key¶
The legacy API Key method is also supported but is not recommended.
To Use
cloudflare-utils --api-token <API Token Here>
You can pass your API email and key with environment variables of CLOUDFLARE_API_EMAIL and CLOUDFLARE_API_KEY
Global Flags¶
-
--account-idYou can pass your account ID with the--account-idflag or with the environment variableCLOUDFLARE_ACCOUNT_ID -
--api-emailYou can pass your API email with the--api-emailflag or with the environment variableCLOUDFLARE_API_EMAIL. This is only needed if you are using the legacy auth method. -
--api-keyYou can pass your API key with the--api-keyflag or with the environment variableCLOUDFLARE_API_KEY. This is only needed if you are using the legacy auth method. -
--api-tokenYou can pass your API token with the--api-tokenflag or with the environment variableCLOUDFLARE_API_TOKEN. This is the recommended method of authentication. -
--rate-limitYou can pass the rate limit in milliseconds with the--rate-limitflag. This is useful if you are getting rate limited by Cloudflare or want to speed up the rate of requests. -
--zone-nameYou can pass your zone name with the--zone-nameflag or with the environment variableCLOUDFLARE_ZONE_NAME. This is useful if you are running a command that only requires a zone name. -
--zone-idYou can pass your zone ID with the--zone-idflag or with the environment variableCLOUDFLARE_ZONE_ID. This is useful if you are running a command that only requires a zone ID. -
--extra-user-agentYou can pass an extra user agent string to be added to the default user agent with the--extra-user-agentflag. This is useful if you want to identify requests made by cloudflare-utils in your Cloudflare logs. The final format of the user agent will becloudflare-utils/<version> (<extra-user-agent>)