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

@thesapientcompany/cli

v0.3.0

Published

Command-line interface for the Sapient brain-response API — scan content, poll results, read your history, and query cross-scan intelligence from your terminal.

Downloads

44

Readme

@thesapientcompany/cli

Command-line interface for the Sapient brain-response API. Scan content, poll results, read your scan history, and query your cross-scan intelligence — all from your terminal.

Sapient predicts how a real human brain would respond to a piece of content (video, audio, image, or text) — second by second — and distills that into a score, a grade, and seven lenses.

Quick start

export SAPIENT_API_KEY=sk_live_…
npx @thesapientcompany/cli scan https://cdn.example.com/ad.mp4 --wait

Or install globally:

npm i -g @thesapientcompany/cli
sapient scan https://cdn.example.com/ad.mp4 --wait

Configuration

| Source | Description | | --- | --- | | SAPIENT_API_KEY env, or --key sk_live_… | Your API key. | | SAPIENT_BASE_URL env, or --base <url> | Override the API base URL (default https://www.thesapientcompany.com). |

Commands

sapient scan <url> [options]      Submit content; optionally wait for the result
sapient get <scan_id>             Fetch one scan
sapient history [--limit N]       List your scans
sapient intelligence [-q "..."]   Cross-scan patterns + semantic recall
sapient lenses                    List the 7 lenses

scan options

| Flag | Description | | --- | --- | | --model <m> | Model to scan with: mary (default) | qualia. See Models. | | --text "<copy>" | Scan raw text instead of a URL. (Pass - as the arg to read text from stdin.) | | --modality <m> | Hint for URL input: video | audio | image. | | --lenses a,b,c | Lenses to compute. Default top-3: attention,purchase_intent,manipulation. | | --reasons | Include per-second reasons + moments + summary. | | --raw | Include raw network values. | | --fmri | Include a signed fMRI artifact URL. | | --benchmark / --no-benchmark | Toggle benchmark percentiles (on by default). | | --no-reasons | Turn reasons off. | | --webhook <url> | POST the result to this URL on completion. | | --wait | Poll until the scan completes, then pretty-print the timeline/moments/summary. | | --timeout <sec> | Max seconds to wait with --wait (default 300). |

Global flags

--key, --base, --json (raw JSON output), -h/--help, -v/--version.

Models — Mary vs Qualia

Every scan runs on one of two models. The output shape is identical (same score, grade, seven lenses, per-second timeline) — what differs is what each reads and what it costs. Use --model to choose; omit it to default to Mary.

| Model | Price | Reads | Use it for | | --- | --- | --- | --- | | mary (default) | $0.50 / scan | Video, audio, voice, narrative, and text | The generalist for any content. Text, mixed media, or when you're unsure. | | qualia | $1.00 / scan | Video (visual + audio), no text | The visual specialist — sharper at telling visually-distinct video apart. Comparing video creatives. |

Decision rule: Text or mixed → Mary. Comparing videos → Qualia.

# Compare two video creatives with the visual specialist
sapient scan https://cdn.example.com/ad-a.mp4 --model qualia --wait
sapient scan https://cdn.example.com/ad-b.mp4 --model qualia --wait

The 7 lenses

attention, purchase_intent, manipulation, emotion, cognitive_effort, memory, surprise. Default top-3: attention, purchase_intent, manipulation.

Examples

# Submit a video and wait for the full result
sapient scan https://cdn.example.com/ad.mp4 --wait

# Scan copy under specific lenses
sapient scan --text "Buy now and save 50%" --lenses purchase_intent,manipulation --wait

# Pipe text in
echo "Limited time offer" | sapient scan - --wait

# Fetch a prior scan as raw JSON
sapient get mary_run_abc123 --json

# Your history and cross-scan intelligence
sapient history --limit 10
sapient intelligence -q "where do my ads lose attention?"

Errors

  • 401 → set a valid sk_live_ key (SAPIENT_API_KEY or --key).
  • 402 → out of credits; add API credits in Settings → API.
  • 403 → a paid plan is required to use the API.
  • 404 → no such scan, or it isn't yours.
  • 429 → rate limited; retry with backoff.

Build from source

npm install
npm run build   # tsc → dist/

License

MIT