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.
Ten agents, three install mechanisms. trs init --all --global wires every detected agent in one shot.
| Agent | Install method | Input hook | Output-saver | Attribution |
|---|---|---|---|---|
| Claude Code · Gemini · Cursor | programmatic hook | ✓ | ✓ | claude / gemini / cursor |
| OpenCode · Kilo Code | plugin template | ✓ | ✓ | opencode / kilo |
| Factory Droid | programmatic hook | ✓ | ✓ | claude (shared envelope) |
Antigravity IDE · Antigravity CLI (agy) | rules file (why) | — | ✓ | (untagged) |
| Codex CLI · Windsurf | rules file only | — | ✓ | (untagged) |
Full matrix + caveats + per-agent config paths: docs/support/agents.md.
Thirty-plus dedicated parsers. Anything else falls to generic compression (~30–40% free) and still tracks in stats.
git — status, diff, log, branch, push, pull, fetch, show, stash.cargo — build, check, test, clippy, fmt, install.npm, pnpm, yarn, bun, npx, pnpm dlx — install, test, ls, audit, run.pytest, pip, uv, plus python3 -m <mod> routing for pytest / mypy / ruff / pylint / flake8.go — test, build, mod.pytest, jest, vitest — full parse of suite summary, failures, tracebacks.eslint, biome, ruff, pylint, golangci-lint, cargo clippy, tsc — issues grouped by file + rule.ls (+ eza, lsd, exa), find (+ fd), grep (+ rg, ag, ack), tree, tail. Plus cat, head, sed -n X,Yp intercepted with comment stripping.docker (ps, logs, build) and gh (pr list, pr view, issue list, run list + gh api).ps, env, wc, brew, curl, wget.cd X && cargo test wraps each rewritable segment. Pipes and semicolons pass through untouched.RUSTFLAGS=x cargo build keeps the leading assignment — still reaches cargo after the rewrite.Full command reference with subcommands and examples: docs/support/commands.md.
Short origin note, for the curious — click to expand.
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/development/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% |
trs output-saver
trs rewrite compresses what agents
see. trs output-saver closes
the other side of the loop by installing a compact rules block
that compresses what agents emit: no preambles, no
narration, result-first, no hallucinated paths.
agy) is rules-only as of v0.6.6 — agy v1.0.1 doesn't yet expose user-configurable PreTool hooks (research).--install to write, trs uninstall --output-saver to remove cleanly across every agent.--install updates in place; your other rules stay untouched.Full reference: docs/features/output-saver.md.
--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 audit-docs inspects CLAUDE.md / AGENTS.md / rules files for cross-file duplicates, embedded code/SQL/JSON blocks, dead @imports, and code fences whose symbols already live in src/. Paired with trs doctor warnings when agent docs exceed their token budget.trs stats shows cumulative compression, tokens saved per day, top commands. trs stats --by-agent breaks totals down by agent. -n N adjusts row counts. 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 present.trs debug-info packages version, platform, doctor checks, recent history, and tee logs into one paste-ready report. Use it when filing an issue or sharing a repro.trs init scans target configs for hooks from other token-compression tools (following @imports too) and aborts by default. --replace migrates cleanly; --force stacks at your own risk.trs uninstall walks every surface trs init wrote — JSON hooks (preserves user-added entries), plugin files, Codex sentinel blocks, output-saver sidecars. Interactive by default, or --all / --tool / --output-saver / --dry-run for scripts.time, nohup, noglob, command are recognized automatically. Project-specific wrappers (docker exec myapp, poetry run, direnv exec .) plug in via [hooks].transparent_prefixes in ~/.trs/config.toml.
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.12.
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.