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

@tsmobiledevice/core

v0.1.0

Published

Core library for iOS device communication - protocol layers and services

Readme

@tsmobiledevice/core

TypeScript iOS device communication library — full protocol stack from USB to iOS 17+ RemoteXPC.

npm License: GPL-3.0

Install

npm install @tsmobiledevice/core

Quick Start

Multi-device pool (4th-gen API)

import { DevicePool } from '@tsmobiledevice/core';

const pool = await DevicePool.connect();

// Hot-plug events
pool.on('device:connected',    (device) => console.log('connected:', device.udid));
pool.on('device:disconnected', (udid)   => console.log('disconnected:', udid));

// Parallel screenshot all devices
const results = await pool.broadcast(async (device) => {
  const png = await device.screenshot();   // auto-mounts DDI on iOS ≤16
  return png;
});

pool.close();

Single device

import { LockdownService, ServiceFactory, DvtFactory } from '@tsmobiledevice/core';

const lockdown = await LockdownService.create(/* udid? */);
const factory  = new ServiceFactory(lockdown);

// File access
const afc  = await factory.afc();
const ls   = await afc.listdir('/');
await afc.close();

// Apps
const proxy = await factory.installationProxy();
const apps  = await proxy.getApps('User');
await proxy.close();

// Screenshots + processes (requires DDI or iOS 17+)
const dvt  = await DvtFactory.create(lockdown);
const png  = await (await dvt.screenshot()).takeScreenshot();
const info = await dvt.deviceInfo();
const procs = await info.proclist();
dvt.close();

await lockdown.close();

Protocol Layers

| Layer | Protocol | Coverage | |-------|----------|----------| | 1 | usbmux — USB device discovery & TCP forwarding | ✅ | | 2 | lockdown — pairing, TLS session, service brokering | ✅ | | 3 | 30+ services — AFC, syslog, diagnostics, screenshots… | ✅ | | 4 | DTX — Instruments / DVT binary protocol | ✅ | | 5 | RemoteXPC / RSD — iOS 17+ tunnel service discovery | ✅ |

API Reference

DevicePool

DevicePool.connect(usbmuxAddress?)     // start pool + hot-plug listener
pool.getDevices()                      // Device[]
pool.getDevice(udid)                   // Device | undefined
pool.broadcast(fn)                     // parallel run, returns results[]
pool.on('device:connected', cb)
pool.on('device:disconnected', cb)
pool.close()

Device

device.udid                            // string
device.connectionType                  // 'USB' | 'Network'
device.info                            // Promise<{ udid, deviceName, productVersion, ... }>
device.screenshot()                    // Promise<Buffer>  (PNG)
device.processes()                     // Promise<{ pid, name, path }[]>
device.syslog()                        // Promise<AsyncGenerator<string>>
device.afc()                           // Promise<AfcService>
device.apps()                          // Promise<InstallationProxy>
device.close()

ServiceFactory (low-level)

| Method | Service | |--------|---------| | factory.afc() | File system (AFC) | | factory.syslog() | Real-time syslog stream | | factory.screenshot() | Screen capture | | factory.installationProxy() | App install / uninstall / list | | factory.diagnostics() | Battery, sleep, restart | | factory.simulateLocation() | GPS simulation | | factory.crashReports() | Crash log retrieval | | factory.osTrace() | OS trace stream | | factory.pcapd() | Live packet capture | | factory.webInspector() | WebKit remote debug | | factory.imageMounter() | DeveloperDiskImage mount | | factory.dvt() | DTX/DVT factory |

DvtFactory (Instruments)

| Method | Service | |--------|---------| | dvt.deviceInfo() | System info, process list | | dvt.screenshot() | DVT-based screen capture | | dvt.processControl() | Launch / kill processes | | dvt.sysmontap() | CPU & memory monitoring | | dvt.applicationListing() | Installed apps |

Requirements

  • Node.js ≥ 18
  • Windows: iTunes installed (AMDS on port 27015)
  • macOS / Linux: usbmuxd running

Credits

Protocol research: pymobiledevice3 by @doronz88.

License

GPL-3.0-or-later