Skip to content

Commit

Permalink
Revamp the README!
Browse files Browse the repository at this point in the history
  • Loading branch information
ejcx committed Aug 2, 2018
1 parent bf084ee commit 074d496
Showing 1 changed file with 24 additions and 93 deletions.
117 changes: 24 additions & 93 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ A cloudflare command line interface. It makes heavy use of [cloudflare-go](https
```
go get -u github.com/ejcx/cf
```


# Usage
**The cf is a full featured cli. All product areas are divided in to subcommands. All commands and subcommands will describe themselves and list options, required arguments, and information about what the command does.**

<div align="left">
<img src="https://i.imgur.com/1faa2zP.gif" alt="cf logo" width="600">
</div>

**Interacting with the full Cloudflare API and retrieving the most detailed information can be done quickly and easily.**

<div align="left">
<img src="https://i.imgur.com/JZqBJSI.gif" alt="cf logo" width="600">
</div>

**Automate common operations quickly and easily**

<div align="left">
<img src="https://i.imgur.com/nScexK0.gif" alt="cf logo" width="600">
</div>

# Credentials
Your cloudflare api credentials can be stored in `~/.cf/credentials` as
environment variables or in your keychain.
Expand All @@ -18,8 +39,8 @@ email, apikey, and user service apikey.
```
e :) cf configure
Cloudflare Email: [email protected]
Cloudflare APIKey:
Service APIKey:
Cloudflare APIKey:
Origin CA APIKey:
e :)
```
Expand Down Expand Up @@ -48,94 +69,4 @@ e :) cat ~/.cf/credentials
```

### Environment Variables
The three environment variables that should be set are `CF_API_KEY`, `CF_API_EMAIL`, and `CF_USER_SERVICE_KEY`. If any of the environment variables are set then the credentials file is ignored

**The cf is a full featured cli. All product areas are divided in to commands**
```
e :) ./cf
A CLI for interacting with Cloudflare's V4 API
Usage:
cf [command]
Available Commands:
cache Commands for interacting with caching and railgun APIs
dns Create, read, update, and delete your dns records.
firewall Commands to interact with products that block access to your site
help Help about any command
loadbalancer Manage, create, and describe your loadbalancers, pools, and monitor
organization Interact with the organizations you own and have access to
pagerule Change how cloudflare works on a URL or subdomain basis.
ratelimit Configure, create, and view your zone's ratelimits.
ssl Control and insight in to your zone's SSL stack
user Interacting with your Cloudflare account
zone Interact with cloudflare zones
Flags:
-h, --help help for cf
Use "cf [command] --help" for more information about a command.
```

**Each command has a list of subcommands that will allow you to interact with that product area.**
```
e :) cf user
The User subcommand will help you interact with your Cloudflare account.
Usage:
cf user [command]
Available Commands:
billing-profile Get the billing profile
create-user-access-rule Create a user access rule
delete-user-access-rule Delete a user access rule
details Get user specific settings
edit-user Edit user account details
list-user-access-rules List User Access Rules
update-user-access-rule Create a user access rule
Flags:
-h, --help help for user
Use "cf user [command] --help" for more information about a command.
```

**Here I am viewing the optional flags to the `edit-user` command.**
```
e :) cf user edit-user --help
Edit user account details
Usage:
cf user edit-user [flags]
Flags:
--country string The country in which the user lives, example US. max length 30
--first-name string User's first name, max length 60
-h, --help help for edit-user
--last-name string User's last name, max length 60
--telephone string User's telephone number, max length 20
--zipcode string The zip code or postal code in which the user lives, max length 20
```


**We can easily update the first name associated with the account by specifying a new first name.**
```
e :) cf user edit-user --first-name Pete --last-name ZaHut
{
"id": "64...4d",
"email": "evan@xxx",
"first_name": "Pete",
"last_name": "ZaHut",
"username": "e",
"telephone": "1-867-5309",
"zipcode": "94108",
"created_on": "2014-10-30T02:06:57.665472Z",
"modified_on": "2018-07-20T16:56:00.74237Z",
"betas": [
"dnssec_beta",
"chat_beta",
"stream_beta"
]
}
```
The three environment variables that should be set are `CF_API_KEY`, `CF_API_EMAIL`, and `CF_USER_SERVICE_KEY`. If any of the environment variables are set then the credentials file is ignored

0 comments on commit 074d496

Please sign in to comment.