Skip to content

Environment Variables ​

Environment variables can be used to supply any Butler Sheet Icons (BSI) command-line parameter. This helps keep secrets out of commands/scripts, enables reusable setups, and (significantly!) shortens long commands.

Naming pattern ​

Each CLI parameter has a matching environment variable using this pattern:

BSI_<COMMAND>_<SUBCOMMAND_ABBREVIATION>_<PARAMETER_NAME>

Commands are:

  • QSEOW — Qlik Sense Enterprise on Windows (client-managed)
  • QSCLOUD — Qlik Sense Cloud
  • BROWSER — Embedded browser management options

Subcommand abbreviations:

Used for commandsSubcommand nameAbbreviation
qseow, qscloudcreate-sheet-thumbnailsCST
qscloudremove-sheet-iconsRSI
qscloudlist-collectionsLC
browserlist-installedLI
browserlist-availableLA
browserinstallI
browseruninstallUI
browseruninstall-allUIA

Finally, take the command-line parameter name, convert it to uppercase, and append it. Example: --host becomes _HOST, --apiuserdir becomes _API_USER_DIR.

Environment variables are also listed when running BSI with --help (scroll right to see the variable names):

bash
Usage: butler-sheet-icons qscloud create-sheet-thumbnails|create-sheet-icons [options]

Create thumbnail images based on the layout of each sheet in Qlik Sense Cloud applications.
Multiple apps can be updated with a single command, using a Qlik Sense collection to identify which apps will be updated.

Options:
  --loglevel, --log-level <level>     Log level (choices: "error", "warn", "info", "verbose", "debug", "silly", default: "info", env: BSI_QSCLOUD_CST_LOG_LEVEL)
  --schemaversion <version>           Qlik Sense engine schema version (choices: "12.170.2", "12.612.0", "12.936.0", "12.1306.0", "12.1477.0", "12.1657.0", "12.1823.0", "12.2015.0", default: "12.612.0", env: BSI_QSCLOUD_CST_SCHEMAVERSION)
  --tenanturl <url>                   URL or host of Qlik Sense cloud tenant. Example: "https://tenant.eu.qlikcloud.com" or "tenant.eu.qlikcloud.com" (env: BSI_QSCLOUD_CST_TENANTURL)
  --apikey <key>                      API key used to access the Sense APIs (env: BSI_QSCLOUD_CST_APIKEY)
  --skip-login                        Skip QS login page, go directly to the tenant URL. Use this if you are automatically logged in to Qlik Sense (default: false, env: BSI_QSCLOUD_CST_SKIP_LOGIN)
  ...
  ...

Examples ​

QSEoW ​

powershell
# Set environment variables for QSEoW
$env:BSI_QSEOW_CST_HOST = 'qlikserver.example.com'
$env:BSI_QSEOW_CST_APP_ID = '12345678-1234-1234-1234-123456789012'
$env:BSI_QSEOW_CST_API_USER_DIR = 'INTERNAL'
$env:BSI_QSEOW_CST_API_USER_ID = 'sa_api'
$env:BSI_QSEOW_CST_LOGON_USER_DIR = 'INTERNAL'
$env:BSI_QSEOW_CST_LOGON_USER_ID = 'userID'
$env:BSI_QSEOW_CST_LOGON_PWD = 'password'
$env:BSI_QSEOW_CST_PREFIX = 'form'
$env:BSI_QSEOW_CST_CONTENT_LIBRARY = 'Butler sheet thumbnails'

# Minimal command once variables are set
butler-sheet-icons qseow create-sheet-thumbnails
bash
# Set environment variables for QSEoW
export BSI_QSEOW_CST_HOST='qlikserver.example.com'
export BSI_QSEOW_CST_APP_ID='12345678-1234-1234-1234-123456789012'
export BSI_QSEOW_CST_API_USER_DIR='INTERNAL'
export BSI_QSEOW_CST_API_USER_ID='sa_api'
export BSI_QSEOW_CST_LOGON_USER_DIR='INTERNAL'
export BSI_QSEOW_CST_LOGON_USER_ID='userID'
export BSI_QSEOW_CST_LOGON_PWD='password'
export BSI_QSEOW_CST_PREFIX='form'
export BSI_QSEOW_CST_CONTENT_LIBRARY='Butler sheet thumbnails'

# Minimal command once variables are set
butler-sheet-icons qseow create-sheet-thumbnails

QS Cloud ​

powershell
# Set environment variables for QS Cloud
$env:BSI_QSCLOUD_CST_TENANTURL = 'tenant.eu.qlikcloud.com'
$env:BSI_QSCLOUD_CST_APIKEY = 'eyJhbGciOiJFUzM4NCIsImtpZCI6IjM...'
$env:BSI_QSCLOUD_CST_LOGON_USER_ID = '[email protected]'
$env:BSI_QSCLOUD_CST_LOGON_PWD = 'password'
$env:BSI_QSCLOUD_CST_APP_ID = '12345678-1234-1234-1234-123456789012'

# Minimal command once variables are set
butler-sheet-icons qscloud create-sheet-thumbnails
bash
# Set environment variables for QS Cloud
export BSI_QSCLOUD_CST_TENANTURL='tenant.eu.qlikcloud.com'
export BSI_QSCLOUD_CST_APIKEY='eyJhbGciOiJFUzM4NCIsImtpZCI6IjM...'
export BSI_QSCLOUD_CST_LOGON_USER_ID='[email protected]'
export BSI_QSCLOUD_CST_LOGON_PWD='password'
export BSI_QSCLOUD_CST_APP_ID='12345678-1234-1234-1234-123456789012'

# Minimal command once variables are set
butler-sheet-icons qscloud create-sheet-thumbnails

Behavior and security ​

  • With environment variables set, you can run BSI with minimal parameters.
  • Command-line parameters override environment variables if both are provided.
  • On shared systems, avoid system-wide secrets in env vars; consider a proper secrets manager in production.

Output and interaction ​

These do not configure a command — they control how Butler Sheet Icons presents itself.

VariableEffect
NO_COLOR (any value)Never colour the log output, even in a terminal
FORCE_COLOR=1Always colour it, even when redirecting to a file
FORCE_COLOR=0Never colour it — the same as NO_COLOR
BSI_NO_INTERACTIVE=1Refuse to prompt, even in a terminal. See Interactive Mode
BSI_ASCII_ONLY=1Use plain ASCII instead of Unicode symbols in interactive mode

Colour codes in captured logs ​

Requires BSI 4.1.0 or later

In earlier versions, colour instructions were written whether or not the output was going to a screen.

Butler Sheet Icons colours its log output so that info, warn and error lines are easy to tell apart. Until 4.1.0 it did that always — so if you redirected output to a file, piped it into another tool, or let a scheduler capture it, the colour instructions were captured too:

2026-06-24T10:30:45.123Z ←[32minfo←[39m: App version: 4.0.0

instead of:

2026-06-24T10:30:45.123Z info: App version: 4.0.0

From 4.1.0 the check is automatic: colour goes to a terminal, and nothing else. Interactive sessions are unchanged; redirected output, pipes, docker logs and scheduler transcripts are now clean.

This is not only cosmetic. Colour codes in a captured log break things that read it afterwards: a search for info: does not match ←[32minfo←[39m:, and log shippers that parse a level field — Splunk, Elastic, Grafana Loki — see unexpected characters in it.

If you were stripping these characters yourself with a sed filter, a PowerShell replace, or a log-shipper rule, that workaround is no longer needed. Leaving it in place does no harm.

Use FORCE_COLOR=1 if you deliberately want a coloured transcript — for example when capturing output with a tool that renders colour back to you later.

powershell
$env:FORCE_COLOR = "1"
butler-sheet-icons.exe browser list-installed > coloured.log
bash
FORCE_COLOR=1 butler-sheet-icons browser list-installed > coloured.log

A terminal reporting itself as TERM=dumb is also treated as unable to show colour.

When behind a proxy, set standard proxy variables (Linux/macOS example):

bash
export http_proxy='http://username:[email protected]:port'
export https_proxy='http://username:[email protected]:port'

These are honored when BSI downloads a browser or otherwise needs outbound network access.

Released under the MIT License.