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

@kentaylorappdev/pi-condense

v1.0.1

Published

Start a fresh pi session seeded with this conversation's flattened transcript. No LLM summary, no tokens burned, nothing paraphrased.

Downloads

230

Readme

pi-condense

Start a fresh pi session seeded with your conversation's flattened transcript. No LLM summary, no tokens burned, nothing paraphrased.

/condense takes your current session, strips it down to its conversation spine — user and assistant text only — and opens a clean session whose first message is that transcript. The old session stays on disk, untouched, linked as the new session's parent.

Why

Pi's built-in /compact summarizes context with an LLM call: costs tokens, risks losing details in paraphrase, and hides what was dropped inside a summary paragraph.

/condense does it by deletion instead of rewriting:

| | /compact | /condense | |---|---|---| | Cost | 1 LLM call | 0 tokens | | Fidelity | paraphrase risk | exact, verbatim | | What you get | summary paragraph | the raw conversation | | Auditable | no | yes — you can read exactly what the new session knows |

Great for conversation-heavy threads — design discussions, Q&A, planning — where tool output is noise and the text spine is what matters.

Measured

Real numbers from 54 pi sessions (same flatten logic, run over session files):

| | | |---|---| | Average reduction | 95.5% smaller — 7.1 MB of session files → 321 KB of transcript | | Best session | 99.8% smaller | | Cost | 0 tokens, 0 LLM calls |

Install

pi install npm:@kentaylorappdev/pi-condense pi install git:github.com/ktappdev/pi-condense # direct from git


Then reload (`/reload`) or restart pi.

## Usage

/condense


What happens:

1. Waits for the agent to go idle, then flattens the current branch into one transcript: user + assistant text, thinking blocks dropped, tool calls/results dropped, compaction summaries kept.
2. If the transcript is over ~25k tokens, asks before continuing.
3. Creates a new session whose first message *is* the transcript.
4. Sends a kickoff message — the agent picks up where it left off in the clean session.

The old session remains on disk; `/resume` still finds it.

## Trade-offs

- **Tool calls and results don't survive the flatten.** The new session knows what was *said*, not every command that was *run*. Coding sessions with heavy execution state may lose more than a summary would keep.
- **No size reduction on the kept text.** 100 turns of conversation stays 100 turns. For long text-heavy threads, the transcript can be large — hence the 25k-token guard.
- **Condense never deletes.** It forks forward. Worst case, resume the parent.

## Requirements

Pi (tested on 0.84+). TUI mode only — `/condense` refuses non-interactive sessions.