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

claudescreenfix-hardwicksoftware

v2.1.0

Published

fixes the scroll glitch in claude code cli - now with GLITCH DETECTION, 120-line limit enforcement, and auto-recovery

Readme

claudescreenfix-hardwicksoftware | justcalljon.pro

yo this fixes the scroll glitch that's been cooking everyone using claude code. you know the one - after like 30 minutes your terminal starts lagging, scrolling takes forever, and eventually the whole thing just dies.

shoutout to the big dogs who should probably just fix this themselves

hey @anthropics yall made a sick product but this scrollback thing been cooking people for months lol. maybe steal this fix idc

  • @karpathy - andrej you literally built tesla autopilot you could prob fix this in 5 min
  • @gdb - greg brockman openai president, yall next with codex btw dont make the same mistake
  • @yoheinakajima - babyagi goat, agent builders been struggling with this
  • @lllyasviel - controlnet legend, sd-forge too, you know terminal pain
  • @sama - sam you should try claude code sometime since chatgpt cant even write a working script without refusing half the prompts. also sora slapping watermarks on everything is straight clown behavior, nobody asked for that. yall so worried about "safety" you forgot to make stuff that actually works. openai been mid lately fr

real talk tho @anthropics just add \x1b[3J to your clear command and debounce SIGWINCH. thats literally it. im not even asking for credit just fix it for everyone 💀

what's the problem

so here's the deal. claude code uses ink (it's like react but for terminals). every time something updates, ink re-renders everything. that's fine normally.

but here's where it gets ugly - it doesn't clear the scrollback buffer. ever. not once.

so after a while you've got thousands of lines sitting in your terminal's memory. every single re-render has to process all of em. resize your window? that triggers a re-render too. tmux users get hit especially hard cuz resize events fire like crazy with no chill.

the result: your terminal slows to a crawl. scrolling back takes 30+ seconds. your fans spin up. it's bad. real talk it's been annoying everyone.

what this does

hooks into node's stdout at startup and does three things:

  1. clears scrollback periodically - every 500 renders or 60 seconds, whichever comes first. your buffer won't grow forever anymore
  2. debounces resize events - instead of firing 50 times a second, it waits 150ms for things to settle. tmux users you're welcome
  3. actually clears on /clear - the /clear command only clears the screen, not scrollback. we fix that. it's kinda wild they didn't do this already

no patches to claude code itself. works with any version. just loads before claude starts and you're good.

install

npm install -g claudescreenfix-hardwicksoftware

that's it. you don't need anything else.

usage

option 1: use the wrapper (easiest)

claude-fixed

instead of running claude, run claude-fixed. it finds your claude install and runs it with the fix loaded. couldn't be simpler.

option 2: alias it

throw this in your .bashrc or .zshrc:

alias claude='claude-fixed'

now claude automatically uses the fix. you won't even notice it's there.

option 3: manual loading

if you're the type who wants full control:

node --require claudescreenfix-hardwicksoftware/loader.cjs $(which claude)

or set NODE_OPTIONS if that's more your style:

export NODE_OPTIONS="--require $(npm root -g)/claudescreenfix-hardwicksoftware/loader.cjs"
claude

config

here's what you can tweak via env vars:

| var | what it does | default | |-----|--------------|---------| | CLAUDE_TERMINAL_FIX_DEBUG | set to 1 for debug logs | off | | CLAUDE_TERMINAL_FIX_DISABLED | set to 1 to disable entirely | off |

api

if you wanna use it programmatically here's how:

const fix = require('claudescreenfix-hardwicksoftware');

// install the fix (usually done automatically via loader)
fix.install();

// manually clear scrollback whenever you want
fix.clearScrollback();

// check what's going on
console.log(fix.getStats());

// tweak config at runtime
fix.setConfig('periodicClearMs', 30000);  // clear every 30s instead

// turn it off if you need to
fix.disable();

how it works

the fix hooks process.stdout.write before claude loads. when ink writes to the terminal, we check if it's doing a screen clear (which happens on every re-render). after enough renders, we inject the ANSI escape sequence \x1b[3J which tells the terminal to dump its scrollback buffer.

for resize events, we intercept process.on('SIGWINCH', ...) and debounce the handlers. instead of firing immediately, we wait 150ms. if more resize events come in during that window, we reset the timer. only fires once things settle down.

bottom line: smooth terminal, no lag, no memory bloat. it just works.

changelog

v1.0.1 (2025-01-08)

  • FIXED: typing issue - keystrokes were getting lost because the fix was intercepting stdin echoes
    • now detects stdin echo writes (single chars, backspace, arrow keys) and passes them through unmodified
    • added typing cooldown detection - clears are deferred during active typing
    • periodic clears now use setImmediate to not block the event loop
    • added stdin tracking to properly detect user input activity
  • new config option: typingCooldownMs (default 500ms) - how long to wait after typing before allowing clears

v1.0.0 (2025-01-08)

  • initial release
  • scrollback clearing after 500 renders or 60 seconds
  • SIGWINCH debouncing for tmux/screen users
  • enhanced /clear command to actually clear scrollback

known issues

  • some old terminals don't support \x1b[3J but that's pretty rare nowadays
  • if you actually want to keep your scrollback history, this ain't for you
  • debug mode writes to stderr which might look weird in some setups

what this fixes

people have been complaining about:

  • terminal lag after long sessions - fixed
  • scrollback buffer growing unbounded - fixed
  • resize causing massive lag in tmux/screen - fixed
  • /clear not actually clearing everything - fixed

you shouldn't have to restart claude every 30 minutes anymore.

license

MIT - do whatever you want with it