Config Settings
The ICA CLI accepts configuration settings from multiple places, such as environment variables, configuration file, or passed in as command line arguments. When configuration settings are retrieved, the follow precedence is used to determine which setting to apply:
Command line options - Passed in with the command such as
--access-tokenEnvironment variables - Stored in system environment variables such as
ICA_ACCESS_TOKENCustom config file - Passed in using the
--config-fileglobal command line optionDefault config file - Stored by default in the
~/.ica/config.yamlon macOS/Linux orC:\Users\USERNAME\.ica\.configon Windows
Command Line Options
The following global flags are available in the CLI interface:
-a, --access-token string access token used to authorize commands
-c, --config-file string config file (default "/Users/me/.ica/config.yaml")
-h, --help help for ica
-o, --output-format string output format (default "table")
-s, --server-url string server url to direct commandsEnvironment Variables
Environment variables provide another way to specify configuration settings. Variable names align with the command line options with the following modifications:
Upper cased
Prefix
ICA_All dashes replaced by underscore
For example, the corresponding environment variable name for the --access-token flag is ICA_ACCESS_TOKEN.
Config File
Configuration settings can be stored in a custom configuration file or in the default configuration file. The following settings can be placed in the config file:
Last updated
