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
- Ollama (local):
/provider ollama· fully on-device, free. - OpenRouter:
/provider openrouter· Kimi, GPT, Gemini, Grok, DeepSeek with your key. - Self-hosted:
/provider https://host:8000/v1· any OpenAI-compatible endpoint.
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
| Variable | Purpose |
|---|---|
| OPENROUTER_API_KEY | Default OpenRouter key for cloud models. |
| LLM_API_KEY / LLM_BASE_URL / LLM_MODEL | Pin any OpenAI-compatible endpoint (self-hosted vLLM, llama.cpp, SGLang, TGI). |
| LLM_FALLBACK_MODELS | Comma-separated failover list if the primary model is unavailable. |
| LUCID_TRAIN_HOME | Config directory (default ~/.lucid-train). |
| LUCID_UPDATE_URL | Override the update-check source (defaults to the PyPI JSON API). |
| LUCID_NO_UPDATE_CHECK | Set to disable the startup update check entirely. |