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

@esmeraldoinciso/local-share

v0.1.1

Published

Share files directly over your local network. No cloud, no accounts.

Readme

LocalShare

Share files directly over your local network. No cloud, no accounts.

LocalShare transfers files directly between devices on the local network. It does not upload shared files to a cloud service.

Installation

Requires Node.js 20+.

npm install -g @esmeraldoinciso/local-share

local-share ./photos

From source:

npm install
npm run build
node ./dist/src/cli/index.js ./photos

Usage

Share a folder:

local-share ./photos

Share a single file:

local-share photo.jpg --port 8787

The terminal prints a LAN URL plus a QR code. Another device on the same Wi-Fi/LAN scans the code (or opens the URL) and downloads from the browser. No account, no app install on the receiver.

Options

  • --port <number> — port to listen on (default 8787; auto-increments unless explicit)
  • --host <address> — bind host (default 0.0.0.0 for LAN sharing)
  • --password [value] — require a password; prompts hidden twice when no value is given
  • --expires <duration> — e.g. 10m, 30m, 1h, 2h (default 30m); the server shuts down automatically
  • --no-qr — do not display a QR code
  • --no-browser — do not auto-open the browser on the host
  • --verbose — verbose logging (never includes passwords)
  • --help, --version

Exit codes: 0 success · 2 invalid arguments · 3 path not found · 4 permission denied · 5 port unavailable · 6 configuration error.

Password protection

local-share ./photos --password
local-share ./photos --password s3cret

Receivers see a password form; file endpoints return 401 without a valid session cookie (HttpOnly, SameSite=Lax). Sessions live only in memory and die when the server stops. Passwords are stored as scrypt hashes, never plaintext.

Expiration

Sessions expire after --expires (default 30m). On expiry the server prints a notice and shuts down cleanly. Ctrl+C also shuts down cleanly (connections closed, sessions cleared).

Security

  • Path traversal blocked (../, ..\, encoded variants, absolute paths) — verified by tests
  • Symlinks escaping the share root are excluded from listings and blocked on access
  • Opaque file IDs (file_<hex>); absolute paths never reach the browser
  • Filenames are escaped / transferred via safe headers (Unicode supported, CRLF neutralized)
  • Security headers on every response (nosniff, DENY, CSP, no-store for APIs)
  • ZIP entries are relative-only; archives stream with no temp files

Network requirements

  • Both devices on the same Wi-Fi/LAN.
  • The displayed URL uses the host's LAN address (e.g. http://192.168.1.15:8787); the server binds 0.0.0.0.
  • Windows may prompt to allow Node.js through the firewall — allow it for private networks. LocalShare never modifies firewall rules itself.

Troubleshooting

  • Phone cannot connect: same Wi-Fi? Server still running? Correct LAN IP (not 127.0.0.1)? PC firewall allowing Node.js? Guest/AP isolation disabled on the router?
  • QR doesn't scan: type the printed URL manually.
  • Port busy: pick another with --port 8790, or omit --port to auto-increment.
  • Password prompt in a script: pass --password <value> (no TTY needed).

Development

npm install
npm run build
npm run typecheck
npm test
npm run dev -- ./photos --verbose

npm run lint / npm run format are intentionally not configured (dependency-minimal MVP); npm run dev has the same CLI forwarding quirk as below — pass args after --.

Implementation status: CLI → HTTP server → File API → Web UI → QR → password/sessions → expiration → streaming/range/ZIP + progress → npm packaging. See AGENTS.md for the full spec.

License

MIT. See LICENSE.