Configuration precedence
When you use the Anthropic provider (the default), llmwiki resolves credentials in this order:- Shell environment variables or a
.envfile in your project directory - Claude Code settings fallback -
~/.claude/settings.json→envblock - Built-in provider defaults (where applicable)
llmwiki compile without exporting a single variable.
Providers
- Anthropic (Default)
- Claude Agent SDK
- OpenAI Codex CLI
- OpenAI-Compatible
- Ollama
- GitHub Copilot
- OrcaRouter
- Atlas Cloud
The Anthropic provider uses the official Zero-export usage with Claude CodeIf
@anthropic-ai/sdk to call Claude directly. It is the default when LLMWIKI_PROVIDER is unset.AuthenticationSet either ANTHROPIC_API_KEY or ANTHROPIC_AUTH_TOKEN - either one satisfies authentication. You do not need both.ANTHROPIC_BASE_URL accepts any valid HTTP or HTTPS URL. Claude-style path endpoints such as https://api.example.com/coding/ are supported; trailing slashes are normalized automatically.ExampleANTHROPIC_API_KEY, ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_BASE_URL are not set in your shell or .env, llmwiki automatically reads Anthropic-compatible values from the env block in ~/.claude/settings.json. That covers:ANTHROPIC_API_KEYANTHROPIC_AUTH_TOKENANTHROPIC_BASE_URLANTHROPIC_MODEL
The Anthropic provider delegates embeddings to the Voyage API. Set
VOYAGE_API_KEY to enable semantic search with llmwiki query. Without it, query falls back to lexical ranking. To route embeddings to a different backend instead, set LLMWIKI_EMBEDDING_PROVIDER - see Environment Variables.Per-concept prompt budget
When many sources contribute to the same compiled concept, llmwiki enforces a character cap on the combined source content sent to the LLM so no single concept blows past the model’s context window. Each contributing source gets a fair share when truncation kicks in. SetLLMWIKI_PROMPT_BUDGET_CHARS to control the cap. The default is 200000 (~50k tokens), which fits modern context windows with headroom. Raise it for larger-context models; lower it for small-context local models.
Output language
Generated wiki content defaults to whatever language the model produces from the source material - typically English. You can override this two ways:LLMWIKI_OUTPUT_LANG- applies to every prompt the compile and query pipelines make. For example:zh-CN,Chinese,ja,Japanese.--lang <code>onllmwiki compileorllmwiki query- same effect, scoped to one invocation. Wins over the env var.
For a complete listing of every environment variable llmwiki reads, see the Environment Variables reference.