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

@tmustier/pi-nes

v0.2.16

Published

NES emulator extension for pi

Readme

pi-nes

Play NES games in your terminal. A pi extension that runs a full NES emulator with Kitty graphics support.

Installation

pi install npm:@tmustier/pi-nes

Or from git:

pi install git:github.com/tmustier/pi-nes

Quick Start

/nes              # Pick a ROM from your library
/nes ~/roms/smb.nes   # Load a specific ROM

On first run, you'll be prompted to set your ROM directory and display quality.

Controls

Game Controls

| Action | Keys | |--------|------| | D-pad | Arrow keys or WASD | | A button | Z | | B button | X | | Start | Enter or Space | | Select | Tab |

Emulator Controls

| Action | Key | |--------|-----| | Detach (keep running) | Ctrl+Q | | Quit | Q |

Tip: Detach with Ctrl+Q to return to pi, then run /nes to reattach to your game.

Commands

| Command | Description | |---------|-------------| | /nes | Pick a ROM or reattach to running session | | /nes <path> | Load a specific ROM file | | /nes config | Configure ROM directory and quality | | /nes debug | Show FPS and memory stats |

Configuration

Config is stored at ~/.pi/nes/config.json. Use /nes config for quick setup.

{
  "romDir": "/roms/nes",
  "saveDir": "/roms/nes/saves",
  "renderer": "image",
  "imageQuality": "balanced",
  "pixelScale": 1.0,
  "keybindings": {
    "up": ["up", "w"],
    "down": ["down", "s"],
    "left": ["left", "a"],
    "right": ["right", "d"],
    "a": ["z"],
    "b": ["x"],
    "start": ["enter", "space"],
    "select": ["tab"]
  }
}

Options

| Option | Default | Description | |--------|---------|-------------| | romDir | /roms/nes | Where to look for ROM files | | saveDir | /roms/nes/saves | Where to store battery saves (defaults to <romDir>/saves) | | renderer | "image" | "image" (Kitty graphics) or "text" (ANSI) | | imageQuality | "balanced" | "balanced" (30 fps) or "high" (60 fps) | | pixelScale | 1.0 | Display scale (0.5–4.0) |

Terminal Support

Best experience: a Kitty-protocol terminal like Ghostty, Kitty, or WezTerm (image protocol + key-up events).

  • Kitty-protocol terminals — Full graphics via image protocol (shared memory or file transport)
  • Other terminals — Falls back to ANSI half-block characters (▀▄)

Set "renderer": "text" if you prefer the ANSI renderer or have display issues.

Limitations

  • No audio — Sound is not currently supported
  • No save states — Only battery-backed SRAM saves work

Building from Source

Requires Rust toolchain (cargo + rustc).

git clone https://github.com/tmustier/pi-nes
cd pi-nes
npm install

# Build the NES core (required)
cd extensions/nes/native/nes-core
npm install && npm run build

# Build shared memory renderer (optional, faster on Kitty)
cd ../kitty-shm
npm install && npm run build

Run locally:

pi --extension /path/to/pi-nes