@dpeluche/trs

中文文档
0.10.3发布于 2026/11/08MIT零依赖构建来源已验证近 30 天下载 2088

Transform noisy terminal output into compact, structured signal. CLI toolkit for developers, automation pipelines, and AI agents. up to 60% fewer tokens on real agent commands.

原始使用文档
文档目录6 节
  1. Install
  2. Usage
  3. How it works
  4. Output formats
  5. Supported platforms
  6. Links

trs: Token-Reducing Shell

Transform noisy terminal output into compact, structured signal. A CLI toolkit for developers, automation pipelines, and AI agents.

Up to 60% fewer tokens on real agent commands. What it leaves out, it says where to find.

Install

npm install -g @dpeluche/trs

Usage

# 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

How it works

trs wraps your existing commands, parses their output, and returns a compact structured version. No changes to your workflow, just prefix with trs.

$ git status                    # 2.1 KB raw output
$ trs git status                # 58 bytes (97% reduction)
main | clean | 0 staged

Output formats

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)

Supported platforms

PlatformArchitectureNotes
macOSx64, arm64shell launcher (~12ms overhead)
Linuxx64, arm64shell launcher (~12ms overhead)
Windowsx64.cmd launcher (requires Windows x64)

The launcher execs the native binary directly, no Node.js at runtime, which is why startup is on par with a Homebrew install.

A product by Iteris · Published and maintained by @dPeluChe

MIT License

版本与发布记录

@dpeluche/trs 共发布 59 个版本,首次发布于 2026/04/16;过去 12 个月发布了 59 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.10.3latest2026/11/086 天前
0.10.22026/11/077 天前
0.10.12026/11/077 天前
0.10.02026/11/068 天前
0.9.22026/11/068 天前
0.9.12026/11/059 天前

关于 @dpeluche/trs 的常见问题

@dpeluche/trs 是什么?

Transform noisy terminal output into compact, structured signal. CLI toolkit for developers, automation pipelines, and AI agents. up to 60% fewer tokens on real agent commands.

如何安装 @dpeluche/trs?

在项目目录运行 npm install @dpeluche/trs,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 trs,可以用 npx trs 直接运行。

@dpeluche/trs 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/dpeluche__trs 是否存在。

@dpeluche/trs 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=14。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@dpeluche/trs 可以商用吗?

@dpeluche/trs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dpeluche/trs 的下载量有多少?

根据 npm 官方下载统计,@dpeluche/trs 在 2026/10/13 – 2026/11/11 这 30 天内被下载 2,088 次,日均约 70 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dpeluche/trs 还在维护吗?

最新版本 0.10.3 发布于 2026/11/08(6 天前);至今共发布 59 个版本,其中过去 12 个月发布了 59 个;首次发布于 2026/04/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。