scx 0.11.0 ships deterministic context compression for LLMs
The author released scx 0.11.0, a zero-dependency Rust tool that compresses logs, command output, diffs, and stack traces for LLMs while retaining original wording. It identifies evidence lines through IDF-weighted lexical matching, preserves their surrounding context, and enforces token limits by reporting overflow rather than silently discarding evidence. The release is available through crates.io, GitHub Releases, Homebrew, and npm, with an MCP server for integration into agent workflows.
scx provides a deterministic, evidence-first option for managing LLM context budgets without rewriting source text, though its reported performance comes from author-run tests rather than independent evaluation.
版本 0.11.0 已发布:crates.io / GitHub Releases / Homebrew / npm 四平台同步。
几个月前我开始做一个 Rust 项目:在把日志、命令输出、diff、堆栈喂给 LLM 之前,把该留的留下,该删的删掉,而且一个字都不改。到 0.11.0 算是把设计、评测、发布全闭环了,写一篇把关键决策和数据摊开讲。
问题
排查问题时的经典场景:some-noisy-command > /tmp/out.log 2>&1,然后要么硬塞进上下文(贵、关键行被淹没),要么交给通用摘要(改写原文,不敢信),要么随机抽样(可能恰好丢掉根因),要么向量检索(不适合逐行保留原始证据)。
scx 的约束:先证据,后预算
核心是一条纪律:
#scx#Rust#crates.io#GitHub Releases#Homebrew#npm#MCP#Claude#Codex#Cursor