[package]
name = "jiq"
version = "3.31.0"
edition = "2024"
license = "MIT OR Apache-2.0"
description = "Interactive JSON query tool with real-time output"
keywords = ["json", "jq", "cli", "interactive", "tui"]
repository = "https://github.com/bellicose100xp/jiq"
homepage = "https://github.com/bellicose100xp/jiq"
categories = ["command-line-utilities", "development-tools"]

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

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

[dependencies]
# TUI framework
ratatui = "0.29"

# Display-width of strings (CJK double-width, emoji, etc.) for correct popup sizing
unicode-width = "0.2"

# Cross-platform terminal manipulation with dev-tty for piped stdin
crossterm = { version = "0.28.1", features = ["use-dev-tty"] }

# Text editor widget
tui-textarea = "0.7"

# ANSI color code parser for Ratatui
ansi-to-tui = "7"

# Better error handling for TUI apps
color-eyre = "0.6"

# Custom error types
thiserror = "1.0"

# CLI argument parsing
clap = { version = "4.5", features = ["derive"] }

# JSON validation and serialization
serde_json = { version = "1.0", features = ["preserve_order"] }
serde = { version = "1.0", features = ["derive"] }

# Find executables in PATH
which = "6.0"

# Cross-platform directory paths
dirs = "5.0"

# Clipboard support
arboard = "3.4"
base64 = "0.22"

# Configuration file parsing
toml = "0.8"

# Fuzzy matching (fzf-style)
fuzzy-matcher = "0.3"

# SIMD-accelerated byte searching
memchr = "2.7"

# Async HTTP client for AI API calls with streaming and cancellation support
# Use rustls-tls for musl compatibility (avoids OpenSSL linking issues)
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream", "json"] }
tokio = { version = "1", features = ["rt", "sync", "macros"] }
tokio-util = "0.7"
futures = "0.3"
bytes = "1.5"

# AWS SDK for Bedrock AI provider
# Uses default features which include the HTTP client and tokio runtime
# rustls feature provides TLS without OpenSSL dependency for musl compatibility
aws-config = { version = "1", features = ["rustls"] }
aws-sdk-bedrockruntime = { version = "1", features = ["rustls"] }

# Logging (activated via --debug flag or JIQ_DEBUG=1 env var)
log = "0.4"
env_logger = "0.11"
chrono = "0.4"

[dev-dependencies]
# Testing utilities
tempfile = "3.8"
assert_cmd = "2.0"
predicates = "3.0"

# Snapshot testing
insta = { version = "1.40", features = ["yaml"] }

# Property-based testing
proptest = "1.4"

[profile.release]
# Optimize for size and performance
opt-level = 3
lto = true
codegen-units = 1
strip = true

# The profile that 'dist' will build with
[profile.dist]
inherits = "release"
lto = "thin"
