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-unipi/input-shortcuts

v0.1.2

Published

Keyboard shortcuts for stash/restore, undo/redo, clipboard, and thinking toggle — chord-based overlay system

Readme

@pi-unipi/input-shortcuts

Keyboard shortcuts for Pi's input box. Stash and restore text, undo/redo, clipboard operations, thinking level toggle, and tab insertion — all via a vim-style chord overlay triggered by ALT+S.

Press ALT+S, a small overlay appears with key hints. Press a key, the action runs. The overlay closes automatically after 300ms or on ESC.

Shortcuts

| Chord | Action | Description | |-------|--------|-------------| | ALT+S → S | Stash/Restore | Save input to stash register, or restore it | | ALT+S → U | Undo | Pop from undo buffer | | ALT+S → R | Redo | Push current text forward, restore previous | | ALT+S → Y | Copy | Copy input to system clipboard | | ALT+S → D | Cut | Copy to clipboard, then clear input | | ALT+S → T | Toggle Thinking | Cycle: off → low → medium → high → xhigh → off | | ALT+S → A → [0-9] | Append Register | Append from numbered register 0-9 | | ALT+S → A → S | Append Stash | Append from stash register | | ALT+I | Tab Insert | Insert literal tab character |

Commands

| Command | Description | |---------|-------------| | /unipi:stash-settings | Open settings TUI for keybinding customization |

Special Triggers

Input-shortcuts is a standalone package. It doesn't register with other packages or trigger coexists behavior.

Every action shows a brief success or error message in the status bar via ctx.ui.setStatus().

How It Works

Registers

  • Stash register: 1 register for quick save/restore
  • Numbered registers: 10 registers (0-9) for stored text snippets
  • Persistence: Saved to .unipi/config/input-shortcuts.json (per-project, atomic writes)

Undo/Redo

  • In-memory ring buffer, max 50 snapshots per session
  • 500ms debounce on snapshot creation (prevents noise from rapid typing)
  • 1s throttle on undo (prevents rapid-fire undo)
  • Redo buffer cleared on new snapshot
  • Not persisted across sessions

Clipboard

Cross-platform clipboard detection with automatic fallback:

| Platform | Read | Write | |----------|------|-------| | Linux (X11) | xclip -selection clipboard -o | xclip -selection clipboard | | Linux (alt) | xsel --clipboard --output | xsel --clipboard --input | | macOS | pbpaste | pbcopy | | Windows | powershell Get-Clipboard | clip / powershell Set-Clipboard |

Detected tool is cached after first use. Returns graceful error if no clipboard tool is available.

Thinking Toggle

Cycles through Pi's thinking levels: off → low → medium → high → xhigh → off.

Configurables

Run /unipi:stash-settings to customize keybindings:

  • Chord trigger key — default alt+s
  • Tab insert key — default alt+i

Both cycle through available ALT key combinations, excluding known conflicts (alt+e = cursorWordRight).

Config persisted to ~/.unipi/config/input-shortcuts-config.json (global).

License

MIT