The Scale CLI can be configured via a number of global configuration flags. These flags can be set in the following ways:

Command Line Flags

The following global flags are available throughout the Scale CLI:

FlagDescriptionDefault Value
--helpShow help for any commandfalse
--configThe path to the Scale CLI configuration file (if it exists)~/.config/scale/config.yml
--logThe path to where the Scale CLI will log things (will be created if it does not exist)~/.config/scale/scale.log
--formatThe output format for the Scale CLI (human, json, or csv)human
--debugEnable debug loggingfalse
--no-colorDisable color outputfalse
--versionShow the version of the Scale CLIfalse
--cache-directoryThe path to the Scale CLI cache directory (will be created if it does not exist)~/.config/scale/functions

Environment Variables

The CLI will look for environment variables prefixed with SCALE_ and convert them to the corresponding flag. For example, the environment variable SCALE_CACHE_DIRECTORY will be converted to the --cache-directory flag.

Configuration File

The Scale CLI will look for a configuration file at ~/.config/scale/config.yml. If it exists, it will be used to configure the Scale CLI. The configuration file can be used to set any of the global flags listed above.

The configuration file itself can also be specified using the --config flag or the SCALE_CONFIG environment variable.

Example Configuration File

~/.config/scale/config.yml
cache_directory: /tmp/scale/functions
log: ~/scale.log
debug: true