Skip to main content
All hitspec CLI flags that support environment variables are listed here. Environment variables are read at startup and can be overridden by explicit CLI flags.

Core Variables

VariableFlagDefaultDescription
HITSPEC_ENV--envdevActive environment name
HITSPEC_ENV_FILE--env-filePath to .env file
HITSPEC_CONFIG--configPath to config file
HITSPEC_TAGS--tagsTags filter (comma-separated)

Output Variables

VariableFlagDefaultDescription
HITSPEC_OUTPUT--outputconsoleOutput format
HITSPEC_OUTPUT_FILE--output-fileOutput file path
HITSPEC_QUIET--quietfalseSuppress all output
HITSPEC_NO_COLOR--no-colorfalseDisable colored output

Execution Variables

VariableFlagDefaultDescription
HITSPEC_TIMEOUT--timeout30sRequest timeout
HITSPEC_BAIL--bailfalseStop on first failure
HITSPEC_PARALLEL--parallelfalseRun in parallel
HITSPEC_CONCURRENCY--concurrency5Max concurrent requests

Network Variables

VariableFlagDefaultDescription
HITSPEC_PROXY--proxyHTTP proxy URL
HITSPEC_INSECURE--insecurefalseDisable SSL validation

Metrics Variables

VariableFlagDefaultDescription
HITSPEC_METRICS--metricsMetrics export format
HITSPEC_METRICS_PORT--metrics-port9090Prometheus endpoint port
HITSPEC_METRICS_FILE--metrics-fileJSON metrics output file
DD_API_KEY--datadog-api-keyDataDog API key
DD_SITE--datadog-sitedatadoghq.comDataDog site
DD_TAGS--datadog-tagsDataDog tags (comma-separated)

Notification Variables

VariableFlagDefaultDescription
HITSPEC_NOTIFY--notifyNotification service
HITSPEC_NOTIFY_ON--notify-onfailureWhen to notify
SLACK_WEBHOOK--slack-webhookSlack webhook URL
SLACK_CHANNEL--slack-channelSlack channel override
TEAMS_WEBHOOK--teams-webhookTeams webhook URL

Usage

Set variables in your shell profile, .env file, or CI/CD configuration:
# Shell profile
export HITSPEC_ENV=staging
export HITSPEC_TIMEOUT=60s
export HITSPEC_OUTPUT=json
export HITSPEC_BAIL=true
# CI/CD environment
HITSPEC_ENV=staging \
HITSPEC_OUTPUT=junit \
HITSPEC_OUTPUT_FILE=results.xml \
  hitspec run tests/
Boolean variables accept true, 1, or yes as truthy values. Everything else is falsy.