Installation
Installation
Section titled “Installation”The fastest way to get started. No Rust toolchain needed if you use Homebrew.
brew trust xberg-io/tapbrew install xberg-io/tap/crawlbergscoop bucket add xberg https://github.com/xberg-io/scoop-bucketscoop install crawlbergcargo install crawlberg-cliOr grab the prebuilt binary from GitHub Releases via cargo-binstall:
cargo binstall crawlberg-cliWith optional features:
cargo install crawlberg-cli --features "api,mcp"npm install -g @xberg-io/crawlberg-cliInstalls a thin proxy that downloads and runs the native crawlberg binary from GitHub releases. Requires Node.js 18+; no Rust toolchain needed.
Verify:
crawlberg --versionLanguage Bindings
Section titled “Language Bindings”Add to your Cargo.toml:
[dependencies]crawlberg = "0.3"tokio = { version = "1", features = ["full"] }Optional feature flags:
| Feature | Description |
|---|---|
native-runtime |
Native OS runtime marker; enabled by default outside wasm32 |
browser |
Chromiumoxide browser backend |
browser-native |
In-process native browser backend |
ai |
LLM extraction via liter-llm |
otel |
One-call OpenTelemetry/OTLP setup |
interact |
Compatibility alias for browser-backed page interaction |
mcp |
Model Context Protocol server |
api |
REST API server via Axum |
mcp-http |
MCP over HTTP transport |
warc |
WARC archive output |
Enable features as needed:
[dependencies]crawlberg = { version = "0.3", features = ["browser", "ai", "mcp"] }Requires Python 3.10+. Install from PyPI:
pip install crawlbergOr with uv:
uv add crawlbergThe package ships pre-built wheels with the Rust core compiled via maturin. No Rust toolchain needed.
Install the @xberg-io/crawlberg package:
npm install @xberg-io/crawlbergOr with pnpm:
pnpm add @xberg-io/crawlbergThe package includes pre-built native binaries via NAPI-RS and ships with TypeScript type definitions (.d.ts).
Requires Ruby 3.2+. Add to your Gemfile:
gem "crawlberg", "~> 0.3"Then:
bundle installOr install directly:
gem install crawlbergThe gem includes a native extension built with Magnus and rb_sys.
Requires Go 1.21+. The Go bindings use cgo with the C FFI layer:
go get github.com/xberg-io/crawlberg/packages/goRequires Java 25+ (Panama FFM). Add the Maven dependency:
<dependency> <groupId>io.xberg.crawlberg</groupId> <artifactId>crawlberg</artifactId> <version>0.3.0</version></dependency>The Java bindings use the Panama Foreign Function & Memory API to call the C FFI layer.
Add the Android AAR dependency:
dependencies { implementation("io.xberg.crawlberg:crawlberg-android:0.3.0")}The Kotlin package targets Android and bundles JNI shared libraries. Kotlin/JVM server applications should use the Java package.
Requires .NET 10+. Add the NuGet package:
dotnet add package CrawlbergOr in your .csproj:
<PackageReference Include="Crawlberg" Version="0.3.0" />The C# bindings use P/Invoke to call the C FFI layer.
Requires PHP 8.2+. Install the extension via Composer:
composer require xberg-io/crawlbergThe PHP bindings are built with ext-php-rs and load as a native PHP extension.
Requires Elixir 1.14+ with OTP 25+. Add to your mix.exs:
defp deps do [ {:crawlberg, "~> 0.3"} ]endThen:
mix deps.getmix compileThe Elixir bindings use Rustler NIFs.
For browser or Node.js environments via wasm-bindgen:
npm install @xberg-io/crawlberg-wasmimport init from "@xberg-io/crawlberg-wasm";await init();Requires Dart or Flutter with native FFI support:
dart pub add crawlbergAdd the Swift package from GitHub:
.package(url: "https://github.com/xberg-io/crawlberg", exact: "0.3.0")Use the generated Zig package over the C FFI layer:
zig fetch --save https://github.com/xberg-io/crawlberg/archive/refs/tags/v0.3.0.tar.gzFor languages not listed above, crawlberg provides a C-compatible FFI layer. Build the shared library:
cargo build --release -p crawlberg-ffiThe output is a shared library (libcrawlberg.so / libcrawlberg.dylib / crawlberg.dll) with C headers generated by cbindgen.
Docker
Section titled “Docker”Pull the official image:
docker pull ghcr.io/xberg-io/crawlberg:latestRun the CLI:
docker run --rm ghcr.io/xberg-io/crawlberg:latest scrape https://example.comRun with a volume for WARC output:
docker run --rm -v $(pwd)/output:/output \ ghcr.io/xberg-io/crawlberg:latest \ crawl https://example.com --depth 2 --warc-output /output/archive.warcPlatform support
Section titled “Platform support”Every binding ships prebuilt artifacts for glibc Linux (x86_64 and aarch64), macOS, and Windows. On musl Linux — Alpine and anything else built on musl — coverage is deliberately partial, and the table below is the authoritative statement of it.
| Distribution | glibc Linux | musl Linux |
|---|---|---|
| CLI (GitHub release, Homebrew) | ✅ | ✅ x86_64, aarch64 |
Docker (ghcr.io/xberg-io/…) |
✅ | ✅ Alpine image, static binary |
| Rust (crates.io) | ✅ | ✅ builds from source |
| Ruby (RubyGems) | ✅ | ✅ compiles at install |
| Java (Maven Central) | ✅ | ✅ bundled in the jar |
| C# (NuGet) | ✅ | ✅ bundled in the package |
| Elixir (Hex) | ✅ | ✅ precompiled NIF |
| Node (npm) | ✅ | ❌ not published |
| Python (PyPI) | ✅ | ❌ not published |
| Go | ✅ | ❌ not published |
| PHP | ✅ | ❌ not published |
Why musl is omitted for Node, Python, Go, and PHP
Section titled “Why musl is omitted for Node, Python, Go, and PHP”These four bindings load a native library that must be built specifically for musl. Producing
and testing that second Linux artifact doubles the release matrix for each of them, and the
platforms where Alpine is actually used — containers and CI images — are already served by the
statically linked CLI and the Alpine Docker image. So the omission is a deliberate scope
decision, not an oversight or a broken build, and it is not scheduled to change. If you need
Crawlberg on Alpine, use the CLI or the Docker image, or run your application on a glibc base
image such as node:22-bookworm-slim, python:3.13-slim, or debian:bookworm-slim.
Two consequences are worth knowing about, because neither announces itself:
- npm installs succeed on Alpine and then fail at runtime.
@xberg-io/crawlbergdeclares@xberg-io/crawlberg-linux-x64-musland@xberg-io/crawlberg-linux-arm64-muslas optional dependencies. Those package names are registered but hold only a0.0.1placeholder, so npm skips them without an error and installs no native binary at all. The failure surfaces later, whenrequire()cannot find a native module. Do not read a cleannpm installon Alpine as evidence that the package works there. - pip finds no musl wheel and falls back to the sdist. PyPI carries
manylinuxwheels only, sopip install crawlbergon Alpine attempts a source build and needs a full Rust toolchain to have any chance of succeeding.
Where to go next
Section titled “Where to go next”- Quick start — Scrape a page, run a crawl, and map a site in under five minutes. Covers the CLI and the Rust API side by side.
- Configuration guide — Every
CrawlConfigfield with its default and validation rules. Start here if you need to tune depth, concurrency, or content filtering. - Features overview — What the engine can do: browser rendering, LLM extraction, REST API, MCP, WARC output, and more. Useful for figuring out which feature flags you need.