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

@thxmxx/findmy.js

v1.0.18

Published

A JavaScript package for interacting with Apple's FindMy service. It handles iCloud authentication (SRP, 2FA), generates FindMy-compatible keys, and fetches/decrypts device location reports. This tool enables users to programmatically access and manage Fi

Readme

FindMy.js

A JavaScript package for interacting with Apple's FindMy service, inspired by the Python project biemster/FindMy. This project provides functionalities for iCloud authentication, key generation, and fetching/decrypting device location reports. It enables programmatic access and management of FindMy features, offering insights into device tracking and security.

Features

  • iCloud Authentication: Securely authenticate with Apple's iCloud using the SRP protocol and handle Two-Factor Authentication (2FA) via SMS or trusted devices.
  • Key Generation: Generate private and public keys compatible with the FindMy network.
  • Location Reporting: Fetch and decrypt device location data from the FindMy network.
  • Anisette Support: Integrates with an Anisette server for device attestation, crucial for successful iCloud interactions.

Installation

To get started with FindMy.js, ensure you have Node.js and npm installed on your system.

  1. Clone the repository:

    git clone https://github.com/thxmxx/FindMy.js.git
    cd FindMy.js
  2. Install dependencies:

    npm install
  3. Anisette Server: This project requires an Anisette server to function correctly. You can set up your own using a project like Dadoum/anisette-v3-server or similar.

    The Anisette server URL can be configured using the ANISETTE_URL environment variable. If this variable is not set, it defaults to http://localhost:6969.

    Example of setting via environment variable:

    export ANISETTE_URL="http://your-custom-anisette-server:6969"
    node your_script.js

Usage

Before running, ensure your Apple ID has SMS 2FA properly set up.

Authenticating with iCloud

The pypush_gsa_icloud.js script handles the authentication process:

const { icloudLoginMobileme } = require('./src/pypush_gsa_icloud');

async function authenticate() {
    try {
        const authData = await icloudLoginMobileme(); // Will prompt for Apple ID and password
        console.log('Authentication successful:', authData);
    } catch (error) {
        console.error('Authentication failed:', error.message);
    }
}

authenticate();

Requesting FindMy Reports

The request_reports.js script allows you to fetch location reports using a private key:

const { requestReports } = require('./src/request_reports');

async function getReports() {
    // Replace 'YOUR_PRIVATE_KEY_BASE64' with your actual base64 encoded private key
    const privateKey = 'YOUR_PRIVATE_KEY_BASE64'; 
    try {
        const reports = await requestReports(privateKey, 24); // Last 24 hours
        console.log('Received reports:', reports);
    } catch (error) {
        console.error('Failed to fetch reports:', error.message);
    }
}

getReports();

Generating Keys

The generate_keys.js script can be used to generate new FindMy compatible keys:

const { generateKeys } = require('./src/generate_keys');

async function generateNewKeys() {
    try {
        const newKeys = await generateKeys(1); // Generate 1 key pair
        console.log('Generated Keys:', newKeys);
    } catch (error) {
        console.error('Failed to generate keys:', error.message);
    }
}

generateNewKeys();

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

License

This project is licensed under the MIT License. See the LICENSE file for details.