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

@mega-yfue/eufy-sdk

v0.0.5

Published

One typed TypeScript client for the eufy v6 cloud — capability-driven devices, realtime events over P2P/MQTT/push, and live media

Readme

One typed client for the whole eufy ecosystem — devices, realtime events, and live media.

Documentation · Contributing · Changelog


[!IMPORTANT] Not usable yet. This repository is being set up: the scaffold, the CI gate and the docs pipeline are in place, the library source lands next. 0.0.1 exists on npm only to prove the release pipeline works — it is an empty package. Wait for 0.1.0.

What it is

A TypeScript SDK for the eufy cloud that the current eufy app speaks. It logs in (captcha and 2FA included), keeps a persistent session, and models every device as a capability-driven Device you drive through a typed, fluent API:

const dev = await eufy.getDevice(sn);

await dev.camera()?.snapshot();
await dev.panTilt()?.rotate(PtzDirection.left);
await dev.light()?.setBrightness(60);

eufy.on("motion", (e) => console.log(e.device.name, "saw something"));

Realtime arrives over P2P (cameras and HomeBases), secure MQTT (appliances) and push (events), all surfaced as typed semantic events. Live video streaming works, with one shared pull fanned out to every consumer.

The SDK targets the whole ecosystem — security, robot vacuums and mowers, smart lights — not just cameras. Devices are classified dynamically from what the account reports, so there is no per-model code path and an unlisted or future device resolves the same way as a known one.

Install

Once published:

npm install @mega-yfue/eufy-sdk

Node.js ≥ 24.5.0 is required, not just recommended (see .nvmrc). ffmpeg is optional — only the JPEG-snapshot, one-shot mp4 record and WebRTC container-output paths use it.

Documentation

The guides at https://mega-yfue.github.io/ are the source of truth; this README stays a thin landing page. They cover installing and logging in, devices and capabilities, events and realtime transports, consuming live media, and the generated API reference. Runnable, typechecked samples live in examples/.

Design

Four layers, one dependency direction — coretransportmodelclient:

src/
  core/         shared floor: crypto, cross-layer contracts, value types, session store
  transport/    every byte-on-a-wire module: http, mqtt, p2p, push, webrtc
  model/        Device + one self-contained module per capability
  client/       the facade: login, device registry, event fan-out
  index.ts      public surface — one `export *` per layer barrel

Capability ↔ transport decorrelation is a hard, CI-enforced rule: model/ never imports transport/ and vice versa. A capability describes what a value MEANS; a transport moves bytes and never names a feature. Anything genuinely shared is a contract in core/. That rule and the rest of the code practice are in AGENTS.md.

Three runtime dependencies — mqtt, protobufjs, werift — and that is deliberate. HTTP is native fetch, hashing and ciphers are node:crypto, 64-bit integers are BigInt.

Unverified write paths throw rather than guess. Some writes are fire-and-forget, so a guessed frame looks exactly like success; the SDK refuses instead of pretending.

Develop

nvm use            # Node 24.5.0
npm install
npm run verify     # the full CI gate in one command — run it green before a PR

Contributing

PRs welcome. CONTRIBUTING.md covers setup, the dev workflow and the PR process; AGENTS.md is the code practice — the architecture invariants and the rules CI enforces. Security issues go through SECURITY.md, never a public issue.

License

Apache-2.0. Contributions are accepted under the same license (inbound = outbound).

Disclaimer

Independent and unofficial, built for interoperability with eufy devices you own. Not affiliated with, endorsed by, or sponsored by Anker Innovations or eufy. "eufy" and "Anker" are trademarks of their respective owners and appear here only to identify the hardware this SDK talks to. Use responsibly — rapid or failed logins can trigger a captcha or a temporary cooldown.