| Port details |
- lean-ctx Hybrid Context Optimizer: MCP Server, reduces LLM token consumption
- 3.1.2 misc
=0 2.8.2Version of this port present on the latest quarterly branch. - Maintainer: yuri@FreeBSD.org
 - Port Added: 2026-03-29 19:06:30
- Last Update: 2026-04-15 07:43:16
- Commit Hash: 2a59748
- License: MIT
- WWW:
- https://leanctx.com
- https://github.com/yvgude/lean-ctx
- 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.
 ¦ ¦ ¦ ¦ 
- Manual pages:
- FreshPorts has no man page information for this port.
- pkg-plist: as obtained via:
make generate-plist - USE_RC_SUBR (Service Scripts)
- no SUBR information found for this port
- Dependency lines:
-
- To install the port:
- cd /usr/ports/misc/lean-ctx/ && make install clean
- To add the package, run one of these commands:
- pkg install misc/lean-ctx
- pkg install lean-ctx
NOTE: If this package has multiple flavors (see below), then use one of them instead of the name specified above.- PKGNAME: lean-ctx
- Flavors: there is no flavor information for this port.
- distinfo:
- TIMESTAMP = 1776227002
SHA256 (rust/crates/adler2-2.0.1.crate) = 320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa
SIZE (rust/crates/adler2-2.0.1.crate) = 13366
Packages (timestamps in pop-ups are UTC):
- Dependencies
- NOTE: FreshPorts displays only information on required and default dependencies. Optional dependencies are not covered.
- Build dependencies:
-
- rust>=1.94.0 : lang/rust
- pkgconf>=1.3.0_1 : devel/pkgconf
- There are no ports dependent upon this port
Configuration Options:
- No options to configure
- Options name:
- misc_lean-ctx
- USES:
- cargo
- FreshPorts was unable to extract/find any pkg message
- Master Sites:
|
| Commit History - (may be incomplete: for full details, see links to repositories near top of page) |
| Commit | Credits | Log message |
3.1.2 15 Apr 2026 07:43:16
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 3.1.1 → 3.1.2 |
3.1.1 14 Apr 2026 19:40:41
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 3.0.3 → 3.1.1 |
3.0.3 13 Apr 2026 07:57:46
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 3.0.1 → 3.0.3 |
3.0.1 11 Apr 2026 20:37:59
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 3.0.0 → 3.0.1 |
3.0.0 10 Apr 2026 20:52:25
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 2.21.11 → 3.0.0 |
2.21.11 10 Apr 2026 09:40:52
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 2.20.0 → 2.21.11 |
2.20.0 08 Apr 2026 15:19:17
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 2.9.11 → 2.20.0 |
2.9.11 31 Mar 2026 09:46:52
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: update 2.8.2 → 2.9.11 |
2.8.2 29 Mar 2026 19:03:38
    |
Yuri Victorovich (yuri)  |
misc/lean-ctx: New port: Hybrid Context Optimizer: MCP Server, reduces LLM token
consumption |