All configuration is loaded from a .env file in the project root (or from actual environment variables).
| Variable | Description | Example |
|---|---|---|
OPENAI_API_KEY |
OpenAI API key for embeddings and chat | sk-proj-... |
REPOS_PATH |
Root directory containing repos to index (Docker only) | /Users/you/Desktop/Code |
REPOS_PATHis bind-mounted into the API container at the same absolute path, so the indexer can read your source files. Only needed when running via Docker (make docker-up).
| Variable | Description | Default |
|---|---|---|
DATABASE_URL |
Postgres connection string | postgresql://mycelium:mycelium@localhost:5433/mycelium |
EMBEDDING_MODEL |
OpenAI embedding model | text-embedding-3-small |
CHAT_MODEL |
OpenAI chat model | gpt-4o |
MAX_EMBEDDING_BATCH |
Max texts per embedding API call | 1000 |
MAX_CONTEXT_TOKENS |
Token budget for chat context assembly | 8000 |
MAX_AUTO_REINDEX_FILES |
File count threshold before requiring force reindex | 100 |
SERVER_PORT |
Go API server port | 8080 |
OPENAI_API_KEY=sk-proj-abc123...
REPOS_PATH=/Users/you/Desktop/Code
DATABASE_URL=postgresql://mycelium:mycelium@localhost:5433/myceliumNote:
DATABASE_URLdefaults tolocalhost:5433for local development (make dev). When running via Docker (make docker-up), the compose file overrides it to use the internal Docker network (db:5432) — you don't need to change it.
If OPENAI_API_KEY is empty:
- Indexing works but skips embedding — nodes are stored without vectors
- Semantic search returns 503 Service Unavailable
- Structural queries work normally (no embeddings needed)
- Chat returns 503 Service Unavailable
- MCP tools —
list_projectsanddetect_projectwork;explorereturns an error (requires embeddings)