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

@lukeramsden/pi-prevent-stuck

v1.0.1

Published

Extension for the pi coding agent: prevent shell commands that commonly hang agents by blocking interactive editors, pagers, REPLs, watch/TUI commands, prompt-only logins, and interactive git rebase.

Readme

@lukeramsden/pi-prevent-stuck

A pi extension that keeps coding agents out of known shell traps: interactive editors, pagers, REPLs, terminal UIs, watch loops, prompt-only logins, and interactive git rebase.

Why

Agents run shell commands through a non-interactive tool boundary. Commands that wait for a full-screen UI, a pager, an editor, a password/login prompt, a REPL, or an interrupt can hang the run until a timeout.

What it blocks

Conservative default blocks include:

  • Editors: vi, vim, nvim, nano, pico, emacs, emacsclient
  • Pagers/help browsers: less, more, most, man, info
  • TUIs and interrupt-only loops: top, htop, btop, watch, tmux, screen, fzf, peco
  • REPLs when run without a script/command: python, python3, node, deno, bun; plus irb, pry, and php -a
  • Interactive database/shell clients unless given a command/file/stdin: psql, mysql, mariadb, sqlite3, redis-cli
  • Remote/file-transfer shells: ssh without a remote command, sftp, ftp
  • Prompt-only Docker auth: docker login unless credentials are provided with --password-stdin or --password
  • git rebase -i / git rebase --interactive unless GIT_SEQUENCE_EDITOR or git -c sequence.editor=... is set inline

Git hardening

For Git commands that are otherwise allowed, the extension prepends:

GIT_TERMINAL_PROMPT=0 GIT_PAGER=cat PAGER=cat GIT_EDITOR=: EDITOR=: VISUAL=:

This disables terminal credential prompts, Git pagers, and editor launches. Interactive rebase is still blocked unless you explicitly provide a non-interactive sequence editor.

Install

pi install npm:@lukeramsden/pi-prevent-stuck

Or try it for a single run:

pi -e npm:@lukeramsden/pi-prevent-stuck

Examples

Blocked:

git rebase -i HEAD~3
vim src/app.ts
less huge.log
docker login -u luke
ssh prod-box
watch npm test

Allowed or rewritten:

git log -n 20                 # rewritten with GIT_PAGER=cat
GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash main
docker login --username foo --password-stdin < token.txt
python -c 'print("ok")'
psql -c 'select 1'
ssh prod-box 'uname -a'

Verify

npm run verify

Research notes

  • Git documents --no-pager, GIT_PAGER=cat, GIT_EDITOR, GIT_ASKPASS, and GIT_TERMINAL_PROMPT=0 for non-interactive behavior.
  • Git documents sequence.editor and GIT_SEQUENCE_EDITOR for git rebase -i todo editing.
  • Docker documents docker login --password-stdin as the non-interactive login path.
  • CircleCI documents that non-interactive shells can time out on prompts and pagers, and recommends disabling pagination such as with git --no-pager.

License

MIT