You can easily change anything in your Cloudflare dashboard from the linux command line.

Install the cli

npm install -g cloudflare-cli

By default cfcli will look for “.cfcli.yml” in your home directory (you can also pass in a config file with -c). So create this:

emacs ~/.cfcli.yml
    token: fcbe3cbb2894cb5f1871c89222851bf1
    email: [email protected]

The token is actually the Cloudflare Global API key which you can retrieve from My Settings>Account>API Key menu.
All options:

    cfcli - Interact with cloudflare from the command line
    cfcli [options] command [parameters]
    -c  --config    Path to yml file with config defaults (defaults to ~/.cfcli.yml
    -e  --email     Email of your cloudflare account
    -k  --token     Token for your cloudflare account
    -u  --account   Choose one of your named cloudflare accounts from .cfcli.yml
    -d  --domain    Domain to operate on
    -a  --activate  Activate cloudflare after creating record (for addrecord)
    -f  --format    Format when printing records (csv or table)
    -t  --type      Type of record (for dns record functions)
    -p  --priority  Set priority when adding a record (MX or SRV)
    -l  --ttl       Set ttl on add or edit (120 - 86400 seconds, or 1 for auto)
    -h  --help      Display help
    add <name> <content>
        Add a DNS record. Use -a to activate cf after creation
    devmode on|off
        Toggle development mode on/off
    disable <name> [content]
        Disable cloudflare caching for given record and optionally specific value
    edit <name> <content>
        Edit a DNS record.
    enable <name> [content]
        Enable cloudflare caching for given record and optionally specific value
    find <name> [content]
        Find a record with given name and optionally specific value
        List dns records for the domain
    purge [url]
        Purge file at given url or all files if no url given
    rm <name> [content]
        Remove record with given name and optionally specific value
        List domains in your cloudflare account

Provided examples:

Add a new A record (mail) and activate cloudflare (-a)

cfcli -a -t A add mail 
Edit a record (mail) and set the TTL

cfcli --ttl 120 edit  mail
Add an SRV record (then 3 numbers are priority, weight and port respectively)

cfcli -t SRV add 1 1 1
Remove all records with the name test

cfcli rm test
Remove record with name test and value

cfcli rm test
Enable cloudflare for any records that match test

cfcli enable test
Enable cloudflare for a record test with the value

cfcli enable test
Export domain records for to csv

cfcli -d -f csv listrecords > test.csv
Purge a single file from cache

cfcli -d purge
Enable dev mode for domain

cfcli -d devmode on

My examples:

cfcli zones
│ Name                                             │ Plan               │ Active   │ ID                                     │
│                                       │ Free Website       │ active   │ f81d72ad7d2a4af5e50060148389ede8       │

Adding a CNAME record

cfcli -d -a -t CNAME add testrecord ""
-d : Work on this domain
-a : Activate the record
-t : type of DNS record
add : Add this record


Added CNAME record ->

Editing a DNS record:

cfcli -d -a -t CNAME edit testrecord ""

List cloudflare records for a domain:

cfcli -d ls

Listing in comma seperated value (CSV) format:

cfcli -d ls -f csv

To export to text file:

cfcli -d ls -f csv >