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

viral-outliers

v0.1.0

Published

Official command-line tool for the Viral Outliers API: search viral outlier posts, transcribe and analyze them, crawl profiles, remix winners into your niche.

Downloads

18,093

Readme

viral-outliers

Official command-line tool for the Viral Outliers API: search statistically overperforming TikTok, Instagram and YouTube posts, transcribe and visually analyze them, crawl and monitor profiles, and remix winners into your own niche.

Zero runtime dependencies. Node 20 or newer.

Install

npm i -g viral-outliers
viral-outliers --version

# or without installing
npx viral-outliers commands

Log in

Create an API key at https://viraloutliers.com/settings?tab=api-keys, then:

viral-outliers login --key so_live_...

The key is validated against the API (a free balance check) before it is saved to a config file with owner-only permissions.

Key precedence for every call:

  1. --key so_live_...
  2. the VIRAL_OUTLIERS_API_KEY environment variable
  3. the config file written by login ($XDG_CONFIG_HOME/viral-outliers/config.json, %APPDATA%\viral-outliers\config.json on Windows, else ~/.config/viral-outliers/config.json; VIRAL_OUTLIERS_CONFIG overrides the full path)

Without a key the request is still sent: the server's reply tells you how to get one. viral-outliers logout deletes the saved key.

Examples

# Outlier posts in a niche, TikTok only, at least 5x the creator's baseline
viral-outliers search-outliers --query "cold plunge" --platforms tiktok --min-outlier-score 5

# One post with its cached transcript, skipping the visual analysis
viral-outliers get-post <post-id> --no-include-visual-analysis

# Remix a viral post into your niche and wait for the result
viral-outliers remix-post --url https://www.tiktok.com/@creator/video/123 \
  --target-niche "B2B SaaS founders selling analytics tools" --wait

viral-outliers commands lists every command with its credit cost; viral-outliers help <command> shows the flags. Flags are the API's parameter names in kebab-case (--min-outlier-score), list values can be repeated or comma-separated (--platforms tiktok,instagram), handle pairs are --handles tiktok:creator, and --body '{"query":"x"}' merges raw JSON over the flags.

Output

  • Success: the JSON response on stdout (pretty on a terminal, single-line when piped or with --compact).
  • Billed calls print credits: charged=N balance=M on stderr (--quiet silences it).
  • Errors: the API's JSON error on stderr plus a hint (log in, top up, pay link).

--wait

Asynchronous commands (request-transcript, request-visual-analysis, crawl-profile, download-post-media, remix-post) return a job reference. Add --wait to have the CLI poll the free status endpoint (--poll-interval, default 10 s; --timeout, default 900 s) and print the finished result: the post with its transcript or analysis (one get-post call, 1 credit), the crawl outcome, the media URLs (the documented collect call, billed again), or the finished remix. The CLI never resubmits a billed request because a job is slow.

Exit codes

| code | meaning | | ---- | ------- | | 0 | success | | 1 | error (server error, not found, invalid params, network, timeout) | | 2 | payment required (out of credits or no account yet) | | 3 | rate limited | | 4 | authentication failed (missing or rejected API key) | | 5 | usage error (unknown command or flag, missing required flag) |

Development

src/manifest.json is generated from the Viral Outliers skill registry by the main application and must not be edited by hand: every command, flag, cost and route in this CLI comes from it. npm run build compiles to dist/, npm test runs the vitest suite (no network).

Full documentation: https://viraloutliers.com/docs/cli