Configuration Reference
Complete reference for all NHL Scrabble configuration options.
Overview
NHL Scrabble can be configured via:
Environment variables (recommended for deployment)
Command-line options (for ad-hoc usage)
.env file (for development)
Priority: Command-line > Environment variables > Defaults
All Configuration Options
API Configuration
Variable |
Type |
Default |
Description |
|---|---|---|---|
|
int |
10 |
API request timeout in seconds |
|
int |
3 |
Number of retry attempts on failure |
|
float |
0.3 |
Delay between requests in seconds |
|
int |
5 |
Max concurrent API requests |
Example:
export NHL_SCRABBLE_API_TIMEOUT=30
export NHL_SCRABBLE_API_RETRIES=5
export NHL_SCRABBLE_RATE_LIMIT_DELAY=0.5
export NHL_SCRABBLE_MAX_CONCURRENT=10
Caching Configuration
Variable |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
true |
Enable API response caching |
|
int |
3600 |
Cache expiry time in seconds |
Example:
export NHL_SCRABBLE_CACHE_ENABLED=true
export NHL_SCRABBLE_CACHE_EXPIRY=7200 # 2 hours
Output Configuration
Variable |
Type |
Default |
Description |
|---|---|---|---|
|
string |
text |
Output format: |
|
int |
20 |
Number of top players to show |
|
int |
5 |
Top players per team to show |
Example:
export NHL_SCRABBLE_OUTPUT_FORMAT=json
export NHL_SCRABBLE_TOP_PLAYERS=50
export NHL_SCRABBLE_TOP_TEAM_PLAYERS=10
Logging Configuration
Variable |
Type |
Default |
Description |
|---|---|---|---|
|
bool |
false |
Enable verbose (DEBUG) logging |
|
bool |
true |
Sanitize secrets from logs |
Example:
export NHL_SCRABBLE_VERBOSE=true
export NHL_SCRABBLE_SANITIZE_LOGS=true
Configuration File (.env)
Create .env in project root:
# API Settings
NHL_SCRABBLE_API_TIMEOUT=30
NHL_SCRABBLE_API_RETRIES=5
NHL_SCRABBLE_RATE_LIMIT_DELAY=0.5
NHL_SCRABBLE_MAX_CONCURRENT=10
# Caching
NHL_SCRABBLE_CACHE_ENABLED=true
NHL_SCRABBLE_CACHE_EXPIRY=7200
# Output
NHL_SCRABBLE_OUTPUT_FORMAT=json
NHL_SCRABBLE_TOP_PLAYERS=50
NHL_SCRABBLE_TOP_TEAM_PLAYERS=10
# Logging
NHL_SCRABBLE_VERBOSE=false
NHL_SCRABBLE_SANITIZE_LOGS=true
Command-Line Options
Override configuration via CLI:
nhl-scrabble analyze \
--format json \
--output report.json \
--verbose \
--top-players 100 \
--top-team-players 15 \
--no-cache
See CLI Reference for all options.
Configuration Scenarios
Development
NHL_SCRABBLE_VERBOSE=true
NHL_SCRABBLE_CACHE_ENABLED=false
NHL_SCRABBLE_RATE_LIMIT_DELAY=0
NHL_SCRABBLE_MAX_CONCURRENT=10
NHL_SCRABBLE_SANITIZE_LOGS=false
Production
NHL_SCRABBLE_API_TIMEOUT=15
NHL_SCRABBLE_API_RETRIES=3
NHL_SCRABBLE_RATE_LIMIT_DELAY=0.3
NHL_SCRABBLE_MAX_CONCURRENT=5
NHL_SCRABBLE_CACHE_ENABLED=true
NHL_SCRABBLE_CACHE_EXPIRY=7200
NHL_SCRABBLE_SANITIZE_LOGS=true
Slow Network
NHL_SCRABBLE_API_TIMEOUT=60
NHL_SCRABBLE_API_RETRIES=10
NHL_SCRABBLE_RATE_LIMIT_DELAY=1.0
Validation
Configuration values are validated at startup:
Timeouts: Must be positive integers
Delays: Must be non-negative floats
Counts: Must be positive integers
Formats: Must be
textorjsonBooleans:
true/false,1/0,yes/no