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
# For OpenAI (default, can omit)
export OPENAI_API_BASE="https://api.openai.com/v1"
# For LM Studio (MUST include /v1)
export OPENAI_API_BASE="http://localhost:1234/v1"
# For Ollama (NO /v1 suffix)
export OPENAI_API_BASE="http://localhost:11434"
# For custom OpenAI-compatible API
export OPENAI_API_BASE="https://your-api.com/v1"
# Using Ollama for AI features
export OPENAI_API_KEY="ollama"
export OPENAI_API_BASE="http://localhost:11434"
export GONZO_AI_MODEL="llama3"
export GONZO_FILES="/var/log/app.log"
export GONZO_FOLLOW="true"
# Using LM Studio for AI features
export OPENAI_API_KEY="local-key"
export OPENAI_API_BASE="http://localhost:1234/v1" # Note: /v1 required
export GONZO_AI_MODEL="" # Auto-select
export GONZO_FILES="/var/log/app.log"
# Gonzo Configuration
export GONZO_FILES="/var/log/app.log"
export GONZO_FOLLOW="true"
export GONZO_SKIN="dracula"
export GONZO_UPDATE_INTERVAL="2s"
# OpenAI Configuration
export OPENAI_API_KEY="sk-your-key-here"
# Optional: Add completion
if [ -f ~/.gonzo-completion.bash ]; then
source ~/.gonzo-completion.bash
fi
# Gonzo Configuration
export GONZO_FILES="/var/log/app.log"
export GONZO_FOLLOW="true"
export GONZO_SKIN="nord"
export GONZO_UPDATE_INTERVAL="2s"
# OpenAI Configuration
export OPENAI_API_KEY="sk-your-key-here"
# Optional: Add completion
if [ -f ~/.gonzo-completion.zsh ]; then
source ~/.gonzo-completion.zsh
fi
# Gonzo Configuration
set -x GONZO_FILES "/var/log/app.log"
set -x GONZO_FOLLOW "true"
set -x GONZO_SKIN "monokai"
set -x GONZO_UPDATE_INTERVAL "2s"
# OpenAI Configuration
set -x OPENAI_API_KEY "sk-your-key-here"
# Show all GONZO_* variables
env | grep GONZO
# Show all OpenAI variables
env | grep OPENAI
# Show all relevant variables
env | grep -E '(GONZO|OPENAI|TERM|LANG)'
# Print configuration without starting Gonzo
gonzo --help
# Or check specific values
echo "Files: $GONZO_FILES"
echo "Follow: $GONZO_FOLLOW"
echo "Interval: $GONZO_UPDATE_INTERVAL"
echo "API Key: ${OPENAI_API_KEY:0:10}..." # Show only first 10 chars
# ❌ BAD - Don't commit to version control
export OPENAI_API_KEY="sk-actual-key"
# ✅ GOOD - Use secrets management
export OPENAI_API_KEY="${OPENAI_KEY_FROM_VAULT}"
# ✅ GOOD - Read from secure file
export OPENAI_API_KEY=$(cat ~/.secrets/openai_key)
# Development
export OPENAI_API_KEY="sk-dev-key"
# Production
export OPENAI_API_KEY="sk-prod-key"