Skip to content

Commit

Permalink
Merge pull request #50 from caliban0/configRework
Browse files Browse the repository at this point in the history
Config rework
  • Loading branch information
zalmarge authored Jul 23, 2024
2 parents db3a107 + 0bf9c79 commit e7a309d
Show file tree
Hide file tree
Showing 79 changed files with 268 additions and 217 deletions.
2 changes: 1 addition & 1 deletion docs/cherryctl.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cherryctl is a command line interface (CLI) for Cherry Servers API

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-h, --help help for cherryctl
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Server backup storage operations: plans, get, list, create, update, methods, upd

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cherryctl backup create {--server-id <id> | --server-hostname <hostname>} --plan

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cherryctl backup delete ID [-f] [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl backup get <backup_ID> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cherryctl backup list [-p <project_id>] [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_methods-whitelist.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl backup methods-whitelist <backup_ID> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl backup methods <backup_ID> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_plans.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl backup plans [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_update-method.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cherryctl backup update-method <backup_ID> --method-name <string> [--enable] [--

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cherryctl backup update <backup_ID> [--password <plain_text>] [--ssh-key <plain_

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_backup_upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cherryctl backup upgrade <backup_ID> --plan <backup_plan_slug> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ See each sub-command's help for details on how to use the generated script.

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_completion_bash.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ cherryctl completion bash

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_completion_fish.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cherryctl completion fish [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_completion_powershell.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cherryctl completion powershell [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_completion_zsh.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cherryctl completion zsh [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl docs <destination>

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_image.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Image operations: list.

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_image_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cherryctl image list --plan <plan_slug> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
9 changes: 7 additions & 2 deletions docs/cherryctl_init.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ Configuration file initialization.

### Synopsis

Init will prompt for account settings and store the values as defaults in a configuration file that may be shared with other Cherry Servers tools. This file is typically stored in $HOME/.config/cherry/config.yaml. Any Cherry CLI command line argument can be specified in the config file. Be careful not to define options that you do not intend to use as defaults. The configuration file path can be changed with the CHERRY_CONFIG environment variable or --config option.
Init will prompt for account settings and store the values as defaults in a configuration file.
This file is stored in the default user configuration directory (platform dependent), unless otherwise specified by the --config flag.
The --context flag can be used to change the default config file name.
Any Cherry CLI command line argument can be specified in the config file.
Be careful not to define options that you do not intend to use as defaults.
The configuration directory path can be changed with the CHERRY_CONFIG environment variable or --config option.

```
cherryctl init
Expand All @@ -30,7 +35,7 @@ cherryctl init

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IP address operations: get, list, create, update, assign, unassign and delete.

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_assign.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ cherryctl ip assign ID {--target-hostname <hostname> | --target-id <server_id> |

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cherryctl ip create -p <project_id> --region <region_slug> [--target-hostname <h

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cherryctl ip delete ID [-f] [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_get.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl ip get ID [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ cherryctl ip list -p <project_id> [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_unassign.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cherryctl ip unassign ID [flags]

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_ip_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cherryctl ip update ID [--ptr-record <ptr>] [--a-record <a>] [--tags <tags>] [fl

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
2 changes: 1 addition & 1 deletion docs/cherryctl_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Plan operations: get, list.

```
--api-url string Override default API endpoint (default "https://api.cherryservers.com/v1/")
--config string Path to JSON or YAML configuration file
--config string Path to configuration file directory. The CHERRY_CONFIG environment variable can be used as well.
--context string Specify a custom context name (default "default")
--fields strings Comma separated object field names to output in result. Fields can be used for list and get actions.
-o, --output string Output format (*table, json, yaml)
Expand Down
Loading

0 comments on commit e7a309d

Please sign in to comment.