From 0012ec14f574f6e4c1dc2a5d774e17ef038f1308 Mon Sep 17 00:00:00 2001 From: Salim Afiune Maya Date: Thu, 23 Apr 2020 15:21:47 -0600 Subject: [PATCH] docs(cli): documern environment variables Signed-off-by: Salim Afiune Maya --- cli/README.md | 20 +++++++++++++++++--- cli/cmd/root.go | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/cli/README.md b/cli/README.md index c65dcee30..eab394976 100644 --- a/cli/README.md +++ b/cli/README.md @@ -78,9 +78,9 @@ overriden by setting environment variables prefixed with `LW_`. To override the `account`, `api_key`, and `api_secret` configurations: ``` -$ export LW_ACCOUNT='' -$ export LW_API_KEY='' -$ export LW_API_SECRET='' +$ export LW_ACCOUNT="" +$ export LW_API_KEY="" +$ export LW_API_SECRET="" ``` To override the profile to use: @@ -88,6 +88,20 @@ To override the profile to use: $ export LW_PROFILE=prod ``` +This is a list of all environment variables that can be user to modify the +operation of the Lacework CLI. + +| Environment Variable | Description | +|----------------------|-------------| +|`LW_NOCOLOR=1`|turn off colors| +|`LW_DEBUG=1`|turn on debug logging| +|`LW_JSON=1`|switch commands output from human-readable to JSON format| +|`LW_NONINTERACTIVE=1`|disable interactive progress bars (i.e. spinners)| +|`LW_PROFILE=""`|switch between profiles configured at `~/.lacework.toml`| +|`LW_ACCOUNT=""`|account subdomain of URL (i.e. `.lacework.net`)| +|`LW_API_KEY=""`|access key id| +|`LW_API_SECRET=""`|secret access key| + ## Basic Usage A few basic commands are: diff --git a/cli/cmd/root.go b/cli/cmd/root.go index de6c262a2..e355090c7 100644 --- a/cli/cmd/root.go +++ b/cli/cmd/root.go @@ -86,7 +86,7 @@ func init() { "disable interactive progress bars (i.e. 'spinners')", ) rootCmd.PersistentFlags().Bool("json", false, - "switch commands output from human readable to json format", + "switch commands output from human-readable to json format", ) rootCmd.PersistentFlags().StringP("profile", "p", "", "switch between profiles configured at ~/.lacework.toml",