Configuration Reference

Configuration Reference

This document contains the complete configuration reference for Kodit. All configuration is done through environment variables.

AppContext

Global context for the kodit project. Provides a shared state for the app.

Environment VariableTypeDefaultDescription
DATA_DIRPath~/.kodit
DB_URLstr<lambda>()
LOG_LEVELstrINFO
LOG_FORMATLogFormatLogFormat.PRETTY
DISABLE_TELEMETRYboolFalse
EMBEDDING_ENDPOINT`EndpointNone`None
EMBEDDING_ENDPOINT_BASE_URL`strNone`None
EMBEDDING_ENDPOINT_MODEL`strNone`None
EMBEDDING_ENDPOINT_API_KEY`strNone`None
EMBEDDING_ENDPOINT_NUM_PARALLEL_TASKSint10Number of parallel tasks to use for the endpoint
EMBEDDING_ENDPOINT_SOCKET_PATH`strNone`None
EMBEDDING_ENDPOINT_TIMEOUTfloat60Request timeout in seconds
EMBEDDING_ENDPOINT_EXTRA_PARAMS`dictNone`None
EMBEDDING_ENDPOINT_MAX_TOKENSint8000Conservative token limit for the embedding model
ENRICHMENT_ENDPOINT`EndpointNone`None
ENRICHMENT_ENDPOINT_BASE_URL`strNone`None
ENRICHMENT_ENDPOINT_MODEL`strNone`None
ENRICHMENT_ENDPOINT_API_KEY`strNone`None
ENRICHMENT_ENDPOINT_NUM_PARALLEL_TASKSint10Number of parallel tasks to use for the endpoint
ENRICHMENT_ENDPOINT_SOCKET_PATH`strNone`None
ENRICHMENT_ENDPOINT_TIMEOUTfloat60Request timeout in seconds
ENRICHMENT_ENDPOINT_EXTRA_PARAMS`dictNone`None
ENRICHMENT_ENDPOINT_MAX_TOKENSint8000Conservative token limit for the embedding model
DEFAULT_SEARCHSearchprovider='sqlite'
DEFAULT_SEARCH_PROVIDERLiteralsqlite
PERIODIC_SYNCPeriodicSyncConfigenabled=True interval_seconds=1800 retry_attempts=3Periodic sync configuration
PERIODIC_SYNC_ENABLEDboolTrueEnable periodic sync
PERIODIC_SYNC_INTERVAL_SECONDSfloat1800Interval between periodic syncs in seconds
PERIODIC_SYNC_RETRY_ATTEMPTSint3Number of retry attempts for failed syncs
API_KEYSlist[]Comma-separated list of valid API keys (e.g. ‘key1,key2’)
REMOTERemoteConfigserver_url=None api_key=None timeout=30.0 max_retries=3 verify_ssl=TrueRemote server configuration
REMOTE_SERVER_URL`strNone`None
REMOTE_API_KEY`strNone`None
REMOTE_TIMEOUTfloat30.0Request timeout in seconds
REMOTE_MAX_RETRIESint3Maximum retry attempts
REMOTE_VERIFY_SSLboolTrueVerify SSL certificates
REPORTINGReportingConfiglog_time_interval=datetime.timedelta(seconds=5)Reporting configuration
REPORTING_LOG_TIME_INTERVALtimedelta0:00:05Time interval to log progress in seconds

Applying Configuration

There are two ways to apply configuration to Kodit:

  1. A local .env file (e.g. kodit --env-file .env serve)
  2. Environment variables (e.g. DATA_DIR=/path/to/kodit/data kodit serve)

How you specify environment variables is dependent on your deployment mechanism.

Docker Compose

For example, in docker compose you can use the environment key:

services:
  kodit:
    environment:
      - DATA_DIR=/path/to/kodit/data

Kubernetes

For example, in Kubernetes you can use the env key:

env:
  - name: DATA_DIR
    value: /path/to/kodit/data