trs: 托肯- 减少贝壳
将吵闹的终端输出转化为紧凑,结构化的信号. 用于开发者,自动化管道,以及AI代理的CLI工具包.
真代理命令上的代币减少60%. 它漏掉了什么,它说在哪里可以找到.
安装
npm install -g @dpeluche/trs
使用量
# Git (compressed output)
trs git status
trs git diff
trs git log --oneline -20
# Test runners
trs cargo test / go test / pytest / jest / vitest / npm test
# Linters
trs cargo clippy / eslint / ruff / biome / golangci-lint
# Files & search
trs ls -la / find / grep / tree
# Project digest (LLM-ready codebase index)
trs ingest # digest current project
trs ingest --budget 128k # fit to token budget
trs ingest --deps # dependency graph only
# AI tool hooks (auto-rewrite commands through trs)
trs init claude # Claude Code
trs init gemini # Gemini CLI
trs init cursor # Cursor
trs init codex # Codex (AGENTS.md)
# Output-side savings (new in 0.5.7)
trs output-saver # scan agents, suggest install
trs output-saver --install # install rules block into agent configs
# Installation health + docs auditor
trs doctor # check install, PATH, deps
trs audit-docs # lint CLAUDE.md / AGENTS.md for bloat
如何运作
trs 将您已有的命令包裹起来,解析它们的输出,并返回一个紧凑的结构化版本。 工作流程没有变化,只是前缀 trs。 。 。 .
$ git status # 2.1 KB raw output
$ trs git status # 58 bytes (97% reduction)
main | clean | 0 staged
输出格式
trs git status --json # structured JSON
trs git status --compact # human-readable (default)
trs git status --agent # AI-optimized markdown
trs git status --csv # tabular
trs git status --raw # passthrough (tracked)
支持的平台
| 平台 | 建筑 | 页:1 |
|---|---|---|
| 马科斯 | x64, 武装64 | 外壳发射器(-12ms起落架) |
| 链接 | x64, 武装64 | 外壳发射器(-12ms起落架) |
| 窗口 | x64 (韩语) | .cmd 发射器( 需要 Windows x64) |
发射装置
execs 本地二进制直接, node.js 在运行时, 这就是为什么启动与Homebrew安装相同.
链接
一个产品由 地铁 * 出版和维护者 @dPeluChe (英语)
MIT 许可证