Environment Variables
Complete reference for environment variables that configure Gonzo's behavior. Environment variables provide a convenient way to configure Gonzo without command-line flags or config files.
Overview
Environment variables are useful for:
Container deployments: Configure via Docker/Kubernetes env vars
CI/CD pipelines: Set configuration in pipeline env
Quick testing: Temporary configuration without files
System-wide defaults: Set in shell profile
Priority Order (highest to lowest):
Command line flags
Environment variables
Configuration file
Default values
Gonzo-Specific Variables
Input Configuration
GONZO_FILES
Type: String (comma-separated paths)
Default: "" (uses stdin)
Description: Log files to read
Example:
Built-in skins:
Dark:
default,controltheory-dark,dracula,gruvbox,monokai,nord,solarized-darkLight:
controltheory-light,github-light,solarized-light,vs-code-light,spring
Advanced Settings
GONZO_TEST_MODE
Type: Boolean (true or false)
Default: false
Description: Run without TTY (for testing)
Note: For automated testing only, not for normal use.
AI Provider Variables
These configure AI provider connections:
OpenAI API
OPENAI_API_KEY
Type: String (API key) Required for: OpenAI API access Description: Your OpenAI API key
Get your key: https://platform.openai.com/api-keys
OPENAI_API_BASE
Type: String (URL)
Default: https://api.openai.com/v1
Description: API endpoint (for custom providers)
Important Notes:
LM Studio: MUST include
/v1suffixOllama: MUST NOT include
/v1suffixMost others: Include
/v1suffix
OpenAI Configuration
OPENAI_ORGANIZATION
Type: String (organization ID) Optional: For multi-org accounts Description: OpenAI organization ID
System Variables
These system-wide variables affect Gonzo:
Terminal Configuration
TERM
Type: String Default: Set by terminal Description: Terminal type
Recommended values:
xterm-256color- 256 color supportscreen-256color- For tmux/screenalacritty- For Alacritty terminal
LANG / LC_ALL
Type: String (locale) Default: System locale Description: Character encoding
Note: UTF-8 recommended for proper display.
Display Control
NO_COLOR
Type: Boolean (any value) Default: Not set Description: Disable color output
Note: Setting to any value disables colors.
Complete Configuration Examples
Basic Development Setup
Production Monitoring
OTLP Receiver
Local AI with Ollama
Local AI with LM Studio
Docker/Container Usage
Docker Compose
Docker Run
Kubernetes
Shell Profile Setup
Bash (~/.bashrc)
Zsh (~/.zshrc)
Fish (~/.config/fish/config.fish)
Debugging Environment Variables
View All Gonzo Variables
Test Configuration
Clear All Settings
Precedence Examples
Understanding how different configuration methods interact:
Example 1: Command Line Overrides Env Var
Example 2: Env Var Overrides Config File
Example 3: Full Precedence Chain
Security Considerations
API Keys
Never commit API keys:
Use environment-specific keys:
File Permissions
Protect your shell profile:
Kubernetes Secrets
Store sensitive values in secrets:
Troubleshooting
Variable Not Applied
Check if set:
Check for typos:
Check for overrides:
AI Not Working
Check API key:
Check API base:
Test connectivity:
OTLP Receiver Not Starting
Check if enabled:
Check port conflicts:
Best Practices
Use shell profiles: Set persistent defaults in
~/.bashrcor~/.zshrcSeparate environments: Use different values for dev/prod
Secure API keys: Never commit keys to version control
Document setup: Comment your environment configuration
Test changes: Verify variables are applied correctly
Use defaults: Only override what you need to change
Related Documentation
Configuration Schema - Configuration file reference
CLI Reference - Command line options
AI Integration - AI provider setup
Security: Never expose API keys in logs, screenshots, or public repositories. Use environment variables or secrets management.
_FILES="/var/log/nginx/access.log,/var/log/nginx/error.log" gonzo ```
GONZO_FOLLOW
Type: Boolean (true or false)
Default: false
Description: Follow log files in real-time
Example:
Performance Settings
GONZO_UPDATE_INTERVAL
Type: Duration string
Default: "1s"
Valid values: Go duration format (e.g., 500ms, 2s, 5s)
Description: Dashboard update frequency
Common values:
"500ms"- Very responsive"1s"- Default, good balance"2s"- Reduced CPU usage"5s"- Low resource usage
GONZO_LOG_BUFFER
Type: Integer
Default: 1000
Valid range: 1 to 100000
Description: Maximum log entries in buffer
Guidelines:
Low volume (
<100 logs/sec): 500-1000Medium volume (
100-1000 logs/sec): 1000-5000High volume (
>1000 logs/sec): 5000-10000
GONZO_MEMORY_SIZE
Type: Integer
Default: 10000
Valid range: 100 to 1000000
Description: Maximum words tracked for frequency analysis
Guidelines:
Minimal: 5000
Standard: 10000 (default)
Extended: 15000-20000
Maximum: 50000+
AI Configuration
GONZO_AI_MODEL
Type: String
Default: "" (auto-select)
Description: AI model for log analysis
OTLP Receiver
GONZO_OTLP_ENABLED
Type: Boolean (true or false)
Default: false
Description: Enable OTLP log receiver
GONZO_OTLP_GRPC_PORT
Type: Integer
Default: 4317
Valid range: 1024 to 65535
Description: gRPC receiver port
GONZO_OTLP_HTTP_PORT
Type: Integer
Default: 4318
Valid range: 1024 to 65535
Description: HTTP receiver port
Display Settings
GONZO_SKIN
Type: String
Default: "default"
Valid values: Any installed skin name
Description: Color scheme/theme
Last updated