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

@felan-ai/ext-rtk-optimizer

v0.1.1

Published

RTK command rewriting and tool-output compaction for Felan

Readme

@felan-ai/ext-rtk-optimizer

RTK command rewriting and tool-output compaction for Felan.

The extension delegates rewrite decisions to the rtk rewrite command, so the rtk executable installed in the active runtime remains the source of truth for supported commands and rewrite policy. When rtk is unavailable, the default guard leaves commands unchanged while output compaction continues to work.

Tool support

  • Ordinary tools: rewrites bash.command and compacts bash, read, and grep results.
  • Codex tools: rewrites exec_command.cmd, compacts only the Output: payload inside the structured Codex result envelope, and associates running session IDs with later write_stdin output.
  • Streaming command output has ANSI control sequences removed before display when ANSI stripping is enabled.

Build, test, Git, and linter commands receive command-aware compaction. Search results can be grouped by file. A final character limit protects the context from unusually large command results. Lossy source filtering and smart truncation for read are disabled by default; explicit read ranges and reads of at most 80 lines stay exact even when read compaction is enabled.

Requirements

Install RTK in the execution runtime and make the rtk executable available on its PATH, or run /rtk install. The explicit install command downloads a commit-pinned copy of RTK's official installer, verifies its reviewed SHA-256 digest, and asks that installer for the pinned RTK 0.45.0 release. The upstream installer verifies the release archive checksum before placing the executable in Felan agent storage. It requires curl plus standard Linux/macOS shell utilities; Windows users must place rtk.exe on PATH manually.

Managed RTK is preferred over PATH. Rewritten shell commands receive its bin directory through a command-scoped PATH, so no shell-profile change is required and compound rewrites can resolve every rtk invocation. Use /rtk verify to check the same AgentRuntime used by coding tools. Installation never runs during extension startup or from a model-initiated tool call.

Configuration

The extension stores portable agent-scoped configuration at:

$FELAN_AGENT_DIR/storage/agent/rtk-optimizer/config.json

The file is created with safe defaults on first load. Root sessions and nested subagents share it. Invalid JSON, unknown fields, invalid types, and values outside the documented ranges fall back to defaults for that load and notify the extension host when it exposes a notification channel; the invalid file is not overwritten.

{
  "enabled": true,
  "mode": "rewrite",
  "guardWhenRtkMissing": true,
  "showRewriteNotifications": true,
  "outputCompaction": {
    "enabled": true,
    "stripAnsi": true,
    "readCompaction": {
      "enabled": false
    },
    "truncate": {
      "enabled": true,
      "maxChars": 12000
    },
    "sourceCodeFilteringEnabled": false,
    "preserveExactSkillReads": false,
    "sourceCodeFiltering": "none",
    "smartTruncate": {
      "enabled": false,
      "maxLines": 220
    },
    "aggregateTestOutput": true,
    "filterBuildOutput": true,
    "compactGitOutput": true,
    "aggregateLinterOutput": true,
    "groupSearchOutput": true,
    "trackSavings": true
  }
}

mode is rewrite or suggest. sourceCodeFiltering is none, minimal, or aggressive. truncate.maxChars accepts 1,000–200,000 and smartTruncate.maxLines accepts 40–4,000.

Command

Run /rtk to edit settings interactively. Subcommands are:

  • /rtk show
  • /rtk path
  • /rtk verify
  • /rtk install
  • /rtk stats
  • /rtk clear-stats
  • /rtk reset
  • /rtk help

Metrics are scoped to the current Felan extension session and reset at session start.

Development

Source: packages/ext-rtk-optimizer in https://github.com/felan-ai/felan.

corepack enable
pnpm install --frozen-lockfile
pnpm --filter @felan-ai/ext-rtk-optimizer build
pnpm --filter @felan-ai/ext-rtk-optimizer type-check
pnpm --filter @felan-ai/ext-rtk-optimizer test

Attribution

This package adapts the MIT-licensed pi-rtk-optimizer 0.9.0 implementation. See NOTICE for source provenance.