docling-cli 2.20.0

Command-line interface for docling.rs (the `docling-rs` binary; a Rust port of docling).
[package]
name = "docling-cli"
description = "Command-line interface for docling.rs (the `docling-rs` binary; a Rust port of docling)."
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
keywords.workspace = true
categories = ["command-line-utilities", "text-processing"]
rust-version.workspace = true

[[bin]]
name = "docling-rs"
path = "src/main.rs"

[features]
# Tokenization-aware chunking is on by default so `--to chunks` emits the
# hybrid records out of the box once download_dependencies.sh has fetched
# .models/chunk/tokenizer.json (the hierarchical records need no tokenizer and
# are always available). `--no-default-features` drops the tokenizer dep.
default = ["chunking", "mcp"]
# HEIC/HEIF image input (#211) — links the system libheif.
heif = ["docling/heif"]
# pdfium as an opt-in PDF renderer (`DOCLING_RS_RENDERER=pdfium`) — off by
# default, the pipeline renders in pure Rust; pass-through to docling-pdf.
pdfium = ["docling/pdfium"]
# ONNX Runtime loaded at run time instead of linked (#504) — the s390x build
# and self-built runtimes; pass-through to docling.
ort-load-dynamic = ["docling/ort-load-dynamic"]
# Pass through to the library's optional headless-browser HTML pre-render, so
# `cargo run -p docling-cli --features web-browser -- --use-web-browser …`
# activates it. Off by default (keeps the default binary browser-dependency-free).
web-browser = ["docling/web-browser"]
# Tokenization-aware chunking: enables the hybrid chunk records in `--to chunks`
# (the hierarchical ones need no tokenizer and are always available).
chunking = ["docling/chunking"]
# `docling-rs serve` subcommand: the HTTP conversion API (pulls the async
# stack — tokio/axum — so it is off by default; the standalone `docling-serve`
# binary is always available from its own crate).
serve = ["dep:docling-serve", "dep:tokio"]
# `docling-rs mcp` subcommand (#669): a Model Context Protocol server — stdio
# for Claude Desktop / IDE agents, Streamable HTTP with `--http` — exposing
# `convert_to_markdown(uri)` (MarkItDown's MCP tool, same name and contract),
# `convert` and `list_input_formats`. On by default, so the release binaries
# and the container image carry it: rmcp, tokio and axum's HTTP/1 server add
# ~5 MB to the stripped binary (measured 39.2 → 44.2 MB before ONNX Runtime),
# and an MCP server is exactly where one static binary without Python pays
# off. `--no-default-features` drops it.
mcp = ["dep:rmcp", "dep:schemars", "dep:serde", "dep:axum", "dep:tokio", "dep:docling-core"]
# GPU execution providers for the PDF/image ML pipeline (#74) — pass-through
# to docling → docling-pdf. Build e.g. `--features cuda`; such a build defaults
# to `DOCLING_RS_EP=auto` (use the GPU when one is usable, fall back to CPU),
# and the env var pins a specific provider — `DOCLING_RS_EP=cpu` opts back out.
# `docling-rs --version` reports which of these the binary carries.
cuda = ["docling/cuda"]
tensorrt = ["docling/tensorrt"]
directml = ["docling/directml"]
coreml = ["docling/coreml"]
# CPU-class accelerator for machines without a usable GPU provider (#324).
# Requires linking a self-built ONNX Runtime (`ORT_LIB_LOCATION`, built with
# `--use_xnnpack`) — pyke ships no prebuilt runtime with this EP.
xnnpack = ["docling/xnnpack"]

[dependencies]
docling = { path = "../docling", version = "2.20.0" }
glob = "0.3"
docling-serve = { path = "../docling-serve", version = "2.20.0", optional = true, default-features = false }
serde_json = "1"
tokio = { version = "1", features = ["rt-multi-thread", "net", "signal", "sync", "time"], optional = true }
rmcp = { version = "3.5", optional = true, default-features = false, features = ["server", "macros", "transport-io", "transport-streamable-http-server"] }
schemars = { version = "1", optional = true }
axum = { version = "0.8", optional = true, default-features = false, features = ["http1", "tokio"] }
serde = { version = "1", features = ["derive"], optional = true }
docling-core = { path = "../docling-core", version = "2.20.0", optional = true }