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

wyze-scale-cli

v0.1.1

Published

Read-only TypeScript CLI for Wyze Scale cloud measurements

Downloads

298

Readme

wyze-scale-cli

Read-only TypeScript CLI for Wyze Scale cloud measurements. It wraps wyze-node instead of talking to Wyze HTTP endpoints directly.

This is a small personal utility and is not affiliated with Wyze Labs. The underlying API is reverse-engineered and can break.

Why this exists

wyze-node already knows how to list devices and fetch scale records. It is a library, not a scale CLI. This experiment is a thin command layer on top:

wyze-scale doctor
wyze-scale login
wyze-scale status
wyze-scale scale list
wyze-scale scale latest
wyze-scale scale history --since 90d
wyze-scale scale users

Setup

Install the published CLI globally from npm:

npm install --global wyze-scale-cli
wyze-scale --help

To run from source instead:

git clone https://github.com/crcatala/wyze-scale-cli.git
cd wyze-scale-cli
npm ci
npm test
npm run build
node dist/cli.js --help

Dev without building:

npx tsx src/cli.ts doctor

Authentication

The Wyze developer API key is not sufficient. Scale reads need:

  1. A developer Key ID + API Key from developer-api-console.wyze.com
  2. A one-time account login (email + password) that produces access/refresh tokens
export WYZE_KEY_ID=...
export WYZE_API_KEY=...
# optional: WYZE_EMAIL / WYZE_PASSWORD for non-interactive login
npx tsx src/cli.ts login
npx tsx src/cli.ts status

Never pass the password or API key as CLI flags (they land in shell history). Prefer env vars or the hidden login prompts.

If you originally sign in with Google or Apple, create a normal Wyze password via Wyze's "Forgot password" flow first.

Tokens are stored at 0600 under the config dir:

| Platform | Default | |---|---| | Linux | ~/.config/wyze-scale-cli/tokens.json | | macOS | ~/Library/Application Support/wyze-scale-cli/tokens.json | | override | $WYZE_CONFIG_DIR |

wyze-node also creates a scratch/ directory next to that config dir because it initializes LocalStorage('./scratch') at import time. This CLI patches getTokens / setTokens so the real session lives in tokens.json.

Commands

| Command | Description | |---|---| | doctor [--strict] | Check Node, API-key env, and cached session | | login | Prompt/env login and cache tokens | | logout | Delete cached tokens | | status / whoami | Show session without calling the API | | scale list | List scales on the account | | scale latest | Most recent measurement | | scale history | History (--since 30d from now or --to; or --from / --to) | | scale users | Family members on the scale |

Shared scale flags: --name <nickname>, --device <mac>, --user <family_member_id>.

Global output flags: --json --plain --table --csv --quiet --verbose --debug --no-color. Piped/non-TTY output defaults to JSON.

Cloud vs Bluetooth

This CLI reads cloud history. The scale must sync through the Wyze app first (often while the app is open nearby). For local BLE access to a Scale X, see wyze_scale_tool instead.

Publishing

The package name is wyze-scale-cli, while the installed command is wyze-scale. The first publication requires npm authentication and publish access:

npm login
npm run release:first

For subsequent releases, use a semver bump (or an explicit version):

npm run release -- patch
npm run release -- minor
npm run release -- 1.0.0

The release helper requires a clean main checkout, runs the verification suite, publishes to npm, creates a vX.Y.Z git tag, and pushes the commit/tag. It intentionally does not manage a changelog yet.

Development

npm test
npm run typecheck
npm run lint
npm run build

CI runs these checks on Ubicloud's ubicloud-standard-2 GitHub Actions runner. Unit tests inject a fake wyze-node client; they never hit the live Wyze API.