[package]
name = "anno-cli"
version = { workspace = true }
edition = { workspace = true }
rust-version = { workspace = true }
license = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
documentation = "https://docs.rs/anno-cli"
description = "CLI for anno: extract entities, coreference chains, relations, and PII from text, HTML, and URLs"
keywords = ["ner", "nlp", "extraction", "cli"]
categories = ["command-line-utilities", "text-processing"]

[dependencies]
anno = { path = "../anno", version = "0.11.0", default-features = false }
anno-eval = { path = "../anno-eval", version = "0.11.0" }

clap = { workspace = true, features = ["derive", "env", "wrap_help"] }
clap_complete = { workspace = true }
indicatif = { workspace = true }
toml = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
log = { workspace = true }
tracing-subscriber = { workspace = true }
ureq = { workspace = true, features = ["json"] }
chrono = { workspace = true }
dirs = { workspace = true }
regex = { workspace = true }
thiserror = { workspace = true }
glob = { workspace = true }
itertools = { workspace = true }

# Optional: only used by the `anno sampler` / `anno muxer` DX tooling (behind `eval`).
muxer = { version = "0.5", default-features = false, features = [
  "serde",
  "stochastic",
  "contextual",
], optional = true }

# Graph/KG export surface lives in `anno` behind its `graph` feature
# (which pulls in lattix transitively). No separate dep needed here.

# Document-to-text extraction (HTML stripping, readability, PDF).
# Backend selection is feature-flagged below: extractor-readability
# (default, best quality, pulls cssparser/selectors MPL-2.0 transitives)
# vs extractor-html2text (no MPL deps, lower quality on boilerplate-heavy
# pages).
deformat = { workspace = true }
xxhash-rust = { version = "0.8.15", features = ["xxh3"] }
rayon = { workspace = true }

[features]
default = ["onnx", "extractor-readability", "heuristic-fr"]
# Evaluation + muxer tooling.
eval = ["dep:muxer", "anno/analysis", "anno-eval/eval"]
eval-bias = ["eval", "anno-eval/eval-bias"]
discourse = ["anno/discourse", "anno-eval/discourse"]
instrument = []
onnx = ["anno/onnx", "anno-eval/onnx"]
candle = ["anno/candle"]
heuristic-fr = ["anno/heuristic-fr", "anno-eval/heuristic-fr"]
llm = ["anno/llm"]
bundled-crf-weights = ["anno/bundled-crf-weights"]
bundled-hmm-params = ["anno/bundled-hmm-params"]
graph = ["anno/graph"]
pdf = ["deformat/pdf"]
parallel = ["anno/parallel"]
chunking = ["anno/chunking"]
# HTML extractor backends. At least one must be enabled; default ships
# readability. To get an MPL-free build, use:
#   cargo install anno-cli --no-default-features --features "onnx extractor-html2text"
extractor-readability = ["deformat/readability"]
extractor-html2text = ["deformat/html2text"]

[dev-dependencies]
tempfile = "3"

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

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]

[package.metadata.dist]
dist = false  # anno-cli is a developer tool; install via `cargo install anno-cli`. Phase 2A ships anno-rag-bin + anno-privacy-gateway only.

