Reference

Environment variables

Codifix reads values from the process environment, from codifix.env files next to config files, and from TOML config. Environment overrides use the CODIFIX__SECTION__KEY shape.

Common variables

VariableRequiredUsed for
CODIFIX_CONFIGOptionalSame as --config <path> for commands that load app config.
CODIFIX_PROFILEOptionalForce dev or prod; normally inferred from binary path.
CODIFIX_WRITER_IDOptionalSame as --writer-id / --agent-id: an advisory activity label. The authenticated principal remains authoritative.
CODIFIX__SERVICE__API_TOKENUsually generatedService API token when supplied through env instead of TOML.
CODIFIX_CLIENT_TOKENMulti-user non-browser clientsScoped mlt_... token used by CLI, TUI, watcher, and stdio MCP; takes precedence over the legacy service token.
CODIFIX_OIDC_CLIENT_SECRETMulti-user browser loginDefault environment variable containing the Authentik confidential-client secret. The name is configurable with auth.oidc.client_secret_env.
CODIFIX__DATABASE__URLSometimesPostgreSQL URL override.
OPENAI_API_KEYWhen configuredOpenAI or OpenAI-compatible LLM/embedding provider key.
VOYAGE_API_KEYWhen configuredVoyage embedding provider key.
COHERE_API_KEYWhen configuredCohere embedding provider key.
GEMINI_API_KEYWhen configuredGemini embedding provider key.
CODIFIX_TEST_DATABASE_URLTest onlyPgvector-backed integration test database.
CODIFIX_TEST_REQUIRE_DBTest onlyMake DB-backed tests fail instead of skip when the test DB is unavailable.

DATABASE_URL is useful for psql commands and some setup snippets, but Codifix's own config field is [database].url or CODIFIX__DATABASE__URL.

Provider variables

Provider keys are indirect. The TOML api_key_env value names the environment variable the service reads:

[[embeddings.backends]]
name = "voyage-code"
provider = "voyage"
api_key_env = "VOYAGE_API_KEY"
model = "voyage-code-3"
VOYAGE_API_KEY=pa-...

For local Ollama, api_key_env = "" is normally correct.

Config override examples

CODIFIX_PROFILE=dev cargo run --bin codifix -- status --project memory
CODIFIX__DATABASE__URL='postgres://codifix:secret@127.0.0.1:5432/codifix' codifix doctor
CODIFIX_WRITER_ID=codex-docs codifix remember --project memory --note "Updated reference docs"
CODIFIX_CLIENT_TOKEN='mlt_...' codifix auth whoami

Diagnostics

codifix doctor
codifix status --project <project-slug> --json
codifix embeddings list

codifix doctor is the safest way to discover missing provider variables without printing secret values.

Next

Read Global config.

© 2026 Olivier Van Acker (3vilM33pl3). Codifix is AGPL-3.0-or-later with commercial licensing available.