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

terminal-nes

v0.1.2

Published

๐ŸŽฎ Real NES emulator in your terminal โ€” jsnes core, pixel-perfect 256ร—224 frames via kitty/iTerm2 graphics, keyboard โ†’ NES controller, share-to-X with screenshot.

Downloads

482

Readme

๐ŸŽฎ terminal-nes

Real NES emulator in your terminal. A single command starts a genuine NES emulator (jsnes core) streaming pixel-perfect 256ร—224 frames into your terminal via kitty/iTerm2/sixel graphics โ€” no canvas, no browser, no X server.

Comes with a free-to-distribute homebrew ROM (assets/falling.nes, MIT) so it works out of the box, and supports your own legally-owned ROMs.

Install & run

npm i -g terminal-nes
terminal-nes

Or run directly without installing:

npx terminal-nes

Requires a graphics-protocol terminal: Kitty, iTerm2, WezTerm, Ghostty or any Sixel terminal. Otherwise a friendly hint is printed.

Controls

Bundled Falling game:

| Key | Action | | ---------------------- | --------------------------- | | โ† / โ†’ or A / D | Move left/right | | โ†‘ / โ†“ | Select mode before starting | | Enter | Start | | P | Open menu | | Q / Ctrl+C | Quit |

The pause menu provides resume, share, restart, and quit actions. Generic ROMs still receive the complete NES D-pad plus Z/J = B, X/K = A, Enter = Start, and Shift = Select.

Play your own (legally owned) ROM

mkdir -p ~/.config/terminal-nes/roms
cp /path/to/your/rom.nes ~/.config/terminal-nes/roms/
VUE_TUI_NES_ROMS_DIR=~/.config/terminal-nes/roms VUE_TUI_NES_RANDOM=1 terminal-nes

Or point to a single ROM directly:

VUE_TUI_NES_ROM=/path/to/contra.nes terminal-nes

Original NES Contra uses Mapper 2, which is fully supported by the bundled jsnes core โ€” your legal ROM drops right in.

ยฉ Copyright reminder: the package ships no commercial game data. Only run ROMs you legally own (own-cartridge dumps / officially licensed files).

Share to X + leaderboard

Open the menu with P, then press 2:

  1. Screenshot saved as PNG (.nes-shares/)
  2. Image copied to the system clipboard (macOS/Linux)
  3. Browser opens the X composer with a caption pre-filled: vue-tui repo link + #vueTui #terminalUI #retroGaming
  4. Local leaderboard tracked at ~/.vue-tui-nes/leaderboard.json

Customize your player name: VUE_TUI_NES_PLAYER=my-name terminal-nes

Graphics quality

  • NTSC overscan cropped (real visible 256ร—224 picture)
  • Automatic integer upscaling (1ร—/2ร—) when the terminal is large enough โ€” nearest-neighbour, pixel crisp
  • Falls back to exact-fit on small terminals

Scripts (repo)

pnpm run build             # tsdown โ†’ dist/cli.js + dist/index.js
pnpm run typecheck
pnpm run smoke             # headless emulation + PNG validation
pnpm run check:rom         # verify a ROM loads on the bundled core
pnpm run check:input       # no-keyup input direction regression
pnpm run check:share       # share pipeline (screenshot/caption/leaderboard)
pnpm run check:share-browser  # X intent URL + clipboard image (no browser open)
pnpm run pack:local        # local tarball

How it works

  • src/nes-video-game.ts โ€” jsnes โ†’ overscan crop โ†’ RGBA โ†’ PNG โ†’ TVideo
  • src/run.ts โ€” CLI runner: ROM resolution, input mapping, share handling
  • src/share.ts โ€” screenshot, X post, local leaderboard
  • src/png.ts โ€” pure Node zlib PNG encoder + nearest resize
  • src/vendor/jsnes/ โ€” jsnes core (Apache-2.0, see NOTICE)
  • assets/falling.nes โ€” MIT-licensed homebrew game (LICENSE included)

License

MIT (this package). Vendored code: jsnes (Apache-2.0), Falling (MIT).