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

@izhimu/pi-rtk

v0.1.7

Published

RTK integration for pi — transparent command rewriting for 60-90% token savings

Readme

pi-rtk

License: Apache-2.0 pi extension npm version

RTK (Rust Token Killer) integration for pi and oh-my-pi — transparent command rewriting that reduces LLM token consumption by 60-90%.

Upstream: rtk-ai/rtk

Features

  • Transparent rewriting — shell commands automatically use rtk equivalents, no workflow changes
  • 60-90% token savings — tested across 100+ command categories
  • Zero overhead — single Rust binary, <10ms rewrite latency
  • Toggle on/off — /rtk on / /rtk off without restarting
  • Session stats — track rewrites, passthroughs, and errors per session
  • Safe by default — all error paths pass through, RTK never blocks execution

Install

npm (recommended)

pi install @izhimu/pi-rtk

From git

# Global
pi install git:github.com/izhimu/pi-rtk

# Project-local (shared with team via .pi/settings.json)
pi install git:github.com/izhimu/pi-rtk -l

From local path

pi install /path/to/pi-rtk
pi install ./relative/path/to/pi-rtk

Quick test (no install)

pi -e ./extensions/rtk.ts

Commands

| Command | Effect | |---------|--------| | /rtk | Show status (on/off, version, rewrite count) | | /rtk on | Enable rewriting | | /rtk off | Disable rewriting | | /rtk-status | Show project-scoped token savings | | /rtk-status global | Show global token savings |

Supported Categories

| Category | Examples | Savings | |----------|----------|---------| | Test runners | vitest, pytest, cargo test, go test, playwright, bun, deno | 90-99% | | Build tools | cargo build, npm, pnpm, bun, deno, dotnet, make, mvn, gradle | 70-90% | | VCS & Git CLI | git status/log/diff/show, gh, glab | 70-80% | | Language servers | tsc, mypy | 80-83% | | Linters & AST | eslint, ruff, golangci-lint, biome, oxlint, ast-grep | 80-85% | | Package managers | pip, cargo install, pnpm list | 75-80% | | File operations | ls, find, grep, cat, head, tail | 60-75% | | Infrastructure | docker, kubectl, aws, terraform | 75-85% |

Examples

# Before: 2.4k tokens
git status

# After: ~480 tokens (80% savings)
rtk git status

# Before: 8k tokens
cargo test

# After: ~800 tokens (90% savings)
rtk cargo test

Requirements

How It Works

  1. Extension loads, probes rtk --version (disables if missing or too old)
  2. Subscribes to tool_call events, narrows to bash and powershell tools
  3. Calls rtk rewrite <command> for each shell command
  4. If rewrite differs, mutates command in-place
  5. All error paths pass through — RTK never blocks execution

Override

  • RTK_DISABLED=1 prefix skips rewriting for one command
  • Already-prefixed rtk ... commands pass through unchanged

Project Structure

pi-rtk/
├── extensions/
│   └── rtk.ts            # pi ExtensionAPI integration
├── CHANGELOG.md
├── package.json          # pi package manifest
├── tsconfig.json
├── LICENSE
└── README.md

Changelog

See CHANGELOG.md for release history.

Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feat/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feat/amazing-feature)
  5. Open a Pull Request

License

Apache-2.0 © izhimu