Configuration

Lucid Train works with zero configuration. Anything you set is stored locally in ~/.lucid-train/config.toml and survives reinstalls · keys are never sent anywhere except the model provider you choose.

API keys

Run /apikey with no argument and paste your key into the masked prompt · it saves to your config automatically. Or pass it once:

shell
/apikey sk-or-v1-...

You can also export it before launching:

shell
$ export OPENROUTER_API_KEY=sk-or-v1-...
$ lucid-train

Config file

~/.lucid-train/config.toml · edits merge, so hand-editing one key never clobbers the rest:

~/.lucid-train/config.toml
model = "kimi-k2.7-code"
provider = "openrouter"
approvals = "auto"
max_iterations = 150
update_check = true
# Connect an MCP server
[mcp_servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]

Providers

Project memory

When working in a repo, the agent maintains .lucid/knowledge.md (architecture notes, gotchas, working commands) and .lucid/CHANGELOG.md, and reads them back in future sessions. Commit them to share context with your team.

Environment variables

VariablePurpose
OPENROUTER_API_KEYDefault OpenRouter key for cloud models.
LLM_API_KEY / LLM_BASE_URL / LLM_MODELPin any OpenAI-compatible endpoint (self-hosted vLLM, llama.cpp, SGLang, TGI).
LLM_FALLBACK_MODELSComma-separated failover list if the primary model is unavailable.
LUCID_TRAIN_HOMEConfig directory (default ~/.lucid-train).
LUCID_UPDATE_URLOverride the update-check source (defaults to the PyPI JSON API).
LUCID_NO_UPDATE_CHECKSet to disable the startup update check entirely.