Installation¶
Liter-llm ships prebuilt packages for every supported language plus a CLI and Docker image for the proxy + MCP server. Pick your stack, run one command, and start calling models.
Prebuilt binaries cover Linux (x86_64 / aarch64), macOS (Apple Silicon), and Windows. The Rust toolchain is only needed when building from source.
CLI / Docker¶
The CLI runs the proxy server and the MCP tool server. You don't need it if you only use a language binding.
Start the proxy:
Or the MCP server:
Proxy Server docs MCP Server docs
Choose your language¶
Requires Node.js 18+.
Or with npm / yarn:
Requires Java 25+ (Panama FFM).
Maven:
<dependency>
<groupId>io.xberg.literllm</groupId>
<artifactId>liter-llm</artifactId>
<version>1.9.0-rc.1</version>
</dependency>
Gradle:
The generated Kotlin target is Android. JVM Kotlin applications should use the Java binding from Kotlin.
Requires Elixir 1.14+ / OTP 25+. Add to mix.exs:
Then run mix deps.get.
Requires macOS 13+ and Swift 6.0+. Add the release artifact bundle to Package.swift:
Requires Zig 0.16+.
API key setup¶
Set the environment variable matching the provider you call:
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="..."
export GROQ_API_KEY="gsk_..."
export MISTRAL_API_KEY="..."
export AWS_ACCESS_KEY_ID="..."
export AWS_SECRET_ACCESS_KEY="..."
You only need one key
liter-llm resolves the provider from the model prefix (openai/gpt-4o, anthropic/claude-...) and picks the matching environment variable automatically.
Or pass the key at client construction:
Don't hard-code keys in source files
Use environment variables or a secret manager. The Rust core wraps keys in secrecy::SecretString so they never appear in Debug output or logs.
Verify it works¶
Building from source¶
If a prebuilt binary is not available for your platform, build from source with stable Rust (edition 2024):
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
git clone https://github.com/xberg-io/liter-llm.git
cd liter-llm
task build
Next steps¶
- Chat & Streaming — make your first API call
- MCP & IDE Integration — wire liter-llm into VS Code, Claude Desktop, Cursor, Zed
- Provider Registry — browse all 143 runtime providers
- Configuration — timeouts, retries, base-URL overrides, TOML config