ig vs RTK
ig ships 141 TOML filter rules and
40 dedicated structured parsers — broader coverage than
rtk's claimed "100+ commands",
plus a trigram-indexed search engine rtk does not have.
On a real benchmark, ig emits 15.5% fewer bytes at identical speed.
Filter Coverage — ig vs RTK
Audited 2026-06-05. ig covers 90+ unique tools across 40 TOML filter files (141 rules) and 40 dedicated JSON/structured parsers. RTK claims "100+ commands" but documents ~63. ig has significantly more coverage in IaC, containers, lint, PHP, .NET, monorepo, and system tools.
| Category | ig | rtk |
|---|---|---|
| Test runners | 12 | 8 |
| Lint / format | 16 | 7 |
| Build | 7 | 2 |
| Containers / K8s | 23 | 7 |
| Cloud / IaC | 18 | 8 |
| Package managers | 8 | 4 |
| Git platforms | 3 | 1 |
| System / network | 13 | 4 |
| Monorepo | 2 | 0 |
| .NET / Elixir / Swift / Java | 4 | 0 |
| Total | 106 | 41 |
Count = distinct tool/subcommand entries. ig's total is verifiable: grep -c '\[\[filters\]\]' filters/*.toml → 141 rules.
RTK's internals are not disclosed.
Real Benchmark — 21 Cases
Benchmark run on the instant-grep codebase itself (~90 Rust source files).
ig v2.3.0 vs rtk 0.42.2, Linux x86_64, ripgrep 15.1.0. Each command timed with date +%s%N, output measured with wc -c.
| Category | Command | ig bytes | rtk bytes | Note |
|---|---|---|---|---|
| search | literal: fn main | 2,858 | 3,128 | |
| search | regex: impl.*Display | 29 | 29 | |
| search | count: pub fn | 1,682 | 1 | rtk -c unsupported |
| search | files-only: todo | 198 | 0 | rtk -l unsupported |
| search | --top 5: filter moat | 2,553 | 16,088 | |
| search | --semantic: error moat | 2,291 | 16,384 | |
| read | full: main.rs | 80,476 | 69,130 | ig keeps line-number prefix |
| read | sigs: main.rs moat | 2,354 | 14,833 | |
| read | full: pipeline.rs | 15,005 | 12,509 | ig keeps line-number prefix |
| read | sigs: pipeline.rs moat | 1,849 | 3,989 | |
| smart | smart: src/filter/ | 36 | 0 | rtk smart dir unsupported |
| smart | smart: src/ | 149 | 0 | rtk smart dir unsupported |
| listing | ls: root | 314 | 286 | |
| listing | ls: src/ | 576 | 548 | |
| git | git status | 253 | 271 | |
| git | git log | 923 | 1,270 | |
| git | git diff | 6,662 | 5,233 | |
| tools | env | 3,346 | 1,026 | |
| tools | deps | 397 | 256 | |
| tools | json: Cargo.toml | 0 | 0 | |
| tools | diff: 2 files | 22,296 | 25,745 |
Aggregate Totals
ig total bytes: 144,247
rtk total bytes: 170,726
ig total time: 2,327 ms
rtk total time: 2,323 ms
Summary
ig emits 15.5% fewer bytes at identical speed (~110ms/cmd).
The moat rows (--top, --semantic, signatures) drive the aggregate advantage: 80-86% byte reduction on queries RTK cannot rank or expand.
Raw CSV: results.csv, summary.md. Previous benchmark (v1.10.0, 115 cases): results.csv, summary.md.
The Index Moat
rtk is a generic output-compression proxy: it shells to rg, git, find... and compresses their output.
ig is a search engine with a persistent index — which unlocks capabilities rtk cannot match without completely redesigning itself.
--top N (BM25 ranking)
Score each matched file by Okapi BM25 and return only the top N. rtk has no tf / df / avdl so it cannot rank — it can only cap flat output length.
ig --top 5 "filter" → 2,553 B rtk grep "filter" → 16,088 B (-84%)
Signature reads (-s)
ig extracts imports + function signatures. rtk strips bodies but keeps far more noise. The gap widens on large files.
ig read src/main.rs -s → 2,354 B rtk read src/main.rs -l aggressive → 14,833 B (-84%)
RTK Functional Gaps
Verified on rtk 0.42.2 (2026-06-05). These are features ig supports that rtk does not.
-
grep -c(count per file) — rtk returns "0" regardless of actual match count. -
grep -l(files-with-matches) — rtk returns empty output. -
smarton directories — rtk fails with "Is a directory". ig supports directory-level summaries. -
symbols,context,pack— ig-only capabilities with no rtk equivalent.
Where rtk Still Wins
- Platform integrations (14 vs 3). rtk supports Cursor, GitHub Copilot, Windsurf, Cline, and other editors out of the box. ig currently targets Claude Code, Codex, and Gemini CLI.
- Full file reads (~15% smaller). ig keeps the
42: contentline-number prefix because it's what lets the Edit tool round-trip precisely. rtk drops it — fewer bytes, less precision. - env / deps compression. rtk's env filter is more aggressive (1.0K vs 3.3K). ig's filter prioritizes security (credential masking) over raw byte count.
Feature Comparison
| Feature | ig | rtk |
|---|---|---|
| Trigram-indexed search engine moat | Yes | No (wraps rg) |
| BM25 --top N ranking moat | Yes | No (no index) |
| --semantic PMI query expansion moat | Yes | No (no index) |
| IDF-weighted sparse n-grams moat | Yes | No |
| Bloom + locMask (3.5-gram) moat | Yes | No |
| ig read -s / smart / symbols / pack moat | Yes | File-only smart |
| Budget mode (entropy-scored) moat | Yes | No |
| Relevance boost (-r) moat | Yes | No |
| Delta reads (git changes) moat | Yes | No |
| grep -c / -l / -i flags moat | All supported | Not supported |
| Directory-level smart summaries moat | Yes | File-only |
| TOML filter rules | 141 rules | Not disclosed |
| Dedicated structured parsers | 40 parsers | Not disclosed |
| Command-output filter wrappers | 40+ wrappers | 100+ claimed |
| 0/1/2/3 hook exit-code protocol | Yes | Yes |
| Permission engine (deny / ask) | Yes | Yes |
| RTK filter import | ig import-rtk | — |
| Agent setup / hook install | 11 agents | 14 platforms |
| Token savings dashboard | ig gain | rtk gain |
| Git output compression | Yes | Yes |
| ls / tree compression | Yes | Yes |
| Process-per-invocation (no daemon) | Yes | Yes |
moat rows mark structural advantages — they require a persistent index, which rtk does not have.
ig gain Dashboard
Real output from ig gain — token savings tracked across all sessions.
ig Token Savings ================================================================ Total commands: 3,445 Input bytes: 28.7M Output bytes: 21.4M Bytes saved: 7.3M (25.4%) By Command (top 20) ----------------------------------------------------------------------- # Command Count Saved Avg% Impact ----------------------------------------------------------------------- 1. ig read -s 343 3.9M 92.7% ========== 2. ig git diff 184 1.9M 70.6% ===== 3. ig run curl 30 716.0K 92.1% == 4. ig run cargo test 43 555.9K 76.1% = 5. ig git log 145 476.6K 46.2% = 6. ig ls 491 358.1K 77.2% = … 20. ig run /tmp/bench/mocks... 14 24.5K 29.3% ----------------------------------------------------------------------- Showing top 20 of 143 commands. Use `ig gain --full` to see the full list.
Reproduce
All benchmark data is published alongside each release:
- v2.3.0 (21 cases, 2026-06-05):
results.csv,summary.md - v1.10.0 (115 cases):
results.csv,summary.md,per-domain.md