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

@pi-kaush/pi-double-paste

v0.1.1

Published

Paste the same large block twice to expand Pi's paste markers into editable text.

Downloads

404

Readme

@pi-kaush/pi-double-paste

Paste the same large block twice to expand Pi's compact paste markers into ordinary editable text.

Why

Pi keeps its editor readable by collapsing large pastes into markers such as:

[paste #1 +123 lines]

That is useful until you need to edit the pasted text. This extension keeps Pi's normal first-paste behavior and treats an identical second paste as a request to expand every current marker.

Lightweight by design: This extension uses only Pi's native, public extension APIs. It does not replace, wrap, or rebuild the input editor.

Install

After the first npm release:

pi install npm:@pi-kaush/[email protected]

For local development:

pi -e ./extensions/pi-double-paste/src/index.ts

Use

  1. Paste a block longer than 10 lines or 1,000 characters.
  2. Pi displays its normal compact marker.
  3. Paste the same block again within three seconds.
  4. The second paste is not duplicated; all current markers become editable text.
  5. Pi briefly confirms the expansion with a “Paste expanded.” notification.

Short pastes and non-matching long pastes retain Pi's normal behavior.

Compatibility

This extension does not replace or wrap Pi's input editor. It uses only Pi's public extension APIs:

  • ctx.ui.onTerminalInput()
  • ctx.ui.getEditorText()
  • ctx.ui.setEditorText()

That allows it to compose with custom editors that implement Pi's public editor contract. Extensions that deliberately make every first paste fully expanded have overlapping semantics; double-pasting still means “do not duplicate this content.”

Minimal impact by design

Adding this extension to an existing Pi setup has negligible runtime impact:

  • it does not replace, wrap, or retain the active editor;
  • ordinary keystrokes perform only a cheap bracketed-paste check;
  • hashing and editor reads happen only for large paste events;
  • it stores only short-lived hashes and timestamps, not another copy of pasted content;
  • it starts no background tasks, timers, processes, filesystem watchers, or network requests;
  • it returns input unchanged except for the confirmed matching second large paste.

The one intentional interaction is that a matching second paste is consumed and the active editor's already-expanded content is written back through Pi's public API. If another extension also consumes that exact paste first, behavior depends on extension load order, but neither extension needs to take ownership of the editor.

Requires Pi 0.80.6 or newer for the initial release.

Security and performance

The published package contains readable TypeScript and has:

  • no runtime dependencies;
  • no install scripts;
  • no tools or prompt/system-message hooks;
  • no filesystem, network, subprocess, environment, clipboard, or model access;
  • no telemetry.

Ordinary input takes only a bracketed-paste prefix check. Hashing and editor reads happen only for large paste events.

Development

From the repository root:

npm ci --ignore-scripts
npm run check

Inspect the exact publish payload:

npm pack --workspace @pi-kaush/pi-double-paste --dry-run

License

MIT