Skip to content

lf env

Show the status of all LenserFight environment variables. Helps diagnose missing configuration before running commands that depend on specific env vars.

bash
lf env [--json] [--reveal]

Flags

FlagTypeDefaultDescription
--jsonbooleanfalseOutput as structured JSON
--revealbooleanfalseShow full secret values (use with caution in trusted terminals only)

What it checks

VariablePurpose
SUPABASE_URLLocal or cloud Supabase project URL
SUPABASE_ANON_KEYPublic anon key for unauthenticated requests
SUPABASE_SERVICE_ROLE_KEYService role key for admin operations
LENSERFIGHT_API_URLOverride for the cloud API endpoint
LENSERFIGHT_GATEWAY_URLLocal gateway URL
OPENAI_API_KEYOpenAI BYOK key
ANTHROPIC_API_KEYAnthropic BYOK key
GOOGLE_AI_API_KEYGoogle AI BYOK key
MISTRAL_API_KEYMistral BYOK key
OLLAMA_BASE_URLOllama local inference server URL
LF_LOCALForce local mode for this session
LF_DEBUGEnable verbose debug output
LF_LOCALEOverride locale for CLI messages (en, tr, es, fr, de, zh)
LF_QUIETSuppress all decorative output (Lenser quotes, etc.)
NO_COLORDisable ANSI color output
CIDetected CI environment — disables decorative output

BYOK provider status

The command also shows whether BYOK (Bring Your Own Key) keys are configured for each AI provider. BYOK keys are set via lf byok setup and stored encrypted.

JSON output

bash
lf env --json
json
{
  "variables": [
    { "name": "SUPABASE_URL", "status": "set", "value": "http://127.0.0.1:54321", "source": "env" },
    { "name": "OPENAI_API_KEY", "status": "missing", "value": "", "source": "" }
  ],
  "config": {
    "present": true,
    "mode": "local",
    "supabaseUrl": "http://127.0.0.1:54321"
  },
  "byok": {
    "openai": true,
    "anthropic": false,
    "google": false,
    "mistral": false
  }
}

Examples

bash
# Check environment status
lf env

# JSON for CI assertions
lf env --json | jq '.byok.openai'

# Show full secret values (trusted terminal only)
lf env --reveal