Fastify + single-page frontend on shared @nexusai/core. Reads the same SQLite journal and media dir. Features: usage stats (by provider/capability/day), content gallery (image/audio/video with local file serving + path-traversal guard), provider CRUD with encrypted keys (masked in UI), enable/disable, set-default, and real key validation via zero-cost /media/models call. Adds Journal.getById and NordRouterMediaProvider.checkKey to core.
50 lines
2.0 KiB
Bash
50 lines
2.0 KiB
Bash
# --- NordRouter ---
|
|
# API key from your NordRouter account (starts with sk-)
|
|
NORDROUTER_API_KEY=sk-your-key-here
|
|
NORDROUTER_BASE_URL=https://nordrouter.com
|
|
|
|
# --- NexusAI general ---
|
|
NEXUS_DEFAULT_PROVIDER=nordrouter
|
|
# Where generated media files and the SQLite journal are stored
|
|
NEXUS_MEDIA_DIR=./media-output
|
|
# Optional: custom SQLite path (defaults to <media dir>/nexus.sqlite)
|
|
# NEXUS_DB_PATH=./media-output/nexus.sqlite
|
|
# Max bytes for embedding image/audio directly in MCP results (default 10MB)
|
|
NEXUS_EMBED_MAX_BYTES=10485760
|
|
# Log level: debug | info | warn | error (logs go to stderr)
|
|
NEXUS_LOG_LEVEL=info
|
|
|
|
# --- Managed provider keys (optional, for admin-managed keys) ---
|
|
# Master secret used to encrypt provider API keys stored in SQLite (AES-256-GCM).
|
|
# Accepts a 64-char hex string or any passphrase. NEVER stored in the DB.
|
|
# If unset, only env keys (e.g. NORDROUTER_API_KEY) are used.
|
|
# Generate: openssl rand -hex 32
|
|
# NEXUS_MASTER_KEY=
|
|
# Optional separate DB for the providers store (defaults to NEXUS_DB_PATH)
|
|
# NEXUS_PROVIDERS_DB_PATH=./media-output/nexus.sqlite
|
|
# Key precedence: <NAME>_API_KEY env > encrypted DB entry
|
|
|
|
# --- Local STT (faster-whisper via uv sidecar) ---
|
|
# Launcher: "uv" (recommended, auto-installs deps) or a python interpreter path
|
|
NEXUS_STT_PYTHON=uv
|
|
# Whisper size (tiny|base|small|medium|large-v3) OR an absolute path to a
|
|
# pre-downloaded CTranslate2 model directory
|
|
NEXUS_STT_MODEL=small
|
|
NEXUS_STT_DEVICE=auto # auto | cpu | cuda
|
|
NEXUS_STT_COMPUTE=auto # auto | int8 | float16
|
|
# Offline mode: require a locally present model (no downloads)
|
|
# NEXUS_STT_LOCAL_ONLY=1
|
|
# Cache dir for downloaded models
|
|
# NEXUS_STT_DOWNLOAD_ROOT=./models
|
|
# Optional custom sidecar path
|
|
# NEXUS_STT_SIDECAR=/abs/path/to/sidecar/stt_server.py
|
|
# HuggingFace mirror (for restricted networks)
|
|
# HF_ENDPOINT=https://hf-mirror.com
|
|
|
|
# --- Admin web UI (packages/admin) ---
|
|
NEXUS_ADMIN_HOST=127.0.0.1
|
|
NEXUS_ADMIN_PORT=4123
|
|
|
|
# --- Proxy (optional) ---
|
|
# NEXUS_HTTP_PROXY=http://proxy:8080
|