Skip to content
Back to search

xberg

MarketplaceWorks with Claude CodeGitHub

Document intelligence for coding agents, by Kreuzberg, Inc.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/xberg-io/xberg with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/xberg-io/xberg'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/xberg-io--xberg/badge.svg)](/listings/xberg-io--xberg)

HTML

<a href="/listings/xberg-io--xberg"><img src="/api/listings/xberg-io--xberg/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Language Packages

<details open> <summary><strong>Python</strong></summary>

pip install xberg

See [Python README](https://github.com/xberg-io/xberg/tree/main/packages/python) for full documentation.

</details>

<details> <summary><strong>Node.js / TypeScript</strong></summary>

npm install @xberg-io/xberg

See [Node.js README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-node) for full documentation.

</details>

<details> <summary><strong>Rust</strong></summary>

cargo add xberg

See [Rust README](https://github.com/xberg-io/xberg/tree/main/crates/xberg) for full documentation.

</details>

<details> <summary><strong>Go</strong></summary>

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](https://github.com/xberg-io/xberg/tree/main/packages/go) for full documentation.

</details>

<details> <summary><strong>Java</strong></summary>

Available on Maven Central as `io.xberg:xberg`. See [Java README](https://github.com/xberg-io/xberg/tree/main/packages/java) for the dependency snippet.

</details>

<details> <summary><strong>C#</strong></summary>

dotnet add package XbergIo.Xberg

See [C# README](https://github.com/xberg-io/xberg/tree/main/packages/csharp) for full documentation.

</details>

<details> <summary><strong>Ruby</strong></summary>

gem install xberg

See [Ruby README](https://github.com/xberg-io/xberg/tree/main/packages/ruby) for full documentation.

</details>

<details> <summary><strong>PHP</strong></summary>

composer require xberg-io/xberg

See [PHP README](https://github.com/xberg-io/xberg/tree/main/packages/php) for full documentation.

</details>

<details> <summary><strong>Elixir</strong></summary>

Add `{:xberg, "~> 1.0"}` to your `mix.exs` dependencies. See [Elixir README](https://github.com/xberg-io/xberg/tree/main/packages/elixir) for full documentation.

</details>

<details> <summary><strong>WebAssembly</strong></summary>

npm install @xberg-io/xberg-wasm

See [WebAssembly README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-wasm) for full documentation.

</details>

<details> <summary><strong>Kotlin (Android)</strong></summary>

Available on Maven Central as `io.xberg:xberg-android`. See [Kotlin README](https://github.com/xberg-io/xberg/tree/main/packages/kotlin-android) for the dependency snippet.

</details>

<details> <summary><strong>Swift</strong></summary>

Add via Swift Package Manager. See [Swift README](https://github.com/xberg-io/xberg/tree/main/packages/swift) for full documentation.

</details>

<details> <summary><strong>Dart / Flutter</strong></summary>

dart pub add xberg

See [Dart README](https://github.com/xberg-io/xberg/tree/main/packages/dart) for full documentation.

</details>

<details> <summary><strong>Zig</strong></summary>

Add via `zig fetch`. See [Zig README](https://github.com/xberg-io/xberg/tree/main/packages/zig) for full documentation.

</details>

<details> <summary><strong>C/C++ (FFI)</strong></summary>

Build from source as part of this workspace. See [C (FFI) README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-ffi) for full documentation.

</details>

CLI & Deployment

<details> <summary><strong>CLI Tool</strong></summary>

brew install xberg-io/tap/xberg

Windows users can install the same binary through [Scoop](https://scoop.sh):

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](https://docs.xberg.io/cli/usage/) for detailed documentation.

</details>

<details> <summary><strong>Docker</strong></summary>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 15 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "name": "xberg",
  3. "description": "Document intelligence for coding agents, by Kreuzberg, Inc.",
  4. "owner": {
  5. "name": "Kreuzberg, Inc.",
  6. "email": "contact@xberg.io"
  7. },
  8. "plugins": [
  9. {
  10. "name": "xberg",
  11. "description": "Local document extraction: text, tables, metadata, images from 107 formats with optional OCR.",
  12. "source": "./plugin"
  13. }
  14. ]
  15. }
README.md · README · 753 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <!-- This file is auto-generated by alef — DO NOT EDIT. -->
  2. <!-- alef:hash:7812d9452cddd8171c4ad988ce665864dee9c28764013c8873bb1e0a1f339cba -->
  3. <!-- To regenerate: alef readme -->
  4. <!-- To verify freshness: alef verify -->
  5. <p align="center">
  6. <picture>
  7. <source media="(prefers-color-scheme: dark)" srcset="https://cdn.jsdelivr.net/gh/xberg-io/assets@v1/banner/readme-banner-dark.svg">
  8. <img alt="Xberg" width="420" src="https://cdn.jsdelivr.net/gh/xberg-io/assets@v1/banner/readme-banner-light.svg">
  9. </picture>
  10. </p>
  11. # Xberg
  12. <div align="center" style="display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 20px 0;">
  13. <a href="https://github.com/xberg-io/xberg/actions/workflows/ci-rust.yaml">
  14. <img src="https://github.com/xberg-io/xberg/actions/workflows/ci-rust.yaml/badge.svg?branch=main" alt="Rust CI">
  15. </a>
  16. <a href="https://codecov.io/gh/xberg-io/xberg">
  17. <img src="https://codecov.io/gh/xberg-io/xberg/branch/main/graph/badge.svg" alt="Coverage">
  18. </a>
  19. <a href="https://github.com/xberg-io/alef">
  20. <img src="https://img.shields.io/badge/built%20with-alef%20%D7%90-007ec6" alt="Built with alef">
  21. </a>
  22. <!-- Language Bindings -->
  23. <a href="https://crates.io/crates/xberg">
  24. <img src="https://img.shields.io/crates/v/xberg?label=Rust&color=007ec6" alt="Rust">
  25. </a>
  26. <a href="https://pypi.org/project/xberg/">
  27. <img src="https://img.shields.io/pypi/v/xberg?label=Python&color=007ec6" alt="Python">
  28. </a>
  29. <a href="https://www.npmjs.com/package/@xberg-io/xberg">
  30. <img src="https://img.shields.io/npm/v/@xberg-io/xberg?label=Node.js&color=007ec6" alt="Node.js">
  31. </a>
  32. <a href="https://www.npmjs.com/package/@xberg-io/xberg-wasm">
  33. <img src="https://img.shields.io/npm/v/@xberg-io/xberg-wasm?label=WASM&color=007ec6" alt="WASM">
  34. </a>
  35. <a href="https://central.sonatype.com/artifact/io.xberg/xberg">
  36. <img src="https://img.shields.io/maven-central/v/io.xberg/xberg?label=Java&color=007ec6" alt="Java">
  37. </a>
  38. <a href="https://github.com/xberg-io/xberg/tree/main/packages/go">
  39. <img src="https://img.shields.io/github/v/tag/xberg-io/xberg?label=Go&color=007ec6&filter=v1*" alt="Go">
  40. </a>
  41. <a href="https://www.nuget.org/packages/XbergIo.Xberg/">
  42. <img src="https://img.shields.io/nuget/v/XbergIo.Xberg?label=C%23&color=007ec6" alt="C#">
  43. </a>
  44. <a href="https://packagist.org/packages/xberg-io/xberg">
  45. <img src="https://img.shields.io/packagist/v/xberg-io/xberg?label=PHP&color=007ec6" alt="PHP">
  46. </a>
  47. <a href="https://rubygems.org/gems/xberg">
  48. <img src="https://img.shields.io/gem/v/xberg?label=Ruby&color=007ec6" alt="Ruby">
  49. </a>
  50. <a href="https://hex.pm/packages/xberg">
  51. <img src="https://img.shields.io/hexpm/v/xberg?label=Elixir&color=007ec6" alt="Elixir">
  52. </a>
  53. <a href="https://pub.dev/packages/xberg">
  54. <img src="https://img.shields.io/pub/v/xberg?label=Dart&color=007ec6" alt="Dart">
  55. </a>
  56. <a href="https://central.sonatype.com/artifact/io.xberg/xberg-android">
  57. <img src="https://img.shields.io/maven-central/v/io.xberg/xberg-android?label=Kotlin&color=007ec6" alt="Kotlin">
  58. </a>
  59. <a href="https://github.com/xberg-io/xberg/tree/main/packages/swift">
  60. <img src="https://img.shields.io/badge/Swift-SPM-007ec6" alt="Swift">
  61. </a>
  62. <a href="https://github.com/xberg-io/xberg/tree/main/packages/zig">
  63. <img src="https://img.shields.io/badge/Zig-package-007ec6" alt="Zig">
  64. </a>
  65. <a href="https://github.com/xberg-io/xberg/releases">
  66. <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C FFI">
  67. </a>
  68. <a href="https://github.com/xberg-io/xberg/pkgs/container/xberg">
  69. <img src="https://img.shields.io/badge/Docker-ghcr.io-007ec6?logo=docker&logoColor=white" alt="Docker">
  70. </a>
  71. <a href="https://docs.xberg.io/guides/kubernetes/">
  72. <img src="https://img.shields.io/badge/Helm-chart-007ec6?logo=helm&logoColor=white" alt="Helm chart">
  73. </a>
  74. <!-- Project Info -->
  75. <a href="https://github.com/xberg-io/xberg/blob/main/LICENSE">
  76. <img src="https://img.shields.io/badge/License-MIT-007ec6" alt="License">
  77. </a>
  78. <a href="https://docs.xberg.io">
  79. <img src="https://img.shields.io/badge/Docs-xberg-007ec6" alt="Documentation">
  80. </a>
  81. <a href="https://huggingface.co/xberg-io">
  82. <img src="https://img.shields.io/badge/Hugging%20Face-Xberg-007ec6" alt="Hugging Face">
  83. </a>
  84. </div>
  85. <div align="center" style="display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 28px 0 24px;">
  86. <a href="https://discord.gg/xt9WY3GnKR">
  87. <img height="22" src="https://img.shields.io/badge/Discord-Chat-007ec6?logo=discord&logoColor=white" alt="Join Discord">
  88. </a>
  89. <a href="https://docs.xberg.io/demo.html">
  90. <img height="22" src="https://img.shields.io/badge/Live%20Demo-Open-007ec6?logo=webassembly&logoColor=white" alt="Live Demo">
  91. </a>
  92. <a href="https://github.com/xberg-io/xberg/stargazers">
  93. <img height="22" src="https://img.shields.io/github/stars/xberg-io/xberg?style=social" alt="GitHub Stars">
  94. </a>
  95. </div>
  96. <div align="center">
  97. **The fast, precise document-intelligence engine — for every language.**
  98. Point Xberg at anything — a PDF, a scanned image, a spreadsheet, an audio file, a URL, a whole archive, or a source tree — and get back clean text, tables, metadata, and structured data. One engine handles format detection, reading, OCR, and extraction, so you never stitch a pipeline together from a dozen libraries.
  99. **107 formats · 141 file extensions** · **371 code languages** · **15 language bindings** · **6 output formats** · OCR · transcription · embeddings
  100. The fastest, most precise open-source document and PDF-to-Markdown engine — [see the benchmarks](https://xberg.io/benchmarks).
  101. [Install](#installation) · [What you get](#what-you-get) · [Capabilities](#capabilities) · [CLI](#cli-reference) · [Docs](https://docs.xberg.io)
  102. </div>
  103. > **Xberg is the next iteration of [Kreuzberg](https://github.com/kreuzberg-dev/kreuzberg-v4-lts).** Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line.
  104. ---
  105. ## What you get
  106. 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.
  107. | Capability | What you get |
  108. |---|---|
  109. | **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. |
  110. | **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](https://github.com/xberg-io/crawlberg) engine). *Requires the `url-ingestion` feature.* |
  111. | **Audio & video transcription** | Speech-to-text from MP3, M4A, WAV, WebM, and MP4 tracks via Whisper ONNX (tiny → large-v3). *Requires the `transcription` feature.* |
  112. | **Archives, traversed** | List and **recursively** extract nested `.zip`, `.tar`, `.gz`, `.7z` — documents inside documents — guarded by zip-bomb, compression-ratio, and nesting-depth limits. |
  113. | **OCR on demand** | Tesseract, PaddleOCR, Candle, or VLM backends — fallback chains, confidence scores, language auto-detection, extensible via plugins. |
  114. | **Layout & tables** | ML layout models (PP-DocLayout-V3, RT-DETR) and table structure (TATR, SLANet) reconstruct reading order and cell grids for clean Markdown. |
  115. | **Code intelligence** | Functions, classes, imports, symbols, docstrings from 371 programming languages. Syntax-aware chunking for RAG pipelines. |
  116. | **Embeddings & search** | Local (ONNX) or provider-hosted embeddings (165 providers via liter-llm), sparse and late-interaction, cross-encoder reranking. |
  117. | **Enrichment** | NER, keyword extraction (YAKE/RAKE), summarization, translation, redaction, page classification, QR detection, language detection, token reduction (TOON). |
  118. | **Structured extraction** | Schema-driven JSON straight from any document via local (Ollama, LM Studio, vLLM) or hosted LLMs — no prompt engineering. |
  119. | **6 output formats** | Plain text, Markdown, Djot, HTML, JSON tree, or Docling DocTags, plus registered custom renderers. |
  120. | **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. |
  121. > 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.
  122. ---
  123. ## Installation
  124. ### Language Packages
  125. <details open>
  126. <summary><strong>Python</strong></summary>
  127. ```sh
  128. pip install xberg
  129. ```
  130. For archived versions and the PyPI storage fallback:
  131. ```sh
  132. pip install xberg --extra-index-url https://xberg-io.github.io/python-wheels/simple/
  133. ```
  134. PyPI keeps all releases in the current minor and the latest stable patch of each
  135. older minor. See the [permanent archive and retention policy](https://github.com/xberg-io/python-wheels#pypi-retention-policy).
  136. See [Python README](https://github.com/xberg-io/xberg/tree/main/packages/python) for full documentation.
  137. </details>
  138. <details>
  139. <summary><strong>Node.js / TypeScript</strong></summary>
  140. ```sh
  141. npm install @xberg-io/xberg
  142. ```
  143. See [Node.js README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-node) for full documentation.
  144. </details>
  145. <details>
  146. <summary><strong>Rust</strong></summary>
  147. ```sh
  148. cargo add xberg
  149. ```
  150. See [Rust README](https://github.com/xberg-io/xberg/tree/main/crates/xberg) for full documentation.
  151. </details>
  152. <details>
  153. <summary><strong>Go</strong></summary>
  154. ```sh
  155. go get github.com/xberg-io/xberg/packages/go@latest
  156. ```
  157. > ⚠️ The repository root is not a Go module — `go get github.com/xberg-io/xberg` will fail.
  158. > Always target the `/packages/go` subdirectory as shown above.
  159. See [Go README](https://github.com/xberg-io/xberg/tree/main/packages/go) for full documentation.
  160. </details>
  161. <details>
  162. <summary><strong>Java</strong></summary>
  163. Available on Maven Central as `io.xberg:xberg`. See [Java README](https://github.com/xberg-io/xberg/tree/main/packages/java) for the dependency snippet.
  164. </details>
  165. <details>
  166. <summary><strong>C#</strong></summary>
  167. ```sh
  168. dotnet add package XbergIo.Xberg
  169. ```
  170. See [C# README](https://github.com/xberg-io/xberg/tree/main/packages/csharp) for full documentation.
  171. </details>
  172. <details>
  173. <summary><strong>Ruby</strong></summary>
  174. ```sh
  175. gem install xberg
  176. ```
  177. See [Ruby README](https://github.com/xberg-io/xberg/tree/main/packages/ruby) for full documentation.
  178. </details>
  179. <details>
  180. <summary><strong>PHP</strong></summary>
  181. ```sh
  182. composer require xberg-io/xberg
  183. ```
  184. See [PHP README](https://github.com/xberg-io/xberg/tree/main/packages/php) for full documentation.
  185. </details>
  186. <details>
  187. <summary><strong>Elixir</strong></summary>
  188. Add `{:xberg, "~> 1.0"}` to your `mix.exs` dependencies. See [Elixir README](https://github.com/xberg-io/xberg/tree/main/packages/elixir) for full documentation.
  189. </details>
  190. <details>
  191. <summary><strong>WebAssembly</strong></summary>
  192. ```sh
  193. npm install @xberg-io/xberg-wasm
  194. ```
  195. See [WebAssembly README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-wasm) for full documentation.
  196. </details>
  197. <details>
  198. <summary><strong>Kotlin (Android)</strong></summary>
  199. Available on Maven Central as `io.xberg:xberg-android`. See [Kotlin README](https://github.com/xberg-io/xberg/tree/main/packages/kotlin-android) for the dependency snippet.
  200. </details>
  201. <details>
  202. <summary><strong>Swift</strong></summary>
  203. Add via Swift Package Manager. See [Swift README](https://github.com/xberg-io/xberg/tree/main/packages/swift) for full documentation.
  204. </details>
  205. <details>
  206. <summary><strong>Dart / Flutter</strong></summary>
  207. ```sh
  208. dart pub add xberg
  209. ```
  210. See [Dart README](https://github.com/xberg-io/xberg/tree/main/packages/dart) for full documentation.
  211. </details>
  212. <details>
  213. <summary><strong>Zig</strong></summary>
  214. Add via `zig fetch`. See [Zig README](https://github.com/xberg-io/xberg/tree/main/packages/zig) for full documentation.
  215. </details>
  216. <details>
  217. <summary><strong>C/C++ (FFI)</strong></summary>
  218. Build from source as part of this workspace. See [C (FFI) README](https://github.com/xberg-io/xberg/tree/main/crates/xberg-ffi) for full documentation.
  219. </details>
  220. ### CLI & Deployment
  221. <details>
  222. <summary><strong>CLI Tool</strong></summary>
  223. ```sh
  224. brew install xberg-io/tap/xberg
  225. ```
  226. Windows users can install the same binary through [Scoop](https://scoop.sh):
  227. ```powershell
  228. scoop bucket add xberg https://github.com/xberg-io/scoop-bucket
  229. scoop install xberg
  230. ```
  231. 14 commands: `extract`, `batch`, `detect`, `formats`, `version`, `cache`, `tree-sitter`, `doctor`, `serve`, `mcp`, `api`, `embed`, `chunk`, and `completions`.
  232. See [CLI usage guide](https://docs.xberg.io/cli/usage/) for detailed documentation.
  233. </details>
  234. <details>
  235. <summary><strong>Docker</strong></summary>
  236. ```sh
  237. docker pull ghcr.io/xberg-io/xberg:latest
  238. ```
  239. Run in API, CLI, or MCP modes. See [Docker guide](https://docs.xberg.io/guides/docker/) for examples.
  240. </details>
  241. <details>
  242. <summary><strong>REST API Server</strong></summary>
  243. ```sh
  244. xberg serve --host 0.0.0.0 --port 8000
  245. ```
  246. One POST endpoint handles all formats. Returns JSON or Markdown. Stream large files. See [API server guide](https://docs.xberg.io/guides/api-server/).
  247. </details>
  248. <details>
  249. <summary><strong>MCP Server</strong></summary>
  250. ```sh
  251. xberg mcp --transport stdio
  252. ```
  253. 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).
  254. Add to Claude Desktop or Cursor:
  255. ```json
  256. {
  257. "mcpServers": {
  258. "xberg": { "command": "xberg", "args": ["mcp"] }
  259. }
  260. }
  261. ```
  262. See [MCP integration guide](https://docs.xberg.io/guides/mcp-integration/).
  263. </details>
  264. ### AI Coding Assistants
  265. Install the Xberg plugin from [`xberg-io/xberg`](https://github.com/xberg-io/xberg). Ships extraction APIs, OCR backends, configuration, and language conventions.
  266. The bundle targets Claude Code, Codex, Cursor, Gemini CLI, Kimi, OpenCode, Factory Droid,
  267. Hermes, Pi, Agent Plugins and GitHub Copilot CLI. Read [the plugin guide](https://github.com/xberg-io/xberg/blob/main/plugin/README.md)
  268. for runtime resources, CLI prerequisites and configuration. MCP-capable adapters expose the
  269. product's tools; Hermes uses a local stdio bridge and explicitly selected skills. Pi loads
  270. skills and prompt templates and requires the product CLI for executable operations.
  271. Install only the public [Agent Skills](https://github.com/xberg-io/xberg/tree/main/skills),
  272. without a plugin or MCP registration, using the [skills CLI](https://github.com/vercel-labs/skills):
  273. ```sh
  274. npx skills add xberg-io/xberg --list
  275. npx skills add xberg-io/xberg
  276. ```
  277. Choose the skills and target agents interactively. Installing instructions does not install the
  278. product CLI or configure provider credentials.
  279. <details open>
  280. <summary><strong>Claude Code</strong></summary>
  281. ```text
  282. /plugin marketplace add xberg-io/xberg
  283. /plugin install xberg@xberg
  284. ```
  285. </details>
  286. <details>
  287. <summary><strong>Codex CLI</strong></summary>
  288. ```text
  289. /plugins add https://github.com/xberg-io/xberg
  290. ```
  291. Search for `xberg` and select **Install Plugin**.
  292. </details>
  293. <details>
  294. <summary><strong>Cursor</strong></summary>
  295. Settings → Plugins → Add from URL → `https://github.com/xberg-io/xberg`, then select **xberg**.
  296. </details>
  297. <details>
  298. <summary><strong>Gemini CLI</strong></summary>
  299. From a checkout of this repository:
  300. ```sh
  301. gemini extensions install ./plugin
  302. ```
  303. The manifest is inside `plugin/`. See the [Gemini extension reference](https://geminicli.com/docs/extensions/reference/)
  304. for local installation and updates.
  305. </details>
  306. <details>
  307. <summary><strong>Factory Droid</strong></summary>
  308. ```text
  309. droid plugin marketplace add https://github.com/xberg-io/xberg
  310. droid plugin install xberg@xberg
  311. ```
  312. </details>
  313. <details>
  314. <summary><strong>GitHub Copilot CLI</strong></summary>
  315. ```text
  316. copilot plugin marketplace add https://github.com/xberg-io/xberg
  317. copilot plugin install xberg@xberg
  318. ```
  319. </details>
  320. <details>
  321. <summary><strong>Pi</strong></summary>
  322. Install from a local checkout now:
  323. ```bash
  324. pi install ./plugin
  325. ```
  326. After the next plugin release, install the same package used by OpenCode:
  327. ```bash
  328. pi install npm:@xberg-io/opencode-xberg
  329. ```
  330. Pi loads the bundled skills and prompt templates. Use `/xberg-extract` and `/xberg-ocr`
  331. to start a task. Install the CLI separately as
  332. shown in [the plugin README](https://github.com/xberg-io/xberg/blob/main/plugin/README.md).
  333. This package does not register MCP servers, hooks, or executable extensions in Pi.
  334. </details>
  335. <details>
  336. <summary><strong>opencode</strong></summary>
  337. Add to `opencode.json`:
  338. ```json
  339. {
  340. "$schema": "https://opencode.ai/config.json",
  341. "plugin": ["@xberg-io/opencode-xberg"]
  342. }
  343. ```
  344. </details>
  345. ---
  346. ## Quick Start
  347. Extract text from a document:
  348. ```rust
  349. use xberg::{extract, ExtractInput, ExtractionConfig};
  350. #[tokio::main]
  351. async fn main() -> xberg::Result<()> {
  352. let config = ExtractionConfig::default();
  353. let output = extract(
  354. ExtractInput::from_uri("document.pdf"),
  355. &config
  356. ).await?;
  357. println!("{}", output.results[0].content);
  358. Ok(())
  359. }
  360. ```
  361. Common use cases — see [Quick start guide](https://docs.xberg.io/getting-started/quickstart/) for language-specific examples, OCR, batch processing, and API configuration.
  362. ---
  363. ## Capabilities
  364. <details>
  365. <summary><strong>Full feature list</strong></summary>
  366. ### Supported File Formats (107 formats · 141 file extensions · 56 MIME aliases)
  367. 107 formats across 140 unique file extensions, with 56 compatibility MIME aliases, intelligent format detection, and comprehensive metadata extraction.
  368. #### Office Documents
  369. | Category | Formats | Capabilities |
  370. |----------|---------|--------------|
  371. | **Word Processing** | `.docx`, `.docm`, `.doc`, `.dotx`, `.dotm`, `.dot`, `.odt`, `.pages`, `.wpd`, `.wp`, `.wp5`, `.wp6` | Full text, tables, images, metadata, styles |
  372. | **Spreadsheets** | `.xlsx`, `.xlsm`, `.xlsb`, `.xls`, `.xla`, `.xlam`, `.xltm`, `.xltx`, `.xlt`, `.ods`, `.numbers` | Sheet data, formulas, cell metadata, charts |
  373. | **Presentations** | `.pptx`, `.pptm`, `.ppt`, `.pps`, `.ppsx`, `.potx`, `.potm`, `.pot`, `.odp`, `.key` | Slides, speaker notes, images, metadata |
  374. | **PDF** | `.pdf` | Text, tables, images, metadata, OCR support |
  375. | **eBooks** | `.epub`, `.fb2` | Chapters, metadata, embedded resources |
  376. | **Database** | `.dbf`, `.sqlite`, `.sqlite3`, `.db`, `.gpkg`, `.gpkx` | Bounded table extraction, schema metadata, GeoPackage detection |
  377. | **Hangul** | `.hwp`, `.hwpx` | Korean document format, text extraction |
  378. #### Images (OCR-Enabled)
  379. | Category | Formats | Features |
  380. |----------|---------|----------|
  381. | **Raster** | `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.bmp`, `.tiff`, `.tif` | OCR, table detection, EXIF metadata, dimensions, color space |
  382. | **Advanced** | `.jp2`, `.jpg2`, `.j2c`, `.j2k`, `.jpc`, `.jbig2`, `.jb2`, `.pnm`, `.pbm`, `.pgm`, `.ppm` | OCR via pure-Rust JPEG2000 decoder, JBIG2 support, table detection |
  383. | **HEIC family** | `.heic`, `.heics`, `.heif`, `.heifs`, `.hif`, `.avif`, `.avcs` | EXIF metadata, optional pixel decoding |
  384. | **Vector** | `.svg` | DOM parsing, embedded text, graphics metadata |
  385. #### Audio & Video
  386. | Category | Formats | Features |
  387. |----------|---------|----------|
  388. | **Audio** | `.mp3`, `.mpga`, `.m4a`, `.wav`, `.webm` | Whisper transcription |
  389. | **MP4 audio track** | `.mp4`, `.mpg4`, `.mp4v`, `.m4v` | Audio-track transcription only |
  390. | **MPEG audio track** | `.mpeg`, `.mpg`, `.mpe`, `.m1v`, `.m2v` | Audio-track transcription only |
  391. | **WebM audio track** | `.webm` | Audio-track transcription only |
  392. #### Web & Data
  393. | Category | Formats | Features |
  394. |----------|---------|----------|
  395. | **Markup** | `.html`, `.htm`, `.xhtml`, `.xht`, `.xml`, `.kml`, `.svg` | DOM parsing, metadata (Open Graph, Twitter Card), link extraction |
  396. | **Structured Data** | `.json`, `.geojson`, `.jsonl`, `.ndjson`, `.yaml`, `.yml`, `.toml`, `.csv`, `.tsv` | Schema detection, nested structures, validation |
  397. | **Text & Markdown** | `.txt`, `.adoc`, `.asciidoc`, `.vtt`, `.md`, `.markdown`, `.commonmark`, `.qmd`, `.rmd`, `.djot`, `.dj`, `.mdx`, `.doctags`, `.rst`, `.org`, `.rtf` | AsciiDoc, CommonMark, MyST Markdown, Quarto, R Markdown, Djot, MDX, DocTags, reStructuredText, Org Mode |
  398. #### Email & Archives
  399. | Category | Formats | Features |
  400. |----------|---------|----------|
  401. | **Email** | `.eml`, `.msg`, `.pst` | Headers, body (HTML/plain), attachments, threading |
  402. | **Archives** | `.zip`, `.tar`, `.tgz`, `.gz`, `.7z` | File listing, nested archives, metadata, recursive extraction |
  403. #### Academic & Scientific
  404. | Category | Formats | Features |
  405. |----------|---------|----------|
  406. | **Citations** | `.bib`, `.ris`, `.nbib`, `.enw` | Structured parsing: RIS, PubMed/MEDLINE, EndNote XML, BibTeX/BibLaTeX |
  407. | **Scientific** | `.tex`, `.latex`, `.typ`, `.typst`, `.jats`, `.nxml` | LaTeX, Typst, PubMed JATS |
  408. | **Text notebooks** | `.ipynb`, `.md`, `.py`, `.R`, `.jl` | Jupyter, MyST-NB, Jupytext percent/light, saved outputs, cell visibility tags |
  409. | **Publishing** | `.fb2`, `.docbook`, `.dbk`, `.docbook4`, `.docbook5`, `.opml` | FictionBook, DocBook XML, OPML outlines |
  410. ### Code Intelligence (371 Languages)
  411. Extract structure from 371 programming languages via tree-sitter:
  412. | Feature | Description |
  413. |---------|-------------|
  414. | **Structure Extraction** | Functions, classes, methods, structs, interfaces, enums |
  415. | **Import/Export Analysis** | Module dependencies, re-exports, wildcard imports |
  416. | **Symbol Extraction** | Variables, constants, type aliases, properties |
  417. | **Docstring Parsing** | Google, NumPy, Sphinx, JSDoc, RustDoc, and 10+ formats |
  418. | **Syntax-Aware Chunking** | Split code by semantic boundaries for RAG pipelines |
  419. | **Diagnostics** | Parse errors with line/column positions |
  420. Powered by [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack).
  421. ### Output Formats (6)
  422. | Format | Use case | Example |
  423. |--------|----------|---------|
  424. | **Plain** | Raw text, no markup | `"Chapter 1\nIntroduction"` |
  425. | **Markdown** | Readable, structured, RAG-friendly | `"# Chapter 1\n## Introduction"` |
  426. | **Djot** | Modern lightweight markup | Similar to Markdown but stricter |
  427. | **HTML** | Styled, browser-ready | `<h1>Chapter 1</h1>` |
  428. | **JSON** | Machine-readable tree structure | Hierarchical sections with heading levels |
  429. | **DocTags** | Docling-compatible tag stream for document elements and tables | `<text>Chapter 1</text>` |
  430. ### Deployment Modes
  431. | Mode | Command | Transport | Use case |
  432. |------|---------|-----------|----------|
  433. | **Library** | `xberg::extract()` | Async functions | Embed in your application |
  434. | **CLI** | `xberg extract document.pdf` | 14 commands | Scripts, batch jobs, CI/CD |
  435. | **REST API** | `xberg serve` | HTTP POST | Microservice, serverless deployment |
  436. | **MCP Server** | `xberg mcp` | stdio or HTTP | Claude, Cursor, IDE agents |
  437. | **Docker** | `docker run ghcr.io/xberg-io/xberg` | All modes | Container deployment |
  438. ### OCR Backends
  439. - **Tesseract** — Native C FFI (Linux/macOS/Windows) and WASM (browser)
  440. - **PaddleOCR** — ONNX Runtime, mobile-optimized models
  441. - **Candle** — Pure Rust, CPU-only, lightweight
  442. - **VLM** — GPT-4 Vision, Claude Vision, Gemini Vision, or 165 providers via liter-llm
  443. Fallback chains. Extensible via plugin system.
  444. ### Embeddings
  445. **Local (ONNX Runtime):**
  446. - Preset models: fast, balanced (default), quality, multilingual
  447. - Dimensions: 384, 768, 1024
  448. **Provider-hosted:**
  449. - OpenAI, Anthropic, Google, Hugging Face, Mistral, Cohere, and 165 providers total
  450. - Via [liter-llm](https://github.com/xberg-io/liter-llm) integration
  451. **Reranking:**
  452. - Local ONNX rerankers (cross-encoder models)
  453. - Provider-hosted: Cohere Rerank, others
  454. ### Structured LLM Extraction
  455. Local engines: Ollama, LM Studio, vLLM
  456. Remote: OpenAI, Anthropic, Google, Mistral, Cohere, and 165 providers via liter-llm
  457. Schema validation. Temperature, top-p, frequency penalty tuning.
  458. ### Enrichment
  459. - **NER** — GLiNER or LLM-based entity recognition
  460. - **Redaction** — Mask PII (phone, email, SSN, credit card, addresses)
  461. - **Summarization** — Document and section summaries via LLM
  462. - **Translation** — Multi-language via LLM
  463. - **Page Classification** — Tag document pages (cover, toc, content, etc.)
  464. - **QR Code Detection** — Extract and decode QR codes from images
  465. - **Keyword Extraction** — YAKE or RAKE algorithms
  466. - **Language Detection** — Detect document language
  467. - **Layout Detection** — RT-DETR + TATR models for document structure
  468. - **Table Extraction** — Cell-level structure and content
  469. - **Token Reduction** — TOON wire format (~30–50% fewer tokens than JSON)
  470. </details>
  471. ---
  472. ## CLI Reference
  473. <details>
  474. <summary><strong>All 14 commands</strong></summary>
  475. | Command | Subcommands | Purpose |
  476. |---------|-------------|---------|
  477. | `extract` | — | Extract text from a single document (path, URL, or stdin) |
  478. | `batch` | — | Extract from multiple documents in parallel |
  479. | `detect` | — | Identify MIME type of a file |
  480. | `formats` | — | List all supported formats and MIME types |
  481. | `version` | — | Show Xberg version |
  482. | `cache` | `stats`, `clear`, `manifest`, `warm` | Manage extraction cache and models |
  483. | `tree-sitter` | `download`, `list`, `cache-dir`, `clean` | Manage code-intelligence grammars |
  484. | `doctor` | — | Diagnose the local installation and runtime dependencies |
  485. | `serve` | — | Start REST API server (default: <http://127.0.0.1:8000>) |
  486. | `mcp` | — | Start MCP server (stdio or HTTP transport) |
  487. | `api` | `schema` | Output OpenAPI 3.1 specification |
  488. | `embed` | — | Generate embeddings for text (local or provider-hosted) |
  489. | `chunk` | — | Split text into chunks (text, markdown, YAML, or semantic) |
  490. | `completions` | — | Generate shell completion scripts |
  491. Run `xberg --help` or `xberg <command> --help` for detailed options.
  492. </details>
  493. ---
  494. ## Documentation
  495. Full guides, API references for every binding, format reference, and configuration docs live at **[xberg.io](https://docs.xberg.io/)**.
  496. - [Getting Started](https://docs.xberg.io/getting-started/installation/)
  497. - [Quick Start](https://docs.xberg.io/getting-started/quickstart/)
  498. - [Guides](https://docs.xberg.io/guides/extraction/)
  499. - [API Reference (Rust core)](https://docs.xberg.io/reference/api-rust/) — every binding has its own page under `/reference/`
  500. - [Format Reference](https://docs.xberg.io/reference/formats/)
  501. - [Live Demo](https://docs.xberg.io/demo.html) (browser, WASM)
  502. ---
  503. ## Built with Xberg
  504. Projects that declare Xberg as a dependency. Xberg was previously published as `kreuzberg`, and most of these projects declare the package under that name.
  505. | Project | What it is | Stars |
  506. |---|---|---|
  507. | **[basemind](https://github.com/Goldziher/basemind)** | AI context and content layer for coding agents over one MCP server: code map, document RAG, shared memory and web crawl | ![Stars](https://img.shields.io/github/stars/Goldziher/basemind?color=007ec6) |
  508. | **[delulu](https://github.com/mratsim/delulu)** | A suite of MCP servers and CLI tools that give your LLM better search and fewer hallucinations | ![Stars](https://img.shields.io/github/stars/mratsim/delulu?color=007ec6) |
  509. | **[docs-mcp-server](https://github.com/arabold/docs-mcp-server)** | Grounded documentation MCP server, an open-source alternative to Context7, Nia and Ref.Tools | ![Stars](https://img.shields.io/github/stars/arabold/docs-mcp-server?color=007ec6) |
  510. | **[erato](https://github.com/EratoLab/erato)** | The open-source AI platform | ![Stars](https://img.shields.io/github/stars/EratoLab/erato?color=007ec6) |
  511. | **[fastmail-cli](https://github.com/radiosilence/fastmail-cli)** | CLI and MCP server for Fastmail: email, contacts, masked email, attachments and text extraction | ![Stars](https://img.shields.io/github/stars/radiosilence/fastmail-cli?color=007ec6) |
  512. | **[ghfdb-portal](https://github.com/ihfc-iugg/ghfdb-portal)** | Web portal for the Global Heat Flow Database | ![Stars](https://img.shields.io/github/stars/ihfc-iugg/ghfdb-portal?color=007ec6) |
  513. | **[hawki-toolkit-file-converter](https://github.com/hawk-digital-environments/hawki-toolkit-file-converter)** | Prepares and converts PDF files for the HAWKI toolkit | ![Stars](https://img.shields.io/github/stars/hawk-digital-environments/hawki-toolkit-file-converter?color=007ec6) |
  514. | **[haystack-core-integrations](https://github.com/deepset-ai/haystack-core-integrations)** | Integrations that extend Haystack with extra components and document stores | ![Stars](https://img.shields.io/github/stars/deepset-ai/haystack-core-integrations?color=007ec6) |
  515. | **[kreuzakt](https://github.com/anaisbetts/kreuzakt)** | A search engine for humans and computers, aimed at your most boring documents | ![Stars](https://img.shields.io/github/stars/anaisbetts/kreuzakt?color=007ec6) |
  516. | **[lilbee](https://github.com/tobocop2/lilbee)** | The whole local AI stack in one executable, with conversational search and cited answers over your files, code and the web | ![Stars](https://img.shields.io/github/stars/tobocop2/lilbee?color=007ec6) |
  517. | **[llm-workflow-engine](https://github.com/llm-workflow-engine/llm-workflow-engine)** | Power CLI and workflow manager for LLMs | ![Stars](https://img.shields.io/github/stars/llm-workflow-engine/llm-workflow-engine?color=007ec6) |
  518. | **[MANSPIDER](https://github.com/blacklanternsecurity/MANSPIDER)** | Spiders entire networks for files sitting on SMB shares, searching filenames or contents with regex | ![Stars](https://img.shields.io/github/stars/blacklanternsecurity/MANSPIDER?color=007ec6) |
  519. | **[otoroshi-llm-extension](https://github.com/cloud-apim/otoroshi-llm-extension)** | Connect, secure and manage LLM models behind one OpenAI-compatible API | ![Stars](https://img.shields.io/github/stars/cloud-apim/otoroshi-llm-extension?color=007ec6) |
  520. | **[sift-kg](https://github.com/juanceresa/sift-kg)** | Turns a collection of documents into a knowledge graph, extracting entities and relationships with an LLM | ![Stars](https://img.shields.io/github/stars/juanceresa/sift-kg?color=007ec6) |
  521. | **[sirchmunk](https://github.com/modelscope/sirchmunk)** | Turns raw data into a self-evolving, real-time search and intelligence layer | ![Stars](https://img.shields.io/github/stars/modelscope/sirchmunk?color=007ec6) |
  522. | **[support-chatbot](https://github.com/rodekruis/support-chatbot)** | Level-1 support chatbot for the Netherlands Red Cross 510 team | ![Stars](https://img.shields.io/github/stars/rodekruis/support-chatbot?color=007ec6) |
  523. Using Xberg in your project? Open a PR adding it to this list.
  524. ---
  525. ## Contributing
  526. Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
  527. Join our [Discord community](https://discord.gg/xt9WY3GnKR) for questions and discussion.
  528. ---
  529. ## Part of Xberg.io
  530. - [Xberg](https://github.com/xberg-io/xberg) — the open-source content-intelligence engine: text, tables, and metadata from 107 formats (141 file extensions), with OCR, transcription, and code intelligence. MIT.
  531. - [Xberg Pro](https://xberg.io) — a complete self-hosted content-intelligence backend in a single container. Commercial.
  532. - [Xberg Enterprise](https://xberg.io) — the distributed, governed content-intelligence platform, scaled on Kubernetes with team governance and support. Commercial.
  533. - [crawlberg](https://github.com/xberg-io/crawlberg) — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
  534. - [html-to-markdown](https://github.com/xberg-io/html-to-markdown) — fast, lossless HTML→Markdown engine.
  535. - [liter-llm](https://github.com/xberg-io/liter-llm) — universal LLM API client with native bindings for 14 languages and 165 providers.
  536. - [tree-sitter-language-pack](https://github.com/xberg-io/tree-sitter-language-pack) — tree-sitter grammars and code-intelligence primitives.
  537. - [alef](https://github.com/xberg-io/alef) — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
  538. ---
  539. ## License
  540. MIT License (MIT) — see [LICENSE](LICENSE) for details.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.