Pick whatever fits your stack. All five methods ship the same native binary — the install script is fastest.
curl -fsSL https://usetrs.dev/install.sh | sh
Downloads the right binary into ~/.trs/bin/trs.
Zero runtime deps, no Node overhead, ~12ms startup.
irm https://usetrs.dev/install.ps1 | iex
PowerShell installer. Drops the binary into %USERPROFILE%\.trs\bin\trs.exe.
npm install -g @dpeluche/trs
Cross-platform. optionalDependencies installs only the matching platform binary. Shell launcher at runtime — no Node overhead.
cargo install trs-cli
From source via crates.io. Good if you already have the Rust toolchain.
Download from github.com/dPeluChe/trs/releases
Prebuilt binaries for Linux x64/arm64, macOS x64/arm64, Windows x64.
Prefix any command with trs (or let
trs init wire it into your AI tool for you).
The binary spawns your command, parses the output, and emits a
compact version built for both humans and LLMs.
Raw command runs unchanged. Parsers only reshape what the user sees. No modification of the underlying tool, no custom wrappers to maintain, no context lost.
Short origin note, for the curious.
Token pricing kept climbing. AI coding sessions were burning tens
of thousands of tokens just rendering
git status, cargo test,
and ls -la into the agent's context,
and the signal-to-noise ratio was painfully low. We started writing
small tools — first for ourselves, then for the team —
to reduce what the agent actually had to read.
Along the way we came across rtk (Rust Token Killer). By then our tools had been evolving on their own, so we faced the honest choice: migrate to rtk and drop what we'd built, or continue and publish our own take. We chose to continue — more options in this space means a better fit for more workflows. trs kept iterating and expanding as we learned more about where tokens actually burn.
The more we used it, the more we saw the opportunity was bigger
than input hooks. trs output-saver
installs rules into each agent's global config so replies come
back shorter. trs audit-docs inspects
CLAUDE.md / AGENTS.md for the bloat that loads on every session.
trs ingest compresses whole projects
into an LLM-ready context index. Still a single static binary,
zero runtime deps — the story just got bigger than hooks.
Raw output vs what trs emits. Token counts are rough
(bytes / 4) but directionally accurate.
Click any row to see the actual before/after.
Numbers are representative; your repo and commands will vary. Want to reproduce or compare with other tools? See the internal calibration lab in docs/benchmarks/.
trs ingestA separate superpower. Turns any codebase into an LLM-ready markdown digest: structure, key files, dependency graph, and compressed signatures.
--list.Read on demand.--ollama <model> runs the digest through a local LLM for an executive summary.Typical reductions on commands run dozens of times a day. Use these as rough expectations — not as a leaderboard.
| Command | Raw | trs | Reduction |
|---|---|---|---|
cargo test | 8.1 KB | 58 B | 99% |
cargo clippy | 55 KB | 5.5 KB | 90% |
git log -10 | 7.6 KB | 689 B | 91% |
git status | 1.4 KB | 336 B | 76% |
git diff | 14.6 KB | 8.0 KB | 45% |
gh pr list | 560 B | 348 B | 38% |
env | 2.9 KB | 728 B | 75% |
trs ingest (this repo) | 600+ KB raw source | 16 KB digest | 97% |
--json, --csv, etc.trs json -q '.users[].name'. No dependency on jq.trs read -l aggressive extracts only function signatures. Minimal mode strips comments.trs init --all installs hooks for Claude, Gemini, Cursor, OpenCode, Kilo, Droid (programmatic) and rules for Codex, Antigravity, Windsurf. Smart-merge into existing settings.json — user config preserved. Pre-install collision check flags competing compressor hooks (rtk, token-optimizer) so you migrate cleanly with --replace instead of double-compressing.trs output-saver compresses what they emit. Installs a short anti-preamble / result-first / no-narration rules block into each agent's global config (AGENTS.md / CLAUDE.md / Cursor rules). Check-first by default; --install to commit, --remove to undo. 8 of 9 supported agents.trs audit-docs inspects CLAUDE.md / AGENTS.md / rules files for cross-file duplicates, embedded code/SQL/JSON blocks that belong elsewhere, dead @imports, and code fences whose declared symbols already live in src/. Paired with trs doctor which warns when agent docs exceed their token budget.cd X && git status or cargo fmt && cargo clippy get each rewritable segment wrapped with trs. Pipes and semicolons pass through untouched.trs stats shows cumulative compression, tokens saved per day, top commands. trs stats --by-agent breaks totals down by which AI agent fired each rewrite. JSON output for dashboards.trs rewrite and plugin templates inject TRS_AGENT=<label> into the rewritten command so history logs who fired the run — Claude, Gemini, Cursor, OpenCode, Kilo. Rules-only agents show as (untagged); we don't invent labels we can't verify.trs upgrade detects your install channel (npm / curl|sh) and re-runs it. After a successful binary upgrade it also refreshes hook templates and re-installs the output-saver block where it was already present.trs find --gitignore uses a built-in walker respecting .gitignore. Fast on large repos.
All options ship the same Rust binary. The install script is fastest
— no Node overhead, single curl.
curl -fsSL https://usetrs.dev/install.sh | sh
Downloads the right binary for your platform into
~/.trs/bin/trs. Zero runtime dependencies,
no Node overhead, ~12ms startup. Pin a version with
TRS_VERSION=v0.5.9.
irm https://usetrs.dev/install.ps1 | iex
PowerShell installer. Drops the binary into
%USERPROFILE%\.trs\bin\trs.exe
and prints PATH instructions if needed.
npm install -g @dpeluche/trs
Uses optionalDependencies — npm only
downloads the binary for your platform. A shell launcher execs the
binary directly (no Node at runtime).
cargo install trs-cli
Builds from source. Good if you have the Rust toolchain and want the
absolute latest commit (via --git).
Download from the GitHub Releases page.
Prebuilt binaries for Linux x64/arm64, macOS x64/arm64, and Windows x64.
Drop into your $PATH, chmod +x, done.