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

@bettor-help/cli

v0.1.5

Published

Bettor Help CLI — Clerk auth + client-side contest reconciliation.

Readme

@bettor-help/cli

The bettor.help companion CLI: one-shot onboarding, Clerk sign-in, client-side contest reconciliation, DKEntries ingest, and environment self-checks. Your DraftKings cookie never leaves your machine — the cloud never contacts DK.

npm install -g @bettor-help/cli
bettor-help start        # one-shot onboarding: home dir + plugins + sign-in

Local file convention

Daily working files live under ~/bettor-help/<YYYY-MM-DD>/:

~/bettor-help/2026-07-02/
  builds/        lineups you export from a build
  entries/       archived DKEntries.csv exports (see `entries`)
  edit-entries/  CSVs uploaded via DK's "Edit Entries" flow (late-swap / rebuild)
  results/       contest standings CSVs (see `fetch-standings` / `reconcile`)

Override the home base with the BETTOR_HELP_HOME env var.

Commands

Onboarding & auth

| Command | What it does | | ----------------------------------------- | ------------------------------------------------------------------------------- | | bettor-help start [--dir <path>] | One-shot onboarding: create ~/bettor-help, enable the plugins there, sign in. | | bettor-help login / logout / whoami | Clerk OAuth session management. |

Daily workflow

| Command | What it does | | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bettor-help day [--date YYYY-MM-DD] [--open] | Create the day's {builds,entries,edit-entries,results}/ tree and print the paths. --open opens the folder (macOS open, Windows start, Linux xdg-open). | | bettor-help entries [--date <D>] [--file <path>] [--dg <id>] [--profile <name@ver>] | The "grab my entries" primitive. Scans ~/Downloads for DKEntries*.csv files newer than the last run (newest first; --file overrides), identifies each file's draft group from its contest IDs via DK's public contest API (--dg overrides), archives a copy to ~/bettor-help/<date>/entries/DKEntries-dg<dg>.csv, and records the entries in the cloud entry ledger (ingest_entries). Prints contests / entry count / players resolved per file; per-file failures are loud but don't stop the batch. | | bettor-help cookie --login | Browser-assisted DraftKings cookie capture (the recommended flow). Opens your installed Google Chrome (via playwright-core, channel: 'chrome' — no bundled browser download) on a dedicated persistent profile at ~/.config/bettor-help/browser-profile/, waits up to 5 minutes for you to sign in to DraftKings, then saves all draftkings.com cookies as a Cookie: header line to ~/.config/bettor-help/dk_cookie_header.txt (single line, mode 600). Because the profile keeps your DK session, later reconcile/fetch-standings runs silently re-harvest a fresh cookie headless when the saved one is missing/stale or DK rejects it (one retry, never a loop). Requires Google Chrome installed. | | bettor-help cookie [--check] | Manual fallback: paste your browser's Cookie header at the prompt; it is validated (must look like a DK cookie) and saved to ~/.config/bettor-help/dk_cookie_header.txt (single line, mode 600). --check reports presence + age + whether the browser profile (auto-refresh) is available, without contacting DK. | | bettor-help doctor | Environment self-check — one line per check with a fix hint: Node ≥ 20, CLI version (+ npm latest), login state, DK cookie presence/freshness, MCP endpoint reachability, ~/bettor-help writable. Exits non-zero if any hard check fails. |

Contest reconciliation

| Command | What it does | | ----------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | bettor-help reconcile --sport <s> [--date <D>] [--contest-id <id>]... | discover → fetch-standings → reduce → upload in one shot. | | bettor-help discover --sport <s> | List DK contests for a sport (cookieless public API). | | bettor-help fetch-standings --contest-id <id> [--date <D>] | Fetch a standings CSV (requires the DK cookie); lands in ~/bettor-help/<date>/results/. | | bettor-help reduce / upload | Build and POST the upload_contest_field payload manually. |

Environment

| Variable | Effect | | ----------------------- | ------------------------------------------------------ | | BH_TOKEN | Bypass Clerk login with a Bearer token (CI use). | | BETTOR_HELP_HOME | Override the ~/bettor-help home base. | | BETTOR_HELP_DOWNLOADS | Override the ~/Downloads scan dir used by entries. |

Troubleshooting

Run bettor-help doctor first — it checks everything the other commands need and prints a fix hint per failure. Cookie problems specifically: bettor-help cookie --check; if the cookie keeps expiring, run bettor-help cookie --login once so the CLI can auto-refresh it. --login needs Google Chrome installed; without Chrome, use the manual paste flow (bettor-help cookie).

Development

cd packages/cli
npm ci
npm run typecheck
npm test