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:
- Command-line flags (e.g.,
--api-key,--environment) - Environment variables (e.g.,
QF_API_KEY,QF_ENVIRONMENT) - Auto-detection (Git metadata, CI platform variables)
- Built-in defaults
Global Flags
These flags are available on every qf command:
| Flag | Short | Type | Default | Env Var | Description |
|---|---|---|---|---|---|
--api-key | string | "" | QF_API_KEY | API key for authentication. Required for all commands except dry-run. | |
--api-endpoint | string | https://api.qualflare.com | QF_API_ENDPOINT | Qualflare API endpoint URL. | |
--verbose | -v | bool | false | QF_VERBOSE | Enable verbose debug output. |
--quiet | -q | bool | false | QF_QUIET | Suppress all non-error output. |
Environment Variables
All environment variables can be set in your shell profile, .env file, or CI/CD secrets.
Authentication & Connection
| Variable | Default | Description |
|---|---|---|
QF_API_KEY | Required | API key for authentication. Get yours from Qualflare workspace settings. |
QF_API_ENDPOINT | https://api.qualflare.com | Qualflare API endpoint URL. Override for self-hosted deployments. |
Test Run Metadata
| Variable | Default | Description |
|---|---|---|
QF_ENVIRONMENT | development | Environment name for the test run (e.g., staging, production). |
QF_LANGUAGE | en-US | Language code for test result labels (BCP 47 format, e.g., en-US, de-DE). |
QF_BRANCH | Auto-detected | Git branch name. Auto-detected from CI environment if not set. |
QF_COMMIT | Auto-detected | Git commit SHA. Auto-detected from CI environment if not set. |
Retry & Timeout
| Variable | Default | Description |
|---|---|---|
QF_RETRY_MAX | 3 | Maximum number of retry attempts (capped at 10). |
QF_RETRY_DELAY | 1s | Base delay between retries (exponential backoff). |
QF_RETRY_MAX_DELAY | 30s | Maximum delay between retries. |
QF_TIMEOUT | 30s | HTTP request timeout. Valid units: s, m. |
Output
| Variable | Default | Description |
|---|---|---|
QF_VERBOSE | false | Set to true or 1 to enable verbose output. |
QF_QUIET | false | Set 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_BRANCHCommit Detection
The CLI checks these variables in order, using the first non-empty value:
QF_COMMIT → GIT_COMMIT → GITHUB_SHA → CI_COMMIT_SHA → BITBUCKET_COMMITAuthentication
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
# 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_hereSee Also
- Collect Command — Upload test results
- CI/CD Integration — Platform-specific setup guides
- Installation — Install the CLI