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
Section titled “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.
brew trust xberg-io/tapbrew install xberg-io/tap/liter-llmcargo install liter-llm-cliOr grab the prebuilt binary from GitHub Releases via cargo-binstall:
cargo binstall liter-llm-clidocker pull ghcr.io/xberg-io/liter-llm:latestdocker run -p 4000:4000 \ -e LITER_LLM_MASTER_KEY=sk-your-key \ ghcr.io/xberg-io/liter-llmStart the proxy:
liter-llm api --config liter-llm-proxy.tomlOr the MCP server:
liter-llm mcp --transport stdioProxy Server docs MCP Server docs
Choose your language
Section titled “Choose your language”Requires Python 3.10+.
pip install liter-llmOr with uv:
uv add liter-llmRequires Node.js 18+.
pnpm add @xberg-io/liter-llmOr with npm / yarn:
npm install @xberg-io/liter-llmyarn add @xberg-io/liter-llmRequires Rust stable, edition 2024.
cargo add liter-llmRequires Go 1.26+.
go get github.com/xberg-io/liter-llm/packages/goRequires Java 25+ (Panama FFM).
Maven:
<dependency> <groupId>io.xberg.literllm</groupId> <artifactId>liter-llm</artifactId> <version>1.10.0</version></dependency>Gradle:
implementation("io.xberg.literllm:liter-llm:1.10.0")The generated Kotlin target is Android. JVM Kotlin applications should use the Java binding from Kotlin.
implementation("io.xberg.literllm:liter-llm-android:1.10.0")Requires .NET 10+.
dotnet add package XbergIo.LiterLlmRequires Ruby 3.2+.
gem install liter_llmOr add to your Gemfile:
gem "liter_llm"Requires PHP 8.2+.
composer require xberg-io/liter-llmRequires Elixir 1.14+ / OTP 25+. Add to mix.exs:
defp deps do [ {:liter_llm, "~> 1.7"} ]endThen run mix deps.get.
Requires Dart SDK 3.3+.
dart pub add liter_llmRequires macOS 13+ and Swift 6.0+. Add the release artifact bundle to Package.swift:
.binaryTarget( name: "LiterLlm", url: "https://github.com/xberg-io/liter-llm/releases/download/v1.10.0/LiterLlm-rs.artifactbundle.zip", checksum: "<CHECKSUM-FROM-RELEASE-NOTES>")Requires Zig 0.16+.
zig fetch --save https://github.com/xberg-io/liter-llm/archive/refs/tags/v1.10.0.tar.gzpnpm add @xberg-io/liter-llm-wasmBuild the shared library and C header from source:
git clone https://github.com/xberg-io/liter-llm.gitcd liter-llmcargo build --release -p liter-llm-ffiOutputs land in target/release/. The C header is generated by cbindgen.
API key setup
Section titled “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="..."Or pass the key at client construction:
from liter_llm import create_client
client = create_client(api_key="sk-...")import { createClient } from "@xberg-io/liter-llm";
const client = createClient("sk-...");use liter_llm::{ClientConfigBuilder, DefaultClient};
let config = ClientConfigBuilder::new("sk-...").build();let client = DefaultClient::new(config, None)?;Verify it works
Section titled “Verify it works”python -c "from liter_llm import create_client; print('ok')"node -e "import('@xberg-io/liter-llm').then(m => { m.createClient('test'); console.log('ok') })"cargo buildgo build ./...Building from source
Section titled “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 | shgit clone https://github.com/xberg-io/liter-llm.gitcd liter-llmtask buildNext steps
Section titled “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 165 runtime providers
- Configuration — timeouts, retries, base-URL overrides, TOML config