rtb-docs 0.7.1

Interactive docs browser, embedded-HTML docs-serve server, and AI Q&A seam. Part of the phpboyscout Rust toolkit.
Documentation
[package]
name = "rtb-docs"
description = "Interactive docs browser, embedded-HTML docs-serve server, and AI Q&A seam. Part of the phpboyscout Rust toolkit."
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
readme.workspace = true
homepage.workspace = true
documentation = "https://docs.rs/rtb-docs"
categories = ["command-line-interface", "text-processing"]
keywords = ["docs", "tui", "markdown", "search", "cli"]

[lints]
workspace = true

[features]
# `ai` gates the Q&A seam. The default implementation is backed by
# `rtb-chat` (formerly `rtb-ai`); tools that want a different
# implementation can leave the feature off and supply their own
# `AiAnswerStream`. The feature keeps its `ai` name — it gates docs-side
# AI Q&A, whichever chat backend provides it.
default = []
ai = ["dep:rtb-chat", "dep:futures-util", "dep:secrecy"]

[dependencies]
rtb-app = { version = "0.7.0" }
rtb-assets = { version = "0.6.0" }
rtb-chat = { version = "0.7.0", optional = true }

# TUI
ratatui = "0.30.2"
crossterm = "0.29.0"
tui-markdown = "0.3.8"
pulldown-cmark = { version = "0.13.4", default-features = false, features = ["html"] }
fuzzy-matcher = "0.3.7"

# HTTP server (`docs serve`)
axum = { version = "0.8.9", default-features = false, features = ["tokio", "http1", "query", "json"] }
tower = "0.5.3"

# Full-text search
tantivy = "0.26.1"

# Async runtime + cancellation
tokio = { version = "1.53.0", features = ["full"] }
tokio-util = { version = "0.7.18", features = ["rt"] }
async-trait = "0.1.91"

# Errors
miette = { version = "7.6.0", features = ["fancy"] }
thiserror = "2.0.19"

# Config index parsing
serde = { version = "1.0.229", features = ["derive"] }
serde_yaml = "0.9.34"
serde_json = "1.0.150"

# Link-time registration (docs command)
linkme = "0.3.37"

# `docs` CLI subcommand parsing — `list / show / browse / serve` flags
clap = { version = "4.6.2", features = ["derive", "env", "wrap_help", "string"] }

# Stream adapters for the ai seam
futures-core = "0.3.33"
# Pulled in by the `ai` feature — only the `AiClient`-backed seam
# uses these. Optional to keep default builds lean.
futures-util = { version = "0.3.33", optional = true }
secrecy = { version = "0.10.3", optional = true }

[dev-dependencies]
reqwest = { version = "0.13.4", default-features = false, features = ["rustls", "json", "stream", "gzip"] }