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

byr-pt-cli

v0.1.11

Published

BYR CLI with OpenClaw-friendly JSON contract

Readme

byr-pt-cli

CLI for byr.pt with stable machine-readable output (--json) and script-friendly commands for browse/search/details/download/auth/user/meta.

Install

npm i -g byr-pt-cli
byr help

Quick start

# Use cookie (recommended)
export BYR_COOKIE='uid=...; pass=...'

# Or username/password
# export BYR_USERNAME='...'
# export BYR_PASSWORD='...'

byr search --query "ubuntu" --limit 5
byr get --id 1001
byr download --id 1001 --output ./1001.torrent --dry-run

Commands

byr --help
byr --version
byr check --json
byr whoami --json
byr doctor --verify --json
byr browse --limit 20 --category movie --spstate free --json
byr search --query "ubuntu" --limit 5 --category movie --spstate free
byr search --imdb tt0133093 --json
byr get --id 1001
byr download --id 1001 --output ./1001.torrent
byr user info --json
byr meta categories --json
byr meta levels --json
byr auth status --verify --json
byr auth login --username "<username>" --password "<password>" --json
byr auth import-cookie --cookie "uid=...; pass=..." --json
byr auth import-cookie --from-browser chrome --profile "Default" --json
byr auth logout --json

Search filters

  • --category repeatable / comma-separated, accepts alias or numeric ID
  • --incldead all|alive|dead (or 0|1|2)
  • --spstate all|normal|free|2x|2xfree|50|2x50|30 (or 0..7)
  • --bookmarked all|only|unbookmarked (or 0|1|2)
  • --imdb alternative to --query
  • --page page index

Auth and config

Credential source priority:

CLI flags > ENV > ./.byrrc.json > ~/.config/byr-cli/config.json > ~/.config/byr-cli/auth.json

auth import-cookie supports:

  • legacy BYR cookie: uid=...; pass=...
  • current session cookie: session_id=...; auth_token=... (optional refresh_token=...)

JSON contract

All commands support --json.

  • success: { "ok": true, "data": ..., "meta": ... }
  • error: { "ok": false, "error": { "code": "...", "message": "...", "details": ... } }

Testing

Run package tests and checks:

pnpm --filter byr-pt-cli test
pnpm --filter byr-pt-cli check

Local live smoke (requires valid BYR credentials):

BYR_LIVE=1 BYR_COOKIE='uid=...; pass=...' pnpm --filter byr-pt-cli test:live

Flow: search -> get -> download --dry-run -> user info.