[package]
name = "ts-pack-cli"
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
description = "CLI tool for tree-sitter language pack - manage parser downloads and run code intelligence"

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

[features]
# The MCP server ships in every build of the CLI so `ts-pack mcp` is always
# available (cargo install, prebuilt release, brew, npx/uvx proxy). The plugin
# launcher (xberg-io/plugins) and the published binaries rely on this.
default = ["mcp"]
mcp = [
    "dep:rmcp",
    "dep:tokio",
    "dep:schemars",
    "dep:serde",
    "dep:tracing",
    "dep:tracing-subscriber",
    "dep:axum",
]

[dependencies]

# MCP optional deps (enabled by the `mcp` feature)
axum = { workspace = true, optional = true }
clap = { workspace = true, features = ["derive"] }
clap_complete = { workspace = true }
rmcp = { workspace = true, optional = true }
schemars = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true }
tokio = { workspace = true, optional = true }
tracing = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
tree-sitter-language-pack = { path = "../ts-pack-core", version = "1.12.5", features = ["download", "config", "serde"] }

[target.'cfg(unix)'.dependencies]
libc = "0.2"

[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "io-std", "time", "process"] }

[lints]
workspace = true
