[package]
name = "semtools"
version = "3.0.1"
edition = "2024"
license = "MIT"
description = "Semantic search and document parsing tools for the command line"
repository = "https://github.com/run-llama/semtools"
authors = ["Logan Markewich <logan@runllama.ai>"]
categories = ["command-line-utilities", "text-processing"]
keywords = ["semantic-search", "document-parsing", "cli", "pdf", "search"]
readme = "README.md"

[[bin]]
name = "semtools"
path = "src/bin/semtools.rs"
required-features = ["ask", "search", "workspace", "parse"]

[dependencies]
# Common dependencies
anyhow = "1.0.99"
clap = { version = "4.5.45", features = ["derive"] }
futures = "0.3.31"
dirs = "5.0.1"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.143"

# Parse-specific dependencies
bytes = { version = "1.11.1", optional = true }
reqwest = { version = "0.12.23", features = ["multipart", "json", "rustls-tls"], default-features = false, optional = true }
tokio = { version = "1.47.1", features = ["full"], optional = true }
sha2 = { version = "0.10.8", optional = true }
hex = { version = "0.4.3", optional = true }
mime_guess = { version = "2.0.5", optional = true }

# Search-specific dependencies
model2vec-rs = { version = "0.1.3", optional = true }
simsimd = { version = "6.5.1", optional = true }

# Workspace-specific dependencies
rand = { version = "0.8.5", optional = true }
qdrant-edge = { version = "0.0.0", optional = true }
ordered-float = { version = "5.1.0", optional = true }

# Ask dependencies
async-openai = { version = "0.31.0-beta.1", features = ["chat-completion", "responses"], optional = true }
grep = { version = "0.3", optional = true }
grep-searcher = { version = "0.1", optional = true }
grep-matcher = { version = "0.1", optional = true }
grep-regex = { version = "0.1", optional = true }
regex = { version = "1.11", optional = true }

[dev-dependencies]
tempfile = "3.24.0"

[features]
default = ["parse", "search", "workspace", "ask"]
parse = ["bytes", "reqwest", "tokio", "sha2", "hex", "mime_guess"]
search = ["model2vec-rs", "simsimd"]
workspace = ["tokio", "rand", "qdrant-edge", "ordered-float"]
ask = ["async-openai", "model2vec-rs", "simsimd", "tokio", "grep", "grep-searcher", "grep-matcher", "grep-regex", "regex"]
