dsh-rtk: Compressing Shell Output with Local rtk Before Feeding It to the Model
Introducing @jayyuen66/dsh-rtk (v0.1.2, MIT), a DSH plugin maintained by JayYuen666. It leverages the local rtk CLI to perform prefix rewriting and pipe-based fallback compression on bash/pwsh output before it reaches the model, and includes a settings card that tracks token savings. The article covers installation commands, environment requirements (Node >= 24.9, dsh ^0.2.2-rc.2, rtk >= 1.0.0), verification steps, key configuration options, fail-open behavior, and known boundaries around approval and privacy, making it straightforward to safely enable under a web profile.
Read Moredsh-rtk: Automatically Compress Shell Commands with RTK in DSH
dsh-rtk is a DSH workflow plugin published by maintainer xiao-hans. During the tools/pre-execute stage, it transparently rewrites commands such as ops_bash and pwsh to be routed through RTK, with optional secondary output compression via rtk pipe. The plugin does not modify the RTK core itself; all rewrite and rejection rules are governed by the rtk rewrite registry. If RTK is unavailable or its health probe fails, the plugin gracefully falls back to executing the original command. Based on the official README, this article covers the installation bundle, key configuration options, typical invocation comparisons, and how to coexist with dsh-ops. It is intended for DSH users who already have RTK 1.2.0 or later installed on their PATH.
Read Moredsh-rtk: Wrapping DSH for RTK command rewriting and output compression
dsh-rtk is a DeepSeek Harness plugin maintained by wings1848 (@wingsbutterfly/dsh-rtk, 0.1.2, MIT) that integrates RTK into the tool invocation path: it rewrites commands into semantically equivalent RTK commands before dispatch and runs a compression pipeline (ANSI stripping, build filtering, test aggregation, Git compression, Linter aggregation, search grouping, read compression, hard truncation) before tool outputs enter the model context. The rewrite covers bash/pwsh/ops_bash, while the compression covers bash/read/grep/ops_bash/ops_grep. Operating in three modes (off/rewrite/suggest), RTK always serves as the source of truth for rewriting, and external subprocess calls perform environment desensitization. The Web host includes a configuration page and a dashboard. Note that it is a thin layer on top of RTK: if RTK is not in the PATH, it will stop functioning silently. You must install RTK first using brew/winget/curl or cargo install --git, then install the plugin using `dsh plugin --profile web add @wingsbutterfly/dsh-rtk` and restart the host. It supports dsh 0.1.5/0.1.7/0.2.0/0.2.1, Node >= 22.18.
Read Moredsh-rtk-optimizer: Compressing Shell Visible Output and Suggestions for RTK Command Rewrites
# dsh-rtk-optimizer: DSH Workflow Plugin for Terminal Output Compression **dsh-rtk-optimizer** (v0.1.0), a DSH workflow plugin released by LightJunction, compresses model-visible terminal output during the bash/shell post-execute phase (stripping ANSI codes, aggregating successful test lines and duplicate lines, without truncating failure information), and provides `rtk_rewrite`, `rtk_compact`, and `rtk_stats` commands. Output compression does not require RTK; command suggestions require a locally installed rtk. Requires Node.js 24+ and DSH 0.2.1-rc.2, currently installed locally via `npm pack` and `dsh plugin add` with a local tgz. Adapted from pi-rtk-optimizer as a DSH-independent implementation that does not automatically rewrite dispatched bash commands.
Read MoreAI Token Saver: Compress Command-Line Output Before Feeding to LLM
The AI Token Saver (SkillHub coordinate @user_a10ab3ad/rtk-token-saver-pro, v1.0.10, sourced from the community, categorized under dev-programming, tagged requires_api_key=false) is a CLI proxy that intercepts shell commands and compresses their output, serving as an upstream for the open-source project RTK (rtk-ai/rtk). It compresses the output of commands such as `cargo test`, `git log`, `docker ps`, and `grep` before they enter the LLM context: for tests, it retains only failures; for `git log`, it keeps only hashes and subjects; and for `ls`, it formats the output as a tree with file counts. The pruned, complete output is stored in a local SQLite database and can be retrieved using `rtk recall`. Distributed as a single Rust binary, it supports over 100 commands with a performance overhead of less than 10ms, and is compatible with Claude Code, Cursor, Codex CLI, Copilot, Gemini CLI, Windsurf, and others. The article details the nuances regarding savings calculations: the compression applies to bash output bytes, which does not equate to a direct billing discount. While `rtk gain` estimates tokens using a bytes/4 ratio—meaning percentages are reliable but absolute numbers are approximate—RTK does not reduce output tokens, prompts, or conversation history. Installation can be performed via brew, winget, or official scripts. Enabling the tool requires running `rtk init` separately for each agent, and configuration is centralized in `config.toml`. Important notes include the risk of accidentally installing a project with the same name from crates.io, the incompatibility of two different RTK distributions on the same system, the fact that hooks do not override built-in tools like Read/Grep, and the requirement for Windows users to manually install ripgrep.
Read Moredsh-rtk-optimizer: Bash Rewriting Suggestions and Tool Output Compression
dsh-rtk-optimizer is a DSH Host interceptor plugin maintained by sleepinginsummer, ported from pi-rtk-optimizer. It does not register model tools; instead, it applies globally to bash, grep, and read across all sessions via the tools/pre-execute and post-execute hooks. Before execution, it consults the local rtk binary to either attach a "suggest" annotation or, in rewrite mode, deny the command and provide feedback with a rewritten version. After successful execution, it strips ANSI escape sequences per pipeline, compresses git and test/build output, groups grep results, and applies intelligent truncation. The /rtk command lets you view status, probe rtk, switch modes, and check statistics on saved characters. Installation: dsh plugin --profile <name> add dsh-rtk-optimizer, effective after restart.
Read Moredsh-rtk: A Minimal Native DSH-RTK Connector
dsh-rtk (dsh-rtk-thin), maintained by Piracola, is categorized as a workflow. The plugin does not import the internal executor of the harness; it only calls rtk rewrite at the resolve() boundary of ctx.shell, rewriting simple commands into rtk form. Working directory, timeout, sandbox, and other settings are still inherited from the original executor. Installation: dsh plugin --profile web add github:Piracola/dsh-rtk. By default on Windows, some subcommands are not rewritten. Suitable for developers who already have RTK installed, want to automatically compress shell output in DSH, and wish to be decoupled from the DSH version. MIT licensed, Node ≥ 20.
Read More