[package]
name = "gdelt"
version = "0.1.0"
edition = "2021"
rust-version = "1.75"
description = "CLI for GDELT Project - optimized for agentic usage with local data caching"
license = "MIT"
repository = "https://github.com/neul-labs/gdelt-cli"
keywords = ["gdelt", "news", "analytics", "cli", "agent"]
categories = ["command-line-utilities", "web-programming"]
exclude = [
    "dist/",
    "documentation/",
    ".github/",
    "target/",
    "*.tar.gz",
    "*.zip",
]

[dependencies]
# CLI framework
clap = { version = "4", features = ["derive", "env", "string", "wrap_help"] }
clap_complete = "4"

# Async runtime
tokio = { version = "1", features = ["full"] }

# HTTP client
reqwest = { version = "0.12", default-features = false, features = ["json", "gzip", "brotli", "stream", "rustls-tls"] }

# Serialization
serde = { version = "1", features = ["derive"] }
serde_json = "1"
toml = "0.8"
csv = "1.3"

# Database - DuckDB for analytics
duckdb = { version = "1.0", features = ["bundled"] }
# SQLite for lightweight cache
rusqlite = { version = "0.32", features = ["bundled"] }

# MCP Server (optional)
rmcp = { version = "0.1", features = ["server"], optional = true }
schemars = { version = "0.8", optional = true }

# Date/Time
chrono = { version = "0.4", features = ["serde"] }
humantime = "2"
humantime-serde = "1"

# Output formatting
tabled = { version = "0.16", features = ["ansi"] }
comfy-table = "7"
colored = "2"
indicatif = { version = "0.17", features = ["tokio"] }
console = "0.15"

# Compression
flate2 = "1.0"
zip = "2.2"

# Error handling
thiserror = "1"
anyhow = "1"

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }

# HTML parsing for article extraction
scraper = "0.18"

# Utilities
atty = "0.2"
sha2 = "0.10"
url = "2"
regex = "1"
directories = "5"
futures = "0.3"
futures-util = "0.3"
async-stream = "0.3"
once_cell = "1"
parking_lot = "0.12"
derive_more = { version = "1", features = ["display", "from"] }

bytes = "1.11.1"
dirs = "6.0.0"

[features]
default = []
mcp = ["dep:rmcp", "dep:schemars"]
full = ["mcp"]

[profile.release]
lto = true
codegen-units = 1
strip = true
opt-level = 3

[profile.dev]
opt-level = 1

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

[lib]
name = "gdelt"
path = "src/lib.rs"

[dev-dependencies]
tempfile = "3"
