Reference Reference · Information-oriented
Configuration Every environment variable BINA reads, its default and its effect.
Configuration is the process environment. The API also loads an optional, gitignored .env.local from the repository root; variables already set in the process win. Never commit an env file.
note
Most variables keep the CLEARY_ prefix from the repository's original name. They configure BINA; the prefix is historical.
# Server
Variable Default Effect PORT8787API port. Also the Vite proxy target. CLEARY_DATA_DIR./dataRoot for events.jsonl, raw/ and reference.db. One API process per directory. CLEARY_OFFLINEoff 1 disables outbound fetches and the scheduler; ingest and extraction routes answer 409. Tests set this.CLEARY_REFRESH_HOURS6Scheduled refresh window. 0 or negative disables the timer. CLEARY_REFRESH_COMPETITIONoff 1 includes DG COMP datasets in the scheduled refresh.CLEARY_WEB_PORT5173Console dev-server port used by npm run dev.
# Security
Variable Default Effect CLEARY_ALLOWED_HOSTSloopback Extra comma-separated Host values. CLEARY_ALLOWED_ORIGINSVite origins Extra comma-separated browser origins. CLEARY_OPERATOR_TOKENSunset operator:token pairs, comma-separated. When set, writes must authenticate.CLEARY_REQUIRE_AUTHoff 1 requires operator auth on every POST/DELETE.BINA_REVIEW_PASSWORDunset Shared password checked against the X-Bina-Password header. CLEARY_WEBHOOK_ALLOW_PRIVATEoff 1 allows http:// and private-address webhook targets. Local testing only.
Variable Default Effect CLEARY_LLM_PROVIDERautoauto, gateway, openrouter, mistral, openai, openai-compatible or off.CLEARY_LLM_BASE_URLunset Any OpenAI-compatible endpoint, e.g. http://127.0.0.1:11434/v1. Pair with CLEARY_LLM_MODEL. CLEARY_LLM_API_KEYunset Key for CLEARY_LLM_BASE_URL, or override for a preset. OPENROUTER_API_KEYunset OpenRouter preset. Also needed for claimant research. MISTRAL_API_KEYunset Mistral preset. OPENAI_API_KEYunset OpenAI preset. AI_GATEWAY_API_KEYunset Vercel AI Gateway. VERCEL_OIDC_TOKEN also works. CLEARY_LLM_MODELanthropic/claude-sonnet-5.5 (gateway)Model ID. Restart after changing. CLEARY_EXTRACTORAI SDK dspy routes extraction through the Python sidecar.CLEARY_DSPY_MODEL, CLEARY_DSPY_API_BASE, CLEARY_DSPY_PYTHONsidecar defaults DSPy sidecar overrides.
# Signal sources
Variable Effect JUDILIBRE_CLIENT_ID, JUDILIBRE_CLIENT_SECRETEnable Judilibre (PISTE) as the court-search source in the DMA method. JUDILIBRE_OAUTH_URL, JUDILIBRE_API_URLOverride endpoints, e.g. the PISTE sandbox.
# npm scripts
Command What it does npm run devAPI and console together. npm run dev:apiAPI only. npm run dev:webConsole only. npm run ingest [lists|competition|extra|all]One-shot snapshot ingest. Do not run against a data directory the API is ingesting into. npm testNode's built-in test runner over test/*.test.mjs. npm run typechecktsc --noEmit for the console.npm run checkTypecheck, tests and console build.
On this page