Most Spectacles parameters can be specified from the command line, from a YAML config file, or as an environment variable. In the Reference section, you'll find a list of global flags and validator-specific flags.
Parameters specified via the command line will override those specified by other means. Similarly, parameters in environment variables will override paramters in the config file.
The most convenient approach for parameters that you always need to pass, like your client ID, client secret, or project, is to save your Spectacles configuration as a YAML file (
Here's how an example config file might look. You can name it whatever you want.
base_url: https://analyzely.looker.comclient_id: HpB53crD3DMDkdJPCRcclient_secret: jDRSM6ZGG9D5WH3r5FynQ9c
When you call Spectacles, use the
--config-file flag to specify the path to your config file.
spectacles connect --config-file looker_configuration.yaml
You can also configure Spectacles via environment variables. Not all flags have environment variables associated with them. The flags that do are listed in the Reference section of the docs.
Here's how you would configure your API credentials via environment variables:
export LOOKER_BASE_URL=https://analyzely.looker.comexport LOOKER_CLIENT_ID=HpB53crD3DMDkdJPCRcexport LOOKER_CLIENT_SECRET=jDRSM6ZGG9D5WH3r5FynQ9c spectacles connect