# ─── kx serve ────────────────────────────────────────────────────────────────

# Bearer token for all API requests to kx serve.
# Generate a strong token: openssl rand -hex 32
KERNEX_AUTH_TOKEN=

# Provider for all agent jobs.
# claude-code uses your subscription credentials (see CLAUDE_CREDENTIALS_PATH below).
# Set to: anthropic, openai, groq, mistral, deepseek, fireworks, or xai to use an API key instead.
KERNEX_PROVIDER=claude-code

# Override the default model for the chosen provider. Leave blank to use the provider default.
KERNEX_MODEL=

# Max concurrent agent jobs. Default: 8. Increase if your VPS has more cores.
KX_WORKERS=8

# ─── Claude subscription credentials ─────────────────────────────────────────

# Absolute path on the HOST machine to ~/.claude/.credentials.json
# This file is bind-mounted read-only into the container.
# Authenticate once with: claude auth login
# Then verify the file exists: ls -la ~/.claude/.credentials.json
CLAUDE_CREDENTIALS_PATH=/home/deploy/.claude/.credentials.json

# ─── Caddy (TLS + reverse proxy) ─────────────────────────────────────────────

# Your public domain — must have an A record pointing to this VPS.
DOMAIN=api.yourdomain.com

# Email address for Let's Encrypt certificate expiry notifications.
ACME_EMAIL=admin@yourdomain.com

# ─── API provider settings ────────────────────────────────────────────────────

# API key for the chosen provider (required for all providers except claude-code).
# The env var name matches the provider: ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.
# kx also accepts a unified key via KERNEX_API_KEY (maps to the active provider).
KERNEX_API_KEY=

# Base URL override. Required for OpenAI-compatible proxies (e.g. LiteLLM, Ollama).
# Example: http://my-litellm:4000
KERNEX_BASE_URL=

# Provider-specific API keys (set the one matching KERNEX_PROVIDER):
# ANTHROPIC_API_KEY=
# OPENAI_API_KEY=
# GROQ_API_KEY=
# MISTRAL_API_KEY=
# DEEPSEEK_API_KEY=
# FIREWORKS_API_KEY=
# XAI_API_KEY=
# GEMINI_API_KEY=
# OPENROUTER_API_KEY=

# ─── Traefik compose only ─────────────────────────────────────────────────────

# Name of your existing Traefik Docker network (only needed for docker-compose.traefik.yml).
# Common values: traefik, proxy, web
TRAEFIK_NETWORK=traefik
