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

whasync-cli

v0.0.1

Published

Sync WhatsApp profile photos to Google Contacts from the terminal

Readme

whasync-cli

npm version license node GitHub stars GitHub issues

Sync WhatsApp profile photos to Google Contacts from the terminal.

Inspired by whatsapp-contact-sync -- rebuilt as a simple CLI tool. No web server, no browser UI. Bring your own Google OAuth credentials.

Prerequisites

  • Node.js >= 18
  • A Google Cloud project with People API enabled

Install

npm install -g whasync-cli

Or run directly:

npx whasync-cli

Google OAuth Setup

  1. Go to Google Cloud Console
  2. Create a project (or select an existing one)
  3. Go to APIs & Services > Library, search for People API and enable it
  4. Go to APIs & Services > Credentials
  5. Click Create Credentials > OAuth client ID
  6. Set application type to Desktop app
  7. Copy the Client ID and Client Secret

Usage

# First run -- provide your Google credentials
whasync --client-id <YOUR_CLIENT_ID> --client-secret <YOUR_CLIENT_SECRET>

# Subsequent runs -- credentials are saved
whasync

The CLI walks you through:

  1. Google Auth -- Authenticates with saved tokens or opens the browser
  2. WhatsApp Auth -- Scan the QR code with WhatsApp (Linked Devices > Link a Device)
  3. Match -- Finds contacts that exist in both Google and WhatsApp
  4. Sync -- Downloads WhatsApp photos and uploads them to Google Contacts

Options

Usage: whasync [options]

Options:
  -V, --version                  output the version number
  --client-id <id>               Google OAuth Client ID
  --client-secret <secret>       Google OAuth Client Secret
  --config [path]                Show config info, or use custom config directory
  --reset                        Clear all saved config, tokens, and session data
  -v, --verbose                  Show debug logs
  -h, --help                     display help for command

Examples

# Show where config is stored and current state
whasync --config

# Use a custom config directory
whasync --config /path/to/config

# Clear everything and start fresh
whasync --reset

# Debug mode
whasync --verbose

Config

All data is stored in ~/.config/whasync-cli/:

| File | Purpose | |------|---------| | config.json | Google OAuth Client ID and Secret | | google-tokens.json | OAuth access and refresh tokens | | wa-session/ | WhatsApp Web session data |

Sessions are persisted so you don't need to re-authenticate on every run.

How It Works

  • Connects to WhatsApp Web via whatsapp-web.js using Puppeteer
  • Fetches Google Contacts via the People API
  • Matches contacts by phone number with E.164 normalization and country-specific variant handling (Brazil, Mexico, Argentina)
  • Downloads WhatsApp profile photos and uploads them to Google Contacts
  • Rate limited to ~60 requests/min (Google API limit)

License

MIT