Skip to content

Installation

Kreuzberg ships native bindings for 12 languages and a standalone CLI. Pick your stack, run one command, and start extracting.

Every package includes prebuilt binaries for Linux (x86_64 / aarch64), macOS (Apple Silicon), and Windows — no compile step needed.

The fastest way to try Kreuzberg - no SDK, no code, just your terminal.

Terminal window
curl -fsSL https://raw.githubusercontent.com/kreuzberg-dev/kreuzberg-lts/main/scripts/install.sh | bash

CLI Usage API Server Guide



Most of the time you won’t need anything beyond the install command above. The table below only matters if you’re building from source or want OCR:

Dependency When you need it
AVX/AVX2 CPU instructions Required for ONNX Runtime features (PaddleOCR, layout detection, embeddings) on x86_64
Rust toolchain (rustup) Building any native binding from source
C/C++ compiler Building native bindings (Xcode CLI tools / build-essential / MSVC)
Tesseract OCR Optional — brew install tesseract / apt install tesseract-ocr
PDFium Auto-fetched during builds

The WASM package (@kreuzberg/wasm) has zero system dependencies.

Kreuzberg bundles a CPU-only ONNX Runtime — ML features (PaddleOCR, layout detection, embeddings) work out of the box on CPU.

For GPU acceleration, install a GPU-enabled ONNX Runtime and set ORT_DYLIB_PATH:

Platform Install Set ORT_DYLIB_PATH
Linux (CUDA) Download from ONNX Runtime releases export ORT_DYLIB_PATH=/path/to/libonnxruntime.so
Python (any OS) pip install onnxruntime-gpu Point at the pip package’s capi/ directory
macOS (CoreML) Works with bundled ORT — no extra setup needed

See AccelerationConfig and ORT_DYLIB_PATH for details.


For most languages the install command above is all you need. The sections below cover edge cases and alternative install methods where they come up.

Two npm packages target different runtimes:

Package Best for Performance
@kreuzberg/node Node.js, Bun — server-side apps Native (100%)
@kreuzberg/wasm Browsers, Deno, Cloudflare Workers WASM (~60-80%)

Both work with pnpm (pnpm add) and yarn (yarn add) as well.

Supported runtimes: Chrome 74+, Firefox 79+, Safari 14+, Edge 79+, Node.js 22+, Deno 1.35+, Cloudflare Workers.

<dependency>
<groupId>dev.kreuzberg</groupId>
<artifactId>kreuzberg</artifactId>
<version>4.10.2</version>
</dependency>

Requires Java 25+ (FFM/Panama API). Native libraries are bundled in the JAR.

Add to mix.exs:

def deps do
[
{:kreuzberg, "~> 4.0"}
]
end
Terminal window
mix deps.get

Ships prebuilt NIF binaries via RustlerPrecompiled. Falls back to compiling from source if no prebuilt matches your platform (requires Rust).

Terminal window
go get github.com/kreuzberg-dev/kreuzberg-lts/v4@latest

Enable features selectively in Cargo.toml:

Cargo.toml
[dependencies]
kreuzberg = { version = "4", features = ["tokio-runtime"] }
# Optional features: pdf, ocr, chunking

Build the FFI library from source:

Terminal window
cargo build --release -p kreuzberg-ffi

This produces libkreuzberg_ffi.a and a header at crates/kreuzberg-ffi/kreuzberg.h. Link into your project:

HEADER_DIR = path/to/crates/kreuzberg-ffi
LIBDIR = path/to/target/release
CFLAGS = -Wall -Wextra -I$(HEADER_DIR)
LDFLAGS = -L$(LIBDIR) -lkreuzberg_ffi -lpthread -ldl -lm
my_app: my_app.c
$(CC) $(CFLAGS) -o $@ $< $(LDFLAGS)

API Reference →


Working on the Kreuzberg repo itself:

Terminal window
task setup # installs all language toolchains
task lint # linters across all languages
task dev:test # full test suite

See Contributing for conventions and expectations.