misc/lean-ctx 3.11.4_1 FreeBSD
Hybrid Context Optimizer: MCP Server, reduces LLM token consumption
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- Last update
- Commit
9c878207a1- License
- MIT
- Categories
- misc
- Package size
- 16411.6 KiB, 79775.3 KiB installed
Description
LeanCTX is a hybrid context optimizer designed to reduce token consumption in AI-assisted software engineering workflows. It acts as a cognitive filter between AI tools and Large Language Models (LLMs), stripping noise like comments and whitespace to lower costs and maximize context efficiency.
Features:
- AST-Aware Compression: Uses Tree-sitter to parse 14 languages, preserving critical types and logic while reducing token counts by up to 90%.
- MCP Server Integration: Provides 24 tools that replace standard file reads with compressed alternatives for any MCP-enabled AI client.
- Automated Shell Hook: Intercepts and compresses output from over 90 common command patterns (git, npm, cargo, docker, kubectl, etc.).
- Privacy and Performance: Single Rust binary with zero dependencies and no cloud requirements.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | misc/lean-ctx | 3.11.4_1 |
| MidnightBSD | ai/lean-ctx | 3.11.4 |
Install
Binary package:
pkg install lean-ctx
From the ports tree:
cd /usr/ports/misc/lean-ctx/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= lean-ctx>0:misc/lean-ctx
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 3.10.5.146 | 3.11.4_1 | - | - | - |
| FreeBSD:14:quarterly | 3.10.5.146 | 3.10.5.146 | n/a | - | - |
| FreeBSD:15:latest | 3.11.4_1 | 3.11.4_1 | n/a | - | - |
| FreeBSD:15:quarterly | 3.10.5.146 | 3.10.5.146 | n/a | n/a | n/a |
| FreeBSD:16:latest | 3.10.5.146 | 3.11.4_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 1
gmake: devel/gmake
Library 1
libzstd.so: archivers/zstd
The full lists below include those, and their dependencies in turn.
Build dependencies 20
Run dependencies 2
No port depends on this one.
Configuration
No options to configure.
- USES
- cargo
- Service scripts
lean-ctx
Message after installing
Files
distinfo 585
| File | Size | SHA256 |
|---|---|---|
| rust/crates/adler2-2.0.1.crate | 13366 | 320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa |
| rust/crates/adobe-cmap-parser-0.4.1.crate | 3841 | ae8abfa9a4688de8fc9f42b3f013b6fffec18ed8a554f5f113577e0b9b3212a3 |
| rust/crates/aead-0.5.2.crate | 15509 | d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0 |
| rust/crates/aes-0.8.4.crate | 124812 | b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0 |
| rust/crates/aes-0.9.2.crate | 112494 | f8eb277bec05f56a0e0591f155a484cbd0f4f07ff2905051a48c72f004f7ed58 |
| rust/crates/ahash-0.8.12.crate | 43413 | 5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75 |
| rust/crates/aho-corasick-1.1.5.crate | 184315 | c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba |
| rust/crates/alloca-0.4.0.crate | 4257 | e5a7d05ea6aea7e9e64d25b9156ba2fee3fdd659e34e41063cd2fc7cd020d7f4 |
| rust/crates/allocator-api2-0.2.21.crate | 63622 | 683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923 |
| rust/crates/android_system_properties-0.1.6.crate | 5625 | ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc |
| rust/crates/anes-0.1.6.crate | 23857 | 4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299 |
| rust/crates/anstream-1.0.0.crate | 28916 | 824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d |
| rust/crates/anstyle-1.0.14.crate | 17787 | 940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000 |
| rust/crates/anstyle-parse-1.0.0.crate | 22042 | 52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e |
| rust/crates/anstyle-query-1.1.5.crate | 10264 | 40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc |
| rust/crates/anstyle-wincon-3.0.11.crate | 12638 | 291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d |
| rust/crates/anyhow-1.0.104.crate | 48819 | 330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470 |
| rust/crates/argon2-0.5.3.crate | 28795 | 3c3610892ee6e0cbce8ae2700349fcf8f98adb0dbfbee85aec3c9179d29cc072 |
| rust/crates/arrayref-0.3.9.crate | 9186 | 76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb |
| rust/crates/arrayvec-0.7.8.crate | 33260 | d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56 |
Commit history 9
The latest 5 of 9 in the history this site was built from.