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

pplx-npx-search

v0.1.0

Published

CLI for Perplexity AI with cookie-based auth

Readme

pplx-cli

CLI for Perplexity AI with cookie-based authentication. Designed for headless/agent-first usage — no browser required at runtime.

Prerequisites

  • Node.js 20+
  • Google Chrome (only for initial cookie extraction via pplx auth)

Installation

git clone https://github.com/rajanrengasamy/pplx-cli.git
cd pplx-cli
npm install
npm link

Authentication

Extract cookies from Chrome (one-time setup):

pplx auth
pplx auth --test    # verify cookies work

Cookies are stored at ~/.config/pplx/cookies.json.

Usage

# Search (default: pro mode, headless HTTP)
pplx search "what is quantum computing"

# Reasoning mode
pplx reason "explain the Riemann hypothesis"

# Deep research
pplx research "compare React vs Vue in 2026"

# Labs (free, no auth needed)
pplx labs "hello world"

# List models
pplx models

Options

pplx search "query" --mode auto|pro|reasoning|deep-research
pplx search "query" --model claude-3.5-sonnet
pplx search "query" --json          # single JSON object output
pplx search "query" --raw           # plain text, no colors/spinner
pplx search "query" --chrome        # use Chrome CDP bridge instead of HTTP
pplx search "query" --curl          # force curl-impersonate for TLS
pplx search "query" --incognito     # don't save to Perplexity history
pplx search "query" --citations-full  # show full source details

Agent/Automation Usage

pplx-cli is designed to work in automated pipelines and with AI agents:

# Plain text output (no colors, no spinner)
pplx search "query" --raw

# Read query from stdin
echo "what is 2+2" | pplx search -

# JSON output (single object: {answer, sources, query, mode, model})
pplx search "query" --json

# Pipe-friendly (auto-detects non-TTY)
pplx search "query" | head -1

# Non-zero exit code when no answer is returned
pplx search "query" --json || echo "failed"

Architecture

  • Default mode: Headless HTTP with stored cookies (no browser needed)
  • Optional: --chrome flag uses Chrome CDP bridge for TLS fingerprinting bypass
  • SSE streaming: Real-time answer streaming via Server-Sent Events
  • Cookie auth: One-time extraction from Chrome, then fully headless

Configuration

Optional config file at ~/.config/pplx/config.json:

{
  "mode": "pro",
  "model": "claude-3.5-sonnet",
  "lang": "en-US"
}

Acknowledgements

This project was inspired by and built upon the reverse-engineering work in helallao/perplexity-ai — a Python library for the Perplexity AI API. The authentication flow, SSE protocol handling, and API structure were all derived from studying that project. Big thanks to @helallao for figuring out the hard parts.

pplx-cli is a ground-up Node.js reimplementation for CLI/agentic use cases, but it wouldn't exist without that foundational work.

License

MIT