[package]
edition = "2024"
name = "lean-ctx"
version = "3.12.2"
build = false
exclude = ["tests/"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "LeanCTX | OSS: the open-source runtime for the Context Gateway for AI agents. CLI, MCP server, and supported proxy integrations."
homepage = "https://leanctx.com"
readme = "README.md"
keywords = [
"context-gateway",
"mcp",
"llm",
"ai-agents",
"context",
]
categories = [
"command-line-utilities",
"development-tools",
]
license = "Apache-2.0"
repository = "https://github.com/yvgude/lean-ctx"
[package.metadata.binstall]
bin-dir = "{ bin }{ binary-ext }"
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.tar.gz"
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }.zip"
[features]
default = [
"tree-sitter",
"embeddings",
"http-server",
"shape-xlat",
"secure-update",
"jemalloc",
"qdrant",
"pgvector",
"wasm",
]
dev-tools = ["lean-ctx-engine/dev-tools"]
embeddings = [
"lean-ctx-server/embeddings",
"lean-ctx-engine/embeddings",
]
enterprise = [
"lean-ctx-engine/enterprise",
"lean-ctx-proxy/enterprise",
]
grammar-haskell = ["lean-ctx-engine/grammar-haskell"]
grammar-julia = ["lean-ctx-engine/grammar-julia"]
grammar-ocaml = ["lean-ctx-engine/grammar-ocaml"]
grammars-long-tail = ["lean-ctx-engine/grammars-long-tail"]
http-server = [
"lean-ctx-hive/http-server",
"lean-ctx-server/http-server",
"lean-ctx-engine/http-server",
"lean-ctx-proxy/http-server",
"dep:axum",
"dep:rustls",
]
jemalloc = [
"lean-ctx-engine/jemalloc",
"dep:tikv-jemalloc-ctl",
]
no-jail = [
"lean-ctx-hooks/no-jail",
"lean-ctx-server/no-jail",
"lean-ctx-engine/no-jail",
]
onnx = ["lean-ctx-engine/onnx"]
ort-coreml = ["lean-ctx-engine/ort-coreml"]
ort-cuda = ["lean-ctx-engine/ort-cuda"]
ort-directml = ["lean-ctx-engine/ort-directml"]
ort-rocm = ["lean-ctx-engine/ort-rocm"]
ort-webgpu = ["lean-ctx-engine/ort-webgpu"]
pgvector = ["lean-ctx-engine/pgvector"]
qdrant = ["lean-ctx-engine/qdrant"]
secure-update = [
"lean-ctx-engine/secure-update",
"dep:rustls",
]
shape-xlat = [
"lean-ctx-engine/shape-xlat",
"lean-ctx-proxy/shape-xlat",
]
tree-sitter = [
"lean-ctx-hooks/tree-sitter",
"lean-ctx-server/tree-sitter",
"lean-ctx-engine/tree-sitter",
"dep:tree-sitter",
"dep:tree-sitter-bash",
]
wasm = ["lean-ctx-engine/wasm"]
[lib]
name = "lean_ctx_cli"
path = "src/lib.rs"
[[bin]]
name = "lean-ctx"
path = "src/main.rs"
doc = false
[dependencies.anyhow]
version = "1.0"
[dependencies.axum]
version = "0.8"
features = ["ws"]
optional = true
[dependencies.base64]
version = "0.22"
[dependencies.blake3]
version = "1.8"
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.clap]
version = "4.5"
features = ["derive"]
[dependencies.dirs]
version = "6.0"
[dependencies.ed25519-dalek]
version = "2.2"
features = ["rand_core"]
[dependencies.fs2]
version = "0.4"
[dependencies.futures]
version = "0.3"
[dependencies.gethostname]
version = "1.1"
[dependencies.getrandom]
version = "0.4"
[dependencies.glob]
version = "0.3"
[dependencies.hex]
version = "0.4"
[dependencies.http]
version = "1.4"
[dependencies.ignore]
version = "0.4"
[dependencies.lean-ctx-doc]
version = "0.1.0"
[dependencies.lean-ctx-engine]
version = "=3.12.2"
default-features = false
[dependencies.lean-ctx-hive]
version = "=3.12.2"
default-features = false
[dependencies.lean-ctx-hooks]
version = "=3.12.2"
default-features = false
[dependencies.lean-ctx-ocla]
version = "5.0.0"
[dependencies.lean-ctx-protocol]
version = "0.5.0"
[dependencies.lean-ctx-proxy]
version = "=3.12.2"
default-features = false
[dependencies.lean-ctx-server]
version = "=3.12.2"
default-features = false
[dependencies.libc]
version = "0.2"
[dependencies.md-5]
version = "0.11"
[dependencies.rayon]
version = "1.12"
[dependencies.regex]
version = "1.12"
[dependencies.reqwest]
version = "0.13"
features = [
"rustls",
"stream",
"json",
"cookies",
]
default-features = false
[dependencies.rmcp]
version = "2"
features = [
"server",
"client",
"transport-io",
"transport-streamable-http-server",
"transport-child-process",
"transport-streamable-http-client-reqwest",
"auth",
"elicitation",
]
[dependencies.rusqlite]
version = "0.39"
features = ["bundled"]
[dependencies.rustls]
version = "0.23.45"
optional = true
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
features = [
"float_roundtrip",
"raw_value",
]
[dependencies.sha2]
version = "0.11"
[dependencies.subtle]
version = "2.6"
[dependencies.tempfile]
version = "3.27"
[dependencies.thiserror]
version = "2.0"
[dependencies.tokio]
version = "1.52"
features = [
"rt",
"rt-multi-thread",
"macros",
"io-std",
"io-util",
"net",
"sync",
"time",
"signal",
"process",
]
[dependencies.toml]
version = "1.1"
[dependencies.toml_edit]
version = "0.25"
[dependencies.tower]
version = "0.5"
[dependencies.tracing]
version = "0.1"
[dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[dependencies.tree-sitter]
version = "0.26"
optional = true
[dependencies.tree-sitter-bash]
version = "0.25"
optional = true
[dependencies.ureq]
version = "3.3"
features = ["platform-verifier"]
[dependencies.uuid]
version = "1"
features = ["v4"]
[dependencies.walkdir]
version = "2.5"
[dependencies.zeroize]
version = "1"
[dependencies.zip]
version = "9.0.4"
[dev-dependencies.axum]
version = "0.8"
features = ["ws"]
[dev-dependencies.base64]
version = "0.22"
[dev-dependencies.blake3]
version = "1.8"
[dev-dependencies.chrono]
version = "0.4"
features = ["serde"]
[dev-dependencies.dirs]
version = "6.0"
[dev-dependencies.ed25519-dalek]
version = "2.2"
features = ["rand_core"]
[dev-dependencies.filetime]
version = "0.2"
[dev-dependencies.futures]
version = "0.3"
[dev-dependencies.getrandom]
version = "0.4"
[dev-dependencies.hex]
version = "0.4"
[dev-dependencies.insta]
version = "1.48"
[dev-dependencies.jsonschema]
version = "0.46"
default-features = false
[dev-dependencies.lean-ctx-engine]
version = "=3.12.2"
features = ["test-support"]
default-features = false
[dev-dependencies.lean-ctx-server]
version = "=3.12.2"
features = ["test-support"]
default-features = false
[dev-dependencies.proptest]
version = "1.11"
[dev-dependencies.regex]
version = "1.12"
[dev-dependencies.reqwest]
version = "0.13"
features = [
"rustls",
"stream",
"json",
"cookies",
]
default-features = false
[dev-dependencies.rmcp]
version = "2"
features = [
"server",
"client",
"transport-io",
"transport-child-process",
]
[dev-dependencies.serde]
version = "1.0"
features = ["derive"]
[dev-dependencies.serde_json]
version = "1.0"
features = [
"float_roundtrip",
"raw_value",
]
[dev-dependencies.serial_test]
version = "3.5"
[dev-dependencies.sha2]
version = "0.11"
[dev-dependencies.tempfile]
version = "3.27"
[dev-dependencies.tokio]
version = "1.52"
features = [
"rt",
"rt-multi-thread",
"macros",
"io-std",
"io-util",
"net",
"sync",
"time",
"signal",
"process",
]
[dev-dependencies.tokio-rustls]
version = "0.26"
[dev-dependencies.toml]
version = "1.1"
[dev-dependencies.tower]
version = "0.5"
[dev-dependencies.ureq]
version = "3.3"
[dev-dependencies.urlencoding]
version = "2.1"
[dev-dependencies.walkdir]
version = "2.5"
[target.'cfg(all(not(windows), not(target_env = "musl")))'.dependencies.tikv-jemalloc-ctl]
version = "0.7"
features = ["stats"]
optional = true
[target."cfg(unix)".dependencies.libc]
version = "0.2"
[target."cfg(windows)".dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_Globalization",
"Win32_System_Threading",
"Win32_System_ProcessStatus",
"Win32_System_SystemInformation",
"Win32_System_JobObjects",
"Win32_System_Diagnostics_ToolHelp",
"Win32_Security",
"Win32_Security_Authorization",
"Win32_System_Pipes",
"Win32_Storage_FileSystem",
"Wdk_Foundation",
"Wdk_Storage_FileSystem",
"Wdk_System_SystemServices",
"Win32_System_IO",
]
[lints.clippy]
assert_is_empty = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
collapsible_if = "allow"
default_trait_access = "allow"
doc_markdown = "allow"
empty_line_after_doc_comments = "allow"
enum_variant_names = "allow"
float_cmp = "allow"
format_push_string = "allow"
implicit_hasher = "allow"
items_after_statements = "allow"
manual_pattern_char_comparison = "allow"
map_unwrap_or = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_borrow = "allow"
no_effect_underscore_binding = "allow"
return_self_not_must_use = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
struct_field_names = "allow"
too_many_lines = "allow"
trivially_copy_pass_by_ref = "allow"
unnecessary_wraps = "allow"
unreadable_literal = "allow"
unused_self = "allow"
unwrap_used = "warn"
used_underscore_binding = "allow"
useless_conversion = "allow"
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
unreachable_pub = "warn"
[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(tarpaulin)"]