Skip to content

Commit

Permalink
docs(cli): documern environment variables
Browse files Browse the repository at this point in the history
Signed-off-by: Salim Afiune Maya <[email protected]>
  • Loading branch information
afiune committed Apr 23, 2020
1 parent 10536af commit 0012ec1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
20 changes: 17 additions & 3 deletions cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,30 @@ overriden by setting environment variables prefixed with `LW_`.

To override the `account`, `api_key`, and `api_secret` configurations:
```
$ export LW_ACCOUNT='<MY_ACCOUNT>'
$ export LW_API_KEY='<MY_API_KEY>'
$ export LW_API_SECRET='<MY_API_SECRET>'
$ export LW_ACCOUNT="<YOUR_ACCOUNT>"
$ export LW_API_KEY="<YOUR_API_KEY>"
$ export LW_API_SECRET="<YOUR_API_SECRET>"
```

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="<name>"`|switch between profiles configured at `~/.lacework.toml`|
|`LW_ACCOUNT="<account>"`|account subdomain of URL (i.e. `<ACCOUNT>.lacework.net`)|
|`LW_API_KEY="<key>"`|access key id|
|`LW_API_SECRET="<secret>"`|secret access key|

## Basic Usage
A few basic commands are:

Expand Down
2 changes: 1 addition & 1 deletion cli/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0012ec1

Please sign in to comment.