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

nanoshare

v0.2.1

Published

Local screen sharing over WebRTC with a Bun CLI.

Downloads

288

Readme

nanoshare – local screen sharing, as simple as it gets

you shouldn't have to mess with vnc, rdp or ssh to view your laptop's screen on your computer (or any other device on your network).

usage

run nanoshare using bun:

bunx nanoshare

macos will ask for permission to access your screen, and you might have to restart your terminal before the permission is granted by the os.

this will obviously require bun.

requirements

  • bun installed
  • ffmpeg installed and available in your PATH
  • host and viewer on the same network
  • screen-recording permission granted to terminal (macos)

features

nanoshare runs on port 37777 by default, at 30fps with 14M video bitrate. you can change settings by passing flags when running bunx nanoshare.

  • --port <number> – change the port to listen on
  • --fps <number> – change the framerate
  • --video-bitrate <bitrate> – change the video bitrate
  • --use-hwaccel – enable hardware acceleration on macOS
  • --source <screen|testsrc> – use a test pattern or screen capture
  • --rtp-port <number> – change the local port for ffmpeg → webrtc ingress
  • --audio – enable system audio streaming (best effort)
  • --audio-device <value> – override system audio input device (platform-specific)
  • --audio-rtp-port <number> – change local audio RTP ingress (default 5006)
  • --pin <pin> – change the pin to require to access the live stream

quick examples

default:

bunx nanoshare

custom port + pin:

bunx nanoshare --port 3000 --pin 123456

use a test source (great for debugging without sharing your actual screen):

bunx nanoshare --source testsrc

macos hardware encoding:

bunx nanoshare --use-hwaccel

start with system audio enabled:

bunx nanoshare --audio

start with explicit audio device:

bunx nanoshare --audio --audio-device "BlackHole 2ch"

environment variables

if you prefer env vars over cli flags:

  • NANOSHARE_PORT (default: 37777)
  • NANOSHARE_PIN (default: random 6-digit pin)
  • NANOSHARE_FPS (default: 30)
  • NANOSHARE_VIDEO_BITRATE (default: 14M)
  • NANOSHARE_USE_HWACCEL=1 to enable hw acceleration on macos
  • NANOSHARE_SOURCE=screen|testsrc (default: screen)
  • NANOSHARE_RTP_PORT (default: 5004)
  • NANOSHARE_AUDIO=1 to enable system audio on startup
  • NANOSHARE_AUDIO_DEVICE (optional platform-specific audio input device)
  • NANOSHARE_AUDIO_RTP_PORT (default: 5006)
  • NANOSHARE_DISPLAY (linux only, optional override for X11 display)

example:

NANOSHARE_PORT=3000 NANOSHARE_FPS=60 NANOSHARE_VIDEO_BITRATE=8M bunx nanoshare

what you'll see

when nanoshare starts, it prints:

  • local url (for same machine)
  • lan url (for other devices on your network)
  • a 6-digit pin

runtime controls:

  • Ctrl+C to stop
  • press a in the host terminal (tty mode) to toggle audio on/off; viewers auto-reconnect

open the url on another device, enter the pin once, and you're in.

troubleshooting

  • ffmpeg: command not found
    install ffmpeg first (brew install ffmpeg, sudo apt install ffmpeg, etc). on windows, have it in your PATH.
  • macos keeps denying capture
    enable your terminal in system settings → privacy & security → screen recording, then fully restart your terminal.
  • viewer can't connect
    make sure both devices are on the same lan and your firewall allows the selected port. if the port is in use, try passing a different one with --port <number>.
  • linux black screen
    check that NANOSHARE_DISPLAY (or system DISPLAY) is set correctly (for example :0.0).
  • no audio on macos
    system audio usually needs a loopback device (for example BlackHole/Loopback/Soundflower). install one and pass --audio-device if auto-detection doesn't find it.
  • no audio on windows/linux
    pass an explicit --audio-device and verify ffmpeg can read it. nanoshare will continue in video-only mode if audio setup fails.

acknowledgements

built by exotic with gpt-5.3-codex in a couple hours. feel free to contribute if you want, or fork and improve.