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

copifi

v1.0.1

Published

Shared clipboard for devices on the same WiFi — named rooms, code auth, LAN discovery, background sync.

Readme

copifi

npm license

Shared clipboard for devices on the same WiFi. A host starts a named room and gets a join code. Other devices discover rooms on the network and join with that code. Once joined, copying anything on any device shows up on all the others — automatically, in the background. Fully local: nothing leaves your network.

Runs over self-signed HTTPS so browsers allow clipboard access on other devices.

Install

Needs Node.js 18+ on every device that runs the CLI.

npm install -g copifi

That gives you the global copifi command. Verify with copifi help.

Certificates are stored in ~/.copifi/certs (a user-writable location), so the global install works without permission issues.

Run from source instead

git clone https://github.com/entrepreter/copifi.git
cd copifi
npm install
npm link          # global `copifi` command — or just use `node cli.js <command>`

For maintainers — releasing updates

The package is published to npm as copifi and the source lives at github.com/entrepreter/copifi. To ship an update:

npm version patch            # bump the version (patch | minor | major)
git push --follow-tags
npm publish

Tip: npm pack --dry-run previews exactly which files get published.

The flow

1. On the host machine — start a room:

copifi host office

This prints the room's join code (e.g. 4821), a QR code, and starts syncing the host's own clipboard. Leave it running.

2. On another machine — see what's on the network:

copifi ls
ROOM     HOST                 ADDRESS
office   shivam-pc.local      192.168.1.42:3000

3. Join by name and enter the code:

copifi join office
Enter the room code: 4821

That's it. Copy anything on any joined device and it lands on every other device in the room.

Phones (or anyone without the CLI) can join from a browser: open https://<host-ip>:3000, type the code, and go.

Commands

| Command | What it does | | --- | --- | | copifi host <name> | Start the room's server and sync this device. Prints the join code. | | copifi serve <name> | Start only the server (a hub; doesn't sync this device's clipboard). | | copifi ls | List rooms available on this WiFi. | | copifi join <name> | Find the room on the network and join it (prompts for the code). | | copifi help | Show help. |

Flags: --code <code> (skip the prompt), --name <name> (device label), --port <n>, --poll <ms>, --server <url> (join a URL directly, skipping discovery).

Levels of "automatic"

  • CLI / native (host, join) — true background sync. Copy anywhere, in any app, no window needed. This is the recommended way on laptops/desktops.
  • Browser — auto-syncs while the copifi tab is in front (the browser asks for clipboard permission once). A browser tab cannot read the clipboard while it's in the background — that's a security rule in every browser and OS, which is exactly why the native CLI helper exists.

Phones & an "Apple Universal Clipboard"-like experience

Apple's Universal Clipboard feels magical because it's built into the OS — the system watches the clipboard in the background and syncs via Handoff. Third-party apps cannot get that same background access on phones, so here's what's actually achievable per platform:

  • Desktops (Windows / macOS / Linux): already Apple-like. The CLI helper (host / join) reads and writes the OS clipboard in the background — copy anywhere, it appears everywhere. No window needed.
  • Android: a native app can approximate it by running a foreground service (with a persistent notification) to watch the clipboard. Android 10+ restricts background clipboard reads, so the notification/foreground-service is required — close but not invisible.
  • iOS: Apple does not allow any third-party app to read the clipboard in the background; only the system's own Universal Clipboard can. The realistic iOS experience is: a Share-sheet extension ("Share → copifi") to push, and open/tap to paste. Not fully automatic — that's an Apple platform limit, not a design choice.

Today, with zero install, a phone joins via the browser: scan the QR the host prints (or open https://<host-ip>:3000), enter the code, and it's in the room — receiving clips and sending with Send/auto-send. The limit is that a phone browser only reads the clipboard while the tab is in the foreground.

Recommended path to get as close as possible:

  1. Use the CLI on all laptops/desktops — that half is already seamless.
  2. For phones, use the browser client (optionally as a PWA "add to home screen"). Accept foreground-only clipboard.
  3. Only if you truly need hands-free phone sync, build a thin native app (React Native/Flutter) that talks to the same room server: a foreground service on Android, and a Share extension + in-app paste on iOS. The server/protocol here is already the backbone for that — no server changes needed, just native clients.

Cross-platform

Works on Windows, macOS, and Linux — same commands everywhere.

  • Clipboard access needs no extra setup on Windows or macOS (built-in tools). On Linux, install xsel or xclip.
  • First run of host/serve may trigger a firewall prompt (Windows Defender / macOS) — allow it on private networks so other devices can connect, and so mDNS discovery works.
  • Discovery uses mDNS/Bonjour. If ls shows nothing (some corporate/guest networks block multicast), join directly: copifi join <name> --server https://<host-ip>:3000.

The certificate warning (expected)

The cert is self-signed, so a browser shows a one-time warning on first connect — click Advanced → Proceed. The CLI accepts the LAN cert automatically. Want warning-free certs? Install mkcert, run mkcert -install and mkcert <host-ip>, then drop key.pem/cert.pem into ./certs.

How it works

  • Transport: WiFi/LAN only; the server binds 0.0.0.0.
  • Discovery: each host advertises _clipshare._tcp via mDNS; ls browses for it (discovery.js).
  • Auth: the room code is the shared secret — correct code = admitted (no manual approval).
  • Realtime: a single WebSocket hub relays clips to all authenticated members. State is in memory.
  • Clipboard: the native helper reads/writes the OS clipboard in the background; the browser uses navigator.clipboard when focused. Echo protection stops received text from bouncing back.

Files

  • cli.js — the copifi command (host / serve / ls / join).
  • server.js — HTTPS + WebSocket hub for one named, code-authenticated room; mDNS advertising.
  • helper.js — background OS-clipboard sync client.
  • discovery.js — mDNS publish/browse.
  • public/index.html — the browser client.