{"id":49783685,"url":"https://github.com/php-workx/agentic-rtk","last_synced_at":"2026-05-11T23:31:33.885Z","repository":{"id":354796643,"uuid":"1224839776","full_name":"php-workx/agentic-rtk","owner":"php-workx","description":"Agentic RTK fork for command-path compression and agent workflow experiments","archived":false,"fork":false,"pushed_at":"2026-05-07T12:06:21.000Z","size":3627,"stargazers_count":0,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-07T13:35:47.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/php-workx.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-29T17:22:38.000Z","updated_at":"2026-05-07T12:06:22.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/php-workx/agentic-rtk","commit_stats":null,"previous_names":["php-workx/agentic-rtk"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/php-workx/agentic-rtk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-workx%2Fagentic-rtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-workx%2Fagentic-rtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-workx%2Fagentic-rtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-workx%2Fagentic-rtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/php-workx","download_url":"https://codeload.github.com/php-workx/agentic-rtk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/php-workx%2Fagentic-rtk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32917018,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"ssl_error","status_checked_at":"2026-05-11T17:08:45.420Z","response_time":120,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-11T23:31:29.376Z","updated_at":"2026-05-11T23:31:33.871Z","avatar_url":"https://github.com/php-workx.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://avatars.githubusercontent.com/u/258253854?v=4\" alt=\"RTK - Rust Token Killer\" width=\"500\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eHigh-performance CLI proxy that reduces LLM token consumption by 60-90%\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/php-workx/agentic-rtk/actions\"\u003e\u003cimg src=\"https://github.com/php-workx/agentic-rtk/workflows/Security%20Check/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/php-workx/agentic-rtk/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/php-workx/agentic-rtk\" alt=\"Release\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://discord.gg/RySmvNF5kF\"\u003e\u003cimg src=\"https://img.shields.io/discord/1470188214710046894?label=Discord\u0026logo=discord\" alt=\"Discord\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://formulae.brew.sh/formula/rtk\"\u003e\u003cimg src=\"https://img.shields.io/homebrew/v/rtk\" alt=\"Homebrew\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.rtk-ai.app\"\u003eWebsite\u003c/a\u003e \u0026bull;\n  \u003ca href=\"#installation\"\u003eInstall\u003c/a\u003e \u0026bull;\n  \u003ca href=\"https://www.rtk-ai.app/guide/troubleshooting\"\u003eTroubleshooting\u003c/a\u003e \u0026bull;\n  \u003ca href=\"ARCHITECTURE.md\"\u003eArchitecture\u003c/a\u003e \u0026bull;\n  \u003ca href=\"https://discord.gg/RySmvNF5kF\"\u003eDiscord\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"README.md\"\u003eEnglish\u003c/a\u003e \u0026bull;\n  \u003ca href=\"README_fr.md\"\u003eFrancais\u003c/a\u003e \u0026bull;\n  \u003ca href=\"README_zh.md\"\u003e中文\u003c/a\u003e \u0026bull;\n  \u003ca href=\"README_ja.md\"\u003e日本語\u003c/a\u003e \u0026bull;\n  \u003ca href=\"README_ko.md\"\u003e한국어\u003c/a\u003e \u0026bull;\n  \u003ca href=\"README_es.md\"\u003eEspanol\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nrtk filters and compresses command outputs before they reach your LLM context. Single Rust binary, 100+ supported commands, \u003c10ms overhead.\n\n## What This Fork Changes (Context Zip)\n\nThis fork adds **Context Zip** — an additional compression layer that runs *after* the existing language-specific filters. It targets the noisy, repetitive output that still slips through: stack traces, package-install logs, build diagnostics, and raw HTML.\n\n### The Four Compressors\n\n| Compressor | What it does | When it triggers |\n|------------|-------------|------------------|\n| **Stacktrace** | Auto-detects Node.js, Python, Rust, Go, and Java stack traces; deduplicates repeated frames; collapses framework/library frames (e.g. `node_modules`, `std::`, `site-packages`) | Any stderr or test output containing stack frames |\n| **Package Install** | Strips npm/pnpm/pip/cargo progress bars, \"already satisfied\", and funding banners; preserves security lines (`CVE-`, `GHSA-`, audit warnings); collapses summaries to one line | `npm install`, `pnpm install`, `pip install`, `cargo build` |\n| **Build Group** | Groups compiler/typechecker errors by error code (TypeScript `TS1234`, Cargo `E0123`, mypy, pylint) and lists every affected (`file:line`) in a single block | `cargo build` / `check` / `clippy`, `tsc`, `mypy`, `pylint` when \u003e=2 identical codes appear |\n| **Web Extract** | Parses HTML with `scraper`, drops navigation/chrome, extracts `\u003cmain\u003e` / `\u003carticle\u003e` / `\u003cbody\u003e` text; also available as `rtk web \u003curl\u003e` | `rtk web`, or any HTML returned by `curl`/`wget` |\n\nAll compressors are **conservative**: they only keep the result when the output is strictly smaller. Unrecognized formats pass through untouched.\n\n### Which Commands Opt In\n\n| Command | Compressors Applied |\n|---------|---------------------|\n| `npm install` / `pnpm install` | PackageInstall + Stacktrace |\n| `npm \u003cother\u003e` / `pnpm \u003cother\u003e` | Stacktrace |\n| `cargo test` | Stacktrace + failure fallback (shows raw stderr tail on non-zero exit) |\n| `cargo build` / `check` / `clippy` | BuildGroup |\n| `pip install` | PackageInstall |\n| `pytest` / `mypy` / `ruff` | Stacktrace or BuildGroup |\n| `docker` / `kubectl` / `grep` / `curl` / `wget` | Varies; some get Stacktrace |\n\n### Tracking \u0026 Telemetry\n\nWhen a compressor delivers savings, RTK tags the command in the local SQLite database with the winning feature (`stacktrace`, `pkg-install`, `build-group`, or `web-extract`). This powers:\n\n- `rtk gain --by-feature` — shows a per-feature breakdown of commands, tokens saved, and average savings percentage.\n- The `session_compactions` table also tracks transcript compaction stats separately so live command savings and historical session compaction never double-count.\n\n\u003e **Example:** `rtk gain --by-feature`  \n\u003e `pkg-install`: 1,240 commands, 890K tokens saved, 72% avg  \n\u003e `stacktrace`: 312 commands, 410K tokens saved, 68% avg\n\n### New in this fork\n\n| Feature | What changed |\n|---------|-------------|\n| **xcodebuild rewrite** | `rtk xcodebuild` is now recognized and rewritten into compact output |\n| **Unicode-safe JSON truncation** | `rtk json` no longer splits multi-byte characters mid-glyph |\n| **curl URL allowlist** | Configure allowed domains in `config.toml` to bypass schema-mode rewrite |\n| **`--json` flag for vitest, jest \u0026 playwright** | Machine-readable JSON envelopes for orchestrators and CI parsers |\n\n## Token Savings (30-min Claude Code Session)\n\n| Operation | Frequency | Standard | rtk | Savings |\n|-----------|-----------|----------|-----|---------|\n| `ls` / `tree` | 10x | 2,000 | 400 | -80% |\n| `cat` / `read` | 20x | 40,000 | 12,000 | -70% |\n| `grep` / `rg` | 8x | 16,000 | 3,200 | -80% |\n| `git status` | 10x | 3,000 | 600 | -80% |\n| `git diff` | 5x | 10,000 | 2,500 | -75% |\n| `git log` | 5x | 2,500 | 500 | -80% |\n| `git add/commit/push` | 8x | 1,600 | 120 | -92% |\n| `cargo test` / `npm test` | 5x | 25,000 | 2,500 | -90% |\n| `ruff check` | 3x | 3,000 | 600 | -80% |\n| `pytest` | 4x | 8,000 | 800 | -90% |\n| `go test` | 3x | 6,000 | 600 | -90% |\n| `docker ps` | 3x | 900 | 180 | -80% |\n| **Total** | | **~118,000** | **~23,900** | **-80%** |\n\n\u003e Estimates based on medium-sized TypeScript/Rust projects. Actual savings vary by project size.\n\n## Installation\n\n### Homebrew (recommended)\n\n```bash\nbrew tap php-workx/tap\nbrew install rtk\n```\n\n### Quick Install (Linux/macOS)\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/php-workx/agentic-rtk/refs/heads/main/install.sh | sh\n```\n\n\u003e Installs to `~/.local/bin`. Add to PATH if needed:\n\u003e ```bash\n\u003e echo 'export PATH=\"$HOME/.local/bin:$PATH\"' \u003e\u003e ~/.bashrc  # or ~/.zshrc\n\u003e ```\n\n### Cargo\n\n```bash\ncargo install --git https://github.com/php-workx/agentic-rtk\n```\n\n### Pre-built Binaries\n\nDownload from [releases](https://github.com/php-workx/agentic-rtk/releases):\n- macOS: `rtk-x86_64-apple-darwin.tar.gz` / `rtk-aarch64-apple-darwin.tar.gz`\n- Linux: `rtk-x86_64-unknown-linux-musl.tar.gz` / `rtk-aarch64-unknown-linux-gnu.tar.gz`\n- Windows: `rtk-x86_64-pc-windows-msvc.zip`\n\n\u003e **Windows users**: Extract the zip and place `rtk.exe` somewhere in your PATH (e.g. `C:\\Users\\\u003cyou\u003e\\.local\\bin`). Run RTK from **Command Prompt**, **PowerShell**, or **Windows Terminal** — do not double-click the `.exe` (it will flash and close). For the best experience, use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) where the full hook system works natively. See [Windows setup](#windows) below for details.\n\n### Verify Installation\n\n```bash\nrtk --version   # Should show \"rtk 0.28.2\"\nrtk gain        # Should show token savings stats\n```\n\n\u003e **Name collision warning**: Another project named \"rtk\" (Rust Type Kit) exists on crates.io. If `rtk gain` fails, you have the wrong package. Use `cargo install --git` above instead.\n\n## Quick Start\n\n```bash\n# 1. Install for your AI tool\nrtk init -g                     # Claude Code (default)\nrtk init -g --gemini            # Gemini CLI\nrtk init -g --codex             # Codex (OpenAI)\nrtk init -g --agent cursor      # Cursor\nrtk init --copilot              # Copilot\nrtk init --agent windsurf       # Windsurf\nrtk init --agent cline          # Cline / Roo Code\nrtk init --agent kilocode       # Kilo Code\nrtk init --agent antigravity    # Google Antigravity\n\n# 2. Restart your AI tool, then test\ngit status  # Automatically rewritten to rtk git status\n```\n\nThe hook transparently rewrites Bash commands (e.g., `git status` -\u003e `rtk git status`) before execution. Claude never sees the rewrite, it just gets compressed output.\n\n**Important:** the hook only runs on Bash tool calls. Claude Code built-in tools like `Read`, `Grep`, and `Glob` do not pass through the Bash hook, so they are not auto-rewritten. To get RTK's compact output for those workflows, use shell commands (`cat`/`head`/`tail`, `rg`/`grep`, `find`) or call `rtk read`, `rtk grep`, or `rtk find` directly.\n\n## How It Works\n\n```\n  Without rtk:                                    With rtk:\n\n  Claude  --git status--\u003e  shell  --\u003e  git         Claude  --git status--\u003e  RTK  --\u003e  git\n    ^                                   |            ^                      |          |\n    |        ~2,000 tokens (raw)        |            |   ~200 tokens        | filter   |\n    +-----------------------------------+            +------- (filtered) ---+----------+\n```\n\nFour strategies applied per command type:\n\n1. **Smart Filtering** - Removes noise (comments, whitespace, boilerplate)\n2. **Grouping** - Aggregates similar items (files by directory, errors by type)\n3. **Truncation** - Keeps relevant context, cuts redundancy\n4. **Deduplication** - Collapses repeated log lines with counts\n\n## Commands\n\n### Files\n```bash\nrtk ls .                        # Token-optimized directory tree\nrtk read file.rs                # Smart file reading\nrtk read file.rs -l aggressive  # Signatures only (strips bodies)\nrtk smart file.rs               # 2-line heuristic code summary\nrtk find \"*.rs\" .               # Compact find results\nrtk grep \"pattern\" .            # Grouped search results\nrtk diff file1 file2            # Condensed diff\n```\n\n### Git\n```bash\nrtk git status                  # Compact status\nrtk git log -n 10               # One-line commits\nrtk git diff                    # Condensed diff\nrtk git add                     # -\u003e \"ok\"\nrtk git commit -m \"msg\"         # -\u003e \"ok abc1234\"\nrtk git push                    # -\u003e \"ok main\"\nrtk git pull                    # -\u003e \"ok 3 files +10 -2\"\n```\n\n### GitHub CLI\n```bash\nrtk gh pr list                  # Compact PR listing\nrtk gh pr view 42               # PR details + checks\nrtk gh issue list               # Compact issue listing\nrtk gh run list                 # Workflow run status\n```\n\n### Test Runners\n```bash\nrtk jest                        # Jest compact (failures only)\nrtk vitest                      # Vitest compact (failures only)\nrtk playwright test             # E2E results (failures only)\nrtk pytest                      # Python tests (-90%)\nrtk go test                     # Go tests (NDJSON, -90%)\nrtk cargo test                  # Cargo tests (-90%)\nrtk rake test                   # Ruby minitest (-90%)\nrtk rspec                       # RSpec tests (JSON, -60%+)\nrtk err \u003ccmd\u003e                   # Filter errors only from any command\nrtk test \u003ccmd\u003e                  # Generic test wrapper - failures only (-90%)\n```\n\n### Build \u0026 Lint\n```bash\nrtk lint                        # ESLint grouped by rule/file\nrtk lint biome                  # Supports other linters\nrtk tsc                         # TypeScript errors grouped by file\nrtk next build                  # Next.js build compact\nrtk prettier --check .          # Files needing formatting\nrtk cargo build                 # Cargo build (-80%)\nrtk cargo clippy                # Cargo clippy (-80%)\nrtk ruff check                  # Python linting (JSON, -80%)\nrtk golangci-lint run           # Go linting (JSON, -85%)\nrtk rubocop                     # Ruby linting (JSON, -60%+)\nrtk xcodebuild                  # iOS/macOS build output compact\n```\n\n### Package Managers\n```bash\nrtk pnpm list                   # Compact dependency tree\nrtk pip list                    # Python packages (auto-detect uv)\nrtk pip outdated                # Outdated packages\nrtk bundle install              # Ruby gems (strip Using lines)\nrtk prisma generate             # Schema generation (no ASCII art)\n```\n\n### AWS\n```bash\nrtk aws sts get-caller-identity # One-line identity\nrtk aws ec2 describe-instances  # Compact instance list\nrtk aws lambda list-functions   # Name/runtime/memory (strips secrets)\nrtk aws logs get-log-events     # Timestamped messages only\nrtk aws cloudformation describe-stack-events  # Failures first\nrtk aws dynamodb scan           # Unwraps type annotations\nrtk aws iam list-roles          # Strips policy documents\nrtk aws s3 ls                   # Truncated with tee recovery\n```\n\n### Containers\n```bash\nrtk docker ps                   # Compact container list\nrtk docker images               # Compact image list\nrtk docker logs \u003ccontainer\u003e     # Deduplicated logs\nrtk docker compose ps           # Compose services\nrtk kubectl pods                # Compact pod list\nrtk kubectl logs \u003cpod\u003e          # Deduplicated logs\nrtk kubectl services            # Compact service list\n```\n\n### Data \u0026 Analytics\n```bash\nrtk json config.json            # Structure without values (Unicode-aware truncation)\nrtk deps                        # Dependencies summary\nrtk env -f AWS                  # Filtered env vars\nrtk log app.log                 # Deduplicated logs\nrtk curl \u003curl\u003e                  # Truncate + save full output (respects URL allowlist)\nrtk wget \u003curl\u003e                  # Download, strip progress bars\nrtk web \u003curl\u003e                   # Extract readable web page text\nrtk summary \u003clong command\u003e      # Heuristic summary\nrtk proxy \u003ccommand\u003e             # Raw passthrough + tracking\n```\n\n### Token Savings Analytics\n```bash\nrtk gain                        # Summary stats\nrtk gain --graph                # ASCII graph (last 30 days)\nrtk gain --history              # Recent command history\nrtk gain --daily                # Day-by-day breakdown\nrtk gain --all --format json    # JSON export for dashboards\n\nrtk discover                    # Find missed savings opportunities\nrtk discover --all --since 7    # All projects, last 7 days\n\nrtk session                     # Show RTK adoption across recent sessions\n```\n\n## Global Flags\n\n```bash\n-u, --ultra-compact    # ASCII icons, inline format (extra token savings)\n-v, --verbose          # Increase verbosity (-v, -vv, -vvv)\n    --json             # Machine-readable JSON envelope (full/degraded tiers untruncated; passthrough `raw` may be truncated)\n```\n\n### JSON output for programmatic consumers\n\nThe `--json` flag emits a stable JSON envelope on stdout instead of the human formatter. For `full` and `degraded` tiers it bypasses the top-N truncation that compact mode applies (e.g. `take(5)` for failures), which makes it suitable for orchestrators, CI parsers, and downstream tools that need every item. For the `passthrough` tier (parser fallback) the envelope's `raw` field is still truncated to `passthrough_max_chars` per the envelope contract.\n\n`--json` conflicts with `-v` / `--verbose` and `--ultra-compact` (clap rejects with exit code 2).\n\n**Currently supported by:** `vitest`, `jest`, `playwright`. Other tools (`tsc`, `lint`, `prettier`, `prisma`, `next`) keep their human formatters; JSON support for them is tracked as follow-up work.\n\n**Envelope shape:**\n\n```jsonc\n{\n  \"tool\": \"\u003ctool-name\u003e\",          // e.g. \"vitest\", \"playwright\"\n  \"tier\": \"full\" | \"degraded\" | \"passthrough\",\n  \"exit\": \u003ci32\u003e,                  // underlying tool's exit code\n  \"data\": \u003cT\u003e,                    // present iff tier ∈ {full, degraded}\n  \"warnings\": [\"…\"],              // present iff tier == degraded\n  \"raw\": \"\u003ctruncated string\u003e\"     // present iff tier == passthrough\n}\n```\n\n**Examples:**\n\n```bash\nrtk --json vitest                         # full vitest TestResult, all failures\nrtk --json playwright test                # full playwright TestResult, all suites\nrtk --json jest                           # jest, same envelope as vitest\n```\n\nPipe directly into `jq` for filtering:\n\n```bash\nrtk --json vitest | jq '.data.failures[] | {test_name, file_path}'\n```\n\n## Examples\n\n**Directory listing:**\n```\n# ls -la (45 lines, ~800 tokens)        # rtk ls (12 lines, ~150 tokens)\ndrwxr-xr-x  15 user staff 480 ...       my-project/\n-rw-r--r--   1 user staff 1234 ...       +-- src/ (8 files)\n...                                      |   +-- main.rs\n                                         +-- Cargo.toml\n```\n\n**Git operations:**\n```\n# git push (15 lines, ~200 tokens)       # rtk git push (1 line, ~10 tokens)\nEnumerating objects: 5, done.             ok main\nCounting objects: 100% (5/5), done.\nDelta compression using up to 8 threads\n...\n```\n\n**Test output:**\n```\n# cargo test (200+ lines on failure)     # rtk test cargo test (~20 lines)\nrunning 15 tests                          FAILED: 2/15 tests\ntest utils::test_parse ... ok               test_edge_case: assertion failed\ntest utils::test_format ... ok              test_overflow: panic at utils.rs:18\n...\n```\n\n## Auto-Rewrite Hook\n\nThe most effective way to use rtk. The hook transparently intercepts Bash commands and rewrites them to rtk equivalents before execution.\n\n**Result**: 100% rtk adoption across all conversations and subagents, zero token overhead.\n\n**Scope note:** this only applies to Bash tool calls. Claude Code built-in tools such as `Read`, `Grep`, and `Glob` bypass the hook, so use shell commands or explicit `rtk` commands when you want RTK filtering there.\n\n### Setup\n\n```bash\nrtk init -g                 # Install hook + RTK.md (recommended)\nrtk init -g --opencode      # OpenCode plugin (instead of Claude Code)\nrtk init -g --auto-patch    # Non-interactive (CI/CD)\nrtk init -g --hook-only     # Hook only, no RTK.md\nrtk init --show             # Verify installation\n```\n\nAfter install, **restart Claude Code**.\n\n## Windows\n\nRTK works on Windows with some limitations. The auto-rewrite hook (`rtk-rewrite.sh`) requires a Unix shell, so on native Windows RTK falls back to **CLAUDE.md injection mode** — your AI assistant receives RTK instructions but commands are not rewritten automatically.\n\n### Recommended: WSL (full support)\n\nFor the best experience, use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) (Windows Subsystem for Linux). Inside WSL, RTK works exactly like Linux — full hook support, auto-rewrite, everything:\n\n```bash\n# Inside WSL\ncurl -fsSL https://raw.githubusercontent.com/php-workx/agentic-rtk/refs/heads/main/install.sh | sh\nrtk init -g\n```\n\n### Native Windows (limited support)\n\nOn native Windows (cmd.exe / PowerShell), RTK filters work but the hook does not auto-rewrite commands:\n\n```powershell\n# 1. Download and extract rtk-x86_64-pc-windows-msvc.zip from releases\n# 2. Add rtk.exe to your PATH\n# 3. Initialize (falls back to CLAUDE.md injection)\nrtk init -g\n# 4. Use rtk explicitly\nrtk cargo test\nrtk git status\n```\n\n**Important**: Do not double-click `rtk.exe` — it is a CLI tool that prints usage and exits immediately. Always run it from a terminal (Command Prompt, PowerShell, or Windows Terminal).\n\n| Feature | WSL | Native Windows |\n|---------|-----|----------------|\n| Filters (cargo, git, etc.) | Full | Full |\n| Auto-rewrite hook | Yes | No (CLAUDE.md fallback) |\n| `rtk init -g` | Hook mode | CLAUDE.md mode |\n| `rtk gain` / analytics | Full | Full |\n\n## Supported AI Tools\n\nRTK supports 12 AI coding tools. Each integration transparently rewrites shell commands to `rtk` equivalents for 60-90% token savings.\n\n| Tool | Install | Method |\n|------|---------|--------|\n| **Claude Code** | `rtk init -g` | PreToolUse hook (bash) |\n| **GitHub Copilot (VS Code)** | `rtk init --copilot` | PreToolUse hook — transparent rewrite |\n| **GitHub Copilot CLI** | `rtk init --copilot` | PreToolUse deny-with-suggestion (CLI limitation) |\n| **Cursor** | `rtk init -g --agent cursor` | preToolUse hook (hooks.json) |\n| **Gemini CLI** | `rtk init -g --gemini` | BeforeTool hook |\n| **Codex** | `rtk init -g --codex` | AGENTS.md + RTK.md instructions |\n| **Windsurf** | `rtk init --agent windsurf` | .windsurfrules (project-scoped) |\n| **Cline / Roo Code** | `rtk init --agent cline` | .clinerules (project-scoped) |\n| **OpenCode** | `rtk init -g --opencode` | Plugin TS (tool.execute.before) |\n| **OpenClaw** | `openclaw plugins install ./openclaw` | Plugin TS (before_tool_call) |\n| **Kilo Code** | `rtk init --agent kilocode` | .kilocode/rules/rtk-rules.md (project-scoped) |\n| **Google Antigravity** | `rtk init --agent antigravity` | .agents/rules/antigravity-rtk-rules.md (project-scoped) |\n\nFor per-agent setup details, override controls, and graceful degradation, see the [Supported Agents guide](https://www.rtk-ai.app/guide/getting-started/supported-agents).\n\n## Configuration\n\n`~/.config/rtk/config.toml` (macOS: `~/Library/Application Support/rtk/config.toml`):\n\n```toml\n[hooks]\nexclude_commands = [\"curl\", \"playwright\"]  # skip rewrite for these\n\n[tee]\nenabled = true          # save raw output on failure (default: true)\nmode = \"failures\"       # \"failures\", \"always\", or \"never\"\n```\n\nWhen a command fails, RTK saves the full unfiltered output so the LLM can read it without re-executing:\n\n```\nFAILED: 2/15 tests\n[full output: ~/.local/share/rtk/tee/1707753600_cargo_test.log]\n```\n\nFor the full config reference (all sections, env vars, per-project filters), see the [Configuration guide](https://www.rtk-ai.app/guide/getting-started/configuration).\n\n### Uninstall\n\n```bash\nrtk init -g --uninstall     # Remove hook, RTK.md, settings.json entry\ncargo uninstall rtk          # Remove binary\nbrew uninstall rtk           # If installed via Homebrew\n```\n\n## Documentation\n\n- **[rtk-ai.app/guide](https://www.rtk-ai.app/guide)** — full user guide (installation, supported agents, what gets optimized, analytics, configuration, troubleshooting)\n- **[INSTALL.md](INSTALL.md)** — detailed installation reference\n- **[ARCHITECTURE.md](ARCHITECTURE.md)** — system design and technical decisions\n- **[CONTRIBUTING.md](CONTRIBUTING.md)** — contribution guide\n- **[SECURITY.md](SECURITY.md)** — security policy\n\n## Privacy \u0026 Telemetry\n\nRTK can collect **anonymous, aggregate usage metrics** once per day. Telemetry is **disabled by default** and requires **explicit opt-in consent** (GDPR Art. 6, 7) during `rtk init` or via `rtk telemetry enable`. This data helps us build a better product: identifying which commands need filters, which filters need improvement, and how much value RTK delivers. For the full list of fields, data handling, and contributor guidelines, see **[docs/TELEMETRY.md](docs/TELEMETRY.md)**.\n\n**What is collected and why:**\n\n| Category | Data | Why |\n|----------|------|-----|\n| Identity | Salted device hash (SHA-256, not reversible) | Count unique installations without tracking individuals |\n| Environment | RTK version, OS, architecture, install method | Know which platforms to support and test |\n| Usage volume | Command count (24h), total commands, tokens saved (24h/30d/total) | Measure adoption and value delivered |\n| Quality | Top 5 passthrough commands (0% savings), parse failure count, commands with \u003c30% savings | Identify missing filters and weak ones to improve |\n| Ecosystem | Command category distribution (e.g. git 45%, cargo 20%, js 15%) | Prioritize filter development for popular ecosystems |\n| Retention | Days since first use, active days in last 30 | Understand engagement and detect churn |\n| Adoption | AI agent hook type (claude/gemini/codex), custom TOML filter count | Track integration coverage and DSL adoption |\n| Configuration | Whether config.toml exists, number of excluded commands, project count | Understand user maturity and customization patterns |\n| Features | Usage counts for meta-commands (gain, discover, proxy, verify) | Know which RTK features are valued vs unused |\n| Economics | Estimated USD savings (based on API token pricing) | Quantify the value RTK provides to users |\n\nAll data is **aggregate counts or anonymized command names** (first 3 words, no arguments). Top commands report only tool names (e.g. \"git\", \"cargo\"), never full command lines.\n\n**What is NOT collected:** source code, file paths, command arguments, secrets, environment variables, personal data, or repository contents.\n\n**Manage telemetry:**\n```bash\nrtk telemetry status     # Check current consent state\nrtk telemetry enable     # Give consent (interactive prompt)\nrtk telemetry disable    # Withdraw consent — stops all collection immediately\nrtk telemetry forget     # Withdraw consent + delete all local data + request server-side erasure\n```\n\n**Override via environment:**\n```bash\nexport RTK_TELEMETRY_DISABLED=1   # Blocks telemetry regardless of consent\n```\n\n## Core team\n\n- **Patrick Szymkowiak** — Founder\n  [GitHub](https://github.com/pszymkowiak) · [LinkedIn](https://www.linkedin.com/in/patrick-szymkowiak/)\n- **Florian Bruniaux** — Core contributor\n  [GitHub](https://github.com/FlorianBruniaux) · [LinkedIn](https://www.linkedin.com/in/florian-bruniaux-43408b83/)\n- **Adrien Eppling** — Core contributor\n  [GitHub](https://github.com/aeppling) · [LinkedIn](https://www.linkedin.com/in/adrien-eppling/)\n\n## Contributing\n\nContributions welcome! Please open an issue or PR on [GitHub](https://github.com/php-workx/agentic-rtk).\n\nJoin the community on [Discord](https://discord.gg/RySmvNF5kF).\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n## Disclaimer\n\nSee [DISCLAIMER.md](DISCLAIMER.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-workx%2Fagentic-rtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphp-workx%2Fagentic-rtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphp-workx%2Fagentic-rtk/lists"}