Skip to content

Configuration

The Qualflare CLI (qf) can be configured via command-line flags or environment variables. Flags always take precedence over environment variables, which take precedence over defaults.

Configuration Priority

Highest to lowest:

  1. Command-line flags (e.g., --api-key, --environment)
  2. Environment variables (e.g., QF_API_KEY, QF_ENVIRONMENT)
  3. Auto-detection (Git metadata, CI platform variables)
  4. Built-in defaults

Global Flags

These flags are available on every qf command:

FlagShortTypeDefaultEnv VarDescription
--api-keystring""QF_API_KEYAPI key for authentication. Required for all commands except dry-run.
--api-endpointstringhttps://api.qualflare.comQF_API_ENDPOINTQualflare API endpoint URL.
--verbose-vboolfalseQF_VERBOSEEnable verbose debug output.
--quiet-qboolfalseQF_QUIETSuppress all non-error output.

Environment Variables

All environment variables can be set in your shell profile, .env file, or CI/CD secrets.

Authentication & Connection

VariableDefaultDescription
QF_API_KEYRequiredAPI key for authentication. Get yours from Qualflare workspace settings.
QF_API_ENDPOINThttps://api.qualflare.comQualflare API endpoint URL. Override for self-hosted deployments.

Test Run Metadata

VariableDefaultDescription
QF_ENVIRONMENTdevelopmentEnvironment name for the test run (e.g., staging, production).
QF_LANGUAGEen-USLanguage code for test result labels (BCP 47 format, e.g., en-US, de-DE).
QF_BRANCHAuto-detectedGit branch name. Auto-detected from CI environment if not set.
QF_COMMITAuto-detectedGit commit SHA. Auto-detected from CI environment if not set.

Retry & Timeout

VariableDefaultDescription
QF_RETRY_MAX3Maximum number of retry attempts (capped at 10).
QF_RETRY_DELAY1sBase delay between retries (exponential backoff).
QF_RETRY_MAX_DELAY30sMaximum delay between retries.
QF_TIMEOUT30sHTTP request timeout. Valid units: s, m.

Output

VariableDefaultDescription
QF_VERBOSEfalseSet to true or 1 to enable verbose output.
QF_QUIETfalseSet to true or 1 to suppress non-error output.

CI Auto-Detection

In CI environments, the CLI automatically detects git metadata from well-known environment variables. Manual flags and QF_* variables always override auto-detection.

Branch Detection

The CLI checks these variables in order, using the first non-empty value:

QF_BRANCH → GIT_BRANCH → GITHUB_REF_NAME → CI_COMMIT_REF_NAME → BITBUCKET_BRANCH

Commit Detection

The CLI checks these variables in order, using the first non-empty value:

QF_COMMIT → GIT_COMMIT → GITHUB_SHA → CI_COMMIT_SHA → BITBUCKET_COMMIT

Authentication

Getting Your API Key

Generate your API key in Qualflare workspace settings under Settings → API Keys.

TIP

Use environment variables or CI secrets to store your API key. Never commit it to source control or pass it directly on the command line in CI environments.

Usage

bash
# Set as environment variable (recommended)
export QF_API_KEY=your_api_key_here

# Pass as flag (avoid in CI — visible in logs)
qf collect results.xml --api-key your_api_key_here

See Also