Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
X

xberg

> 编程语言
Open source

A polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured data from 101 formats (115 file extensions) plus cod

8.7K stars0 likes2 views
WebsiteGitHub

About

A polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured data from 101 formats (115 file extensions) plus cod

Xberg

Xberg is the next iteration of Kreuzberg. Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line.


What you get

Point Xberg at anything — a PDF, a spreadsheet, a scanned image, an audio file, a URL, an archive, a source tree — and get back clean, structured content you can use right away. One core does the format detection, reading, and extraction, so you don't assemble a pipeline yourself. Call it from Rust, Python, Node.js, Go, Java, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, WASM, Kotlin, or C FFI, and run it as a library, CLI tool, REST API, or MCP server.

Capability What you get
107 document formats PDFs, Office, images, HTML, email, e-books, scientific publications, and structured data across 141 file extensions, with intelligent MIME detection and bounded extraction controls.
URLs & the web Point Xberg at an http(s) URL — it fetches and extracts a single document, or crawls and follows links (Auto / Document / Crawl modes via the crawlberg engine). Requires the url-ingestion feature.
Audio & video transcription Speech-to-text from MP3, M4A, WAV, WebM, and MP4 tracks via Whisper ONNX (tiny → large-v3). Requires the transcription feature.
Archives, traversed List and recursively extract nested .zip, .tar, .gz, .7z — documents inside documents — guarded by zip-bomb, compression-ratio, and nesting-depth limits.
OCR on demand Tesseract, PaddleOCR, Candle, or VLM backends — fallback chains, confidence scores, language auto-detection, extensible via plugins.
Layout & tables ML layout models (PP-DocLayout-V3, RT-DETR) and table structure (TATR, SLANet) reconstruct reading order and cell grids for clean Markdown.
Code intelligence Functions, classes, imports, symbols, docstrings from 371 programming languages. Syntax-aware chunking for RAG pipelines.
Embeddings & search Local (ONNX) or provider-hosted embeddings (165 providers via liter-llm), sparse and late-interaction, cross-encoder reranking.
Enrichment NER, keyword extraction (YAKE/RAKE), summarization, translation, redaction, page classification, QR detection, language detection, token reduction (TOON).
Structured extraction Schema-driven JSON straight from any document via local (Ollama, LM Studio, vLLM) or hosted LLMs — no prompt engineering.
6 output formats Plain text, Markdown, Djot, HTML, JSON tree, or Docling DocTags, plus registered custom renderers.
Runs anywhere Library, CLI (14 commands), REST API (xberg serve), MCP server, Docker, Helm — CPU by default, no GPU required. Content-hash caching, parallel batch, per-file timeouts.

Capabilities marked requires a feature are Cargo feature flags on the core crate (url-ingestion, transcription, reranker, layout/ORT). Prebuilt language packages and the Docker image bundle the common set; a from-source build enables only what you select.


Installation

Language Packages

Python
bash
pip install xberg

See Python README for full documentation.

Node.js / TypeScript
bash
npm install @xberg-io/xberg

See Node.js README for full documentation.

Rust
bash
cargo add xberg

See Rust README for full documentation.

Go
bash
go get github.com/xberg-io/xberg/packages/go@latest

⚠️ The repository root is not a Go module — go get github.com/xberg-io/xberg will fail. Always target the /packages/go subdirectory as shown above.

See Go README for full documentation.

Java

Available on Maven Central as io.xberg:xberg. See Java README for the dependency snippet.

C#
bash
dotnet add package XbergIo.Xberg

See C# README for full documentation.

Ruby
bash
gem install xberg

See Ruby README for full documentation.

PHP
bash
composer require xberg-io/xberg

See PHP README for full documentation.

Elixir

Add {:xberg, "~> 1.0"} to your mix.exs dependencies. See Elixir README for full documentation.

WebAssembly
bash
npm install @xberg-io/xberg-wasm

See WebAssembly README for full documentation.

Kotlin (Android)

Available on Maven Central as io.xberg:xberg-android. See Kotlin README for the dependency snippet.

Swift

Add via Swift Package Manager. See Swift README for full documentation.

Dart / Flutter
bash
dart pub add xberg

See Dart README for full documentation.

Zig

Add via zig fetch. See Zig README for full documentation.

C/C++ (FFI)

Build from source as part of this workspace. See C (FFI) README for full documentation.

CLI & Deployment

CLI Tool
bash
brew install xberg-io/tap/xberg

Windows users can install the same binary through Scoop:

powershell
scoop bucket add xberg https://github.com/xberg-io/scoop-bucket
scoop install xberg

14 commands: extract, batch, detect, formats, version, cache, tree-sitter, doctor, serve, mcp, api, embed, chunk, and completions.

See CLI usage guide for detailed documentation.

Docker
bash
docker pull ghcr.io/xberg-io/xberg:latest

Run in API, CLI, or MCP modes. See Docker guide for examples.

REST API Server
bash
xberg serve --host 0.0.0.0 --port 8000

One POST endpoint handles all formats. Returns JSON or Markdown. Stream large files. See API server guide.

MCP Server
bash
xberg mcp --transport stdio

9 tools (extract, extract_batch, detect_mime_type, cache_stats, list_formats, cache_clear, get_version, cache_manifest, cache_warm). 3 prompts (extract_document, extract_with_ocr, semantic_search). 4 resources (formats, models, OCR languages, embedding presets).

Add to Claude Desktop or Cursor:

json
{
  "mcpServers": {
    "xberg": { "command": "xberg", "args": ["mcp"] }
  }
}

See MCP integration guide.

AI Coding Assistants

Install the Xberg plugin from xberg-io/xberg. Ships extraction APIs, OCR backends, configuration, and language conventions.

Claude Code
/plugin marketplace add xberg-io/xberg
/plugin install xberg@xberg
Codex CLI
/plugins add https://github.com/xberg-io/xberg

Search for xberg and select Install Plugin.

Cursor

Settings → Plugins → Add from URL → https://github.com/xberg-io/xberg, then select xberg.

Gemini CLI
gemini extensions install https://github.com/xberg-io/xberg
Factory Droid
droid plugin marketplace add https://github.com/xberg-io/xberg
droid plugin install xberg@xberg
GitHub Copilot CLI
copilot plugin marketplace add https://github.com/xberg-io/xberg
copilot plugin install xberg@xberg
opencode

Add to opencode.json:

json
{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@xberg-io/opencode-xberg"]
}

Quick Start

Extract text from a document:

rust
use xberg::{extract, ExtractInput, ExtractionConfig};

#[tokio::main]
async fn main() -> xberg::Result<()> {
    let config = ExtractionConfig::default();
    let output = extract(
        ExtractInput::from_uri("document.pdf"),
        &config
    ).await?;

    println!("{}", output.results[0].content);
    Ok(())
}

Common use cases — see Quick start guide for language-specific examples, OCR, batch processing, and API configuration.


Capabilities

Full feature list

Supported File Formats (107 formats · 141 file extensions · 56 MIME aliases)

107 formats across 140 unique file extensions, with 56 compatibility MIME aliases, intelligent format detection, and comprehensive metadata extraction.

Office Documents

Category Formats Capabilities
Word Processing .docx, .docm, .doc, .dotx, .dotm, .dot, .odt, .pages, .wpd, .wp, .wp5, .wp6 Full text, tables, images, metadata, styles
Spreadsheets .xlsx, .xlsm, .xlsb, .xls, .xla, .xlam, .xltm, .xltx, .xlt, .ods, .numbers Sheet data, formulas, cell metadata, charts
Presentations .pptx, .pptm, .ppt, .pps, .ppsx, .potx, .potm, .pot, .odp, .key Slides, speaker notes, images, metadata
PDF .pdf Text, tables, images, metadata, OCR support
eBooks .epub, .fb2 Chapters, metadata, embedded resources
Database .dbf, .sqlite, .sqlite3, .db, .gpkg, .gpkx Bounded table extraction, schema metadata, GeoPackage detection
Hangul .hwp, .hwpx Korean document format, text extraction

Images (OCR-Enabled)

Category Formats Features
Raster .png, .jpg, .jpeg, .gif, .webp, .bmp, .tiff, .tif OCR, table detection, EXIF metadata, dimensions, color space
Advanced .jp2, .jpg2, .j2c, .j2k, .jpc, .jbig2, .jb2, .pnm, .pbm, .pgm, .ppm OCR via pure-Rust JPEG2000 decoder, JBIG2 support, table detection
HEIC family `.he

Issues· 29 open

View all issuesOpen on GitHub
  • #1968

    bug: DBF: row values come out in a random column order

    Updated Sep 29, 2026
  • #1943

    feat(renderer): render extraction output as PDF

    enhancementP2Updated Sep 29, 2026
  • #1959

    bug: PDF: grouped table headings lose their column spans

    bugUpdated Sep 29, 2026
  • #1958

    bug: PDF: alignment instructions are lost or detached from spanning table cells

    bugUpdated Sep 29, 2026
  • #1957

    bug(ocr): widely spaced invoice rows truncate tables and lose quantity

    bugneeds-triageUpdated Sep 29, 2026
  • #1942

    feat(renderer): render extraction output as DOCX

    enhancementP2Updated Sep 29, 2026
  • #1952

    bug(ocr): one junk cell in a split amount column drops the whole scanned table

    bugP1Updated Sep 29, 2026
  • #1949

    fix(ocr): OCR drops a table when a split amount column has rule marks in it

    bugP1Updated Sep 29, 2026
  • #1948

    bug: PDF: table cell text joins and splits words while page text keeps the correct spacing

    bugUpdated Sep 28, 2026
  • #1946

    fix(ocr): a scanned table page with an unmapped text layer loses its table to block mode

    bugP1Updated Sep 28, 2026

> Tags

Rustbuncsharpdocument-intelligenceelixir

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言