Skip to main content

Global Flags

Usage

You can run any Spectacles command with any of the following global flags.

All of these flags can also be configured with a config file, but dashes should be converted to underscores. For example, --client-id abc becomes client_id: abc in the config file. Many flags can also be set with an environment variable.

Options

api-version

Usage: --api-version 4.0

The version of the Looker API that Spectacles should use. The default version is 3.1. Spectacles does not support any Looker API version lower than 3.1.

Environment Variable: LOOKER_API_VERSION

base-url

Required. Usage: --base-url https://analyzely.looker.com

The URL of your Looker instance, without any additional characters after the domain (.com). For example, https://company-name.looker.com. The URL must include the https:// prefix.

Environment Variable: LOOKER_BASE_URL

client-id

Required. Usage: --client-id 4x2vgxNvCD3RYDM05gna

The client ID (username) of the API key that Spectacles will use to authenticate.

Looker API keys have two components, a client ID and a client secret. These keys have a many-to-one relationship with Looker users. You can read more about API keys and how to generate them in the Looker documentation.

Environment Variable: LOOKER_CLIENT_ID

client-secret

Required. Usage: --client-secret KDDwdDMm8MXyrJNqXBchbdmY

The client secret (password) of the API key that Spectacles will use to authenticate.

Looker API keys have two components, a client ID and a client secret. These keys have a many-to-one relationship with Looker users. You can read more about API keys and how to generate them in the Looker documentation.

Environment Variable: LOOKER_CLIENT_SECRET

config-file

Usage: --config-file config.yaml

A path to a YAML config file that holds additional configuration parameters. For example:

spectacles/config.yaml
# Replace with the URL of your Looker instance
base_url: https://analyzely.looker.com
# Replace with the actual values from your API key
client_id: 4x2vgxNvCD3RYDM05gna
client_id: KDDwdDMm8MXyrJNqXBchbdmY

do-not-track [DEPRECATED]

Usage: --do-not-track

Spectacles no longer tracks invocations of the command line tool. This argument has been deprecated, is no longer used, and should be removed.

Environment Variable: SPECTACLES_DO_NOT_TRACK

log-dir

Usage: --log-dir spectacles-logs

A path to an alternate directory to log to. By default, Spectacles creates a directory called logs in the working directory to save failed SQL queries and debug-level text logs.

Environment Variable: SPECTACLES_LOG_DIR

port

Usage: --port 8080

The port for your Looker instance's API. If your instance is a GCP-hosted instance, with a URL ending in "cloud.looker.com", Spectacles uses the default HTTPS port: 443. Otherwise, Spectacles uses Looker's default API port for legacy instances: 19999.

Most instances don't use a custom port, unless it has been explictly configured by a Looker admin in the API Admin Settings.

Environment Variable: LOOKER_PORT

verbose

Usage: --verbose or -v

Display extra logging at the debug level during Spectacles execution. This is helpful for debugging or submitting a bug report.

Spectacles logs to file at the debug level, regardless of whether or not this option is set.