npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-rtk-plugin

v0.2.0

Published

RTK (Reusable Token Kompressor) tool for DeepSeek Harness — token-optimized CLI proxy exposing read/ls/git/grep/err/test/json and more through the standard shell sandbox.

Downloads

100

Readme

dsh-rtk-plugin

RTK (Reusable Token Kompressor) tool for DeepSeek Harness — a high-performance CLI proxy that filters and compresses command output before it reaches the model context, saving substantial tokens.

This bundle exposes RTK as a model-facing rtk tool through the standard ctx.shell capability seam, so every call inherits the harness's sandbox policy, timeout handling, and cancellation exactly like the native bash tool.

What the tool does

The model (and you, via @) gets one tool, rtk, that runs any RTK subcommand with token-optimized output:

| Subcommand | Use | | --- | --- | | read <file> | Read a file with intelligent filtering (-n line numbers, -m N max lines, --tail-lines N, -l minimal\|aggressive) | | ls / find | Compact directory listing / file finding | | git <args> | Compact git output (status, log, diff, branch…) | | grep / rg | Compact search, grouped by file | | err -- <cmd> | Run any command, show only errors/warnings | | test -- <cmd> | Run tests, show only failures | | json <file> | Compact JSON (-d depth, --keys-only for structure only) | | deps | Summarize project dependencies | | diff / log / wc | Condensed diff / deduplicated logs / compact counts | | smart <file> | 2-line technical summary of a file | | summary -- <cmd> | Heuristic summary of command output |

Plus wrappers for tree, gh, glab, aws, psql, pnpm, docker, kubectl, jest, vitest, prisma, tsc, next, lint, prettier, cargo, npm, npx, ruff, playwright, dotnet, wget, env, curl, format.

The tool's command parameter takes the subcommand without the leading rtk (e.g. read -n -m 50 package.json, git status, err -- npm run build).

Prerequisites

  • RTK installed and on the PATH the shell executor uses (brew install rtk / rtk --version to check). If it lives elsewhere, see Configuration.

Install

Into a profile (recommended — survives restarts):

dsh plugin --profile web add dsh-rtk-plugin        # from npm (once published)
dsh plugin --profile web add /path/to/dsh-rtk-plugin  # from a local checkout

Then restart dsh web (or the profile's host) for the composition to pick up the new bundle row.

Uninstall / disable

dsh plugin --profile web remove dsh-rtk-plugin

Or disable just the row in the profile's cordis.patch.yml:

- id: rtk
  disabled: true

Default routing (enforced)

By default (guardBash: true) every single bash command whose first word maps 1:1 to an RTK wrapper (grep, rg, ls, cat→read, git, wc, find) is denied at the tools/guard layer. The denial message tells the model to retry through the rtk tool:

Route 'grep' through the rtk tool ... Retry as rtk command 'grep …'

Compound or piped commands (|, &&, ;, `, $(, >, <, () and multi-line scripts are exempt — RTK cannot wrap them, so they run raw.

Explicit opt-out: when the model really needs raw output, it appends a shell comment that the guard checks for:

grep pattern file.txt # no-rtk   # or: # raw

Either marker lets the call through.

Configuration

The bundle row accepts options via the profile's cordis.patch.yml:

- id: rtk
  name: 'dsh-rtk-plugin'
  config:
    rtkPath: /opt/homebrew/bin/rtk   # default: 'rtk' (PATH resolution)
    guardBash: true                   # default: true — set false to keep rtk opt-in

Notes and limitations

  • rtk gain (savings history) may fail under a file sandbox because its tracking DB lives outside the session workspace — expected, not a tool bug.
  • RTK output is already token-optimized; avoid piping it through additional filters.
  • Non-zero exits are reported as [exit code: N] markers; sandbox denials as [sandbox: file access denied under <mode> mode] — the same vocabulary as the native bash tool.

Development

npm test    # smoke tests (no harness needed)

Pure JavaScript, no build step — index.js is the published source.

License

MIT