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

assay-cli

v1.0.0

Published

Command-line interface for Assay document library

Readme

Assay CLI

Command-line interface for Assay document library.

Installation

npm install -g assay-cli

Or install from source:

cd assay-cli
npm install
npm run build
npm link

Quick Start

  1. Authenticate:

    assay auth login

    This opens your browser to the Dashboard where you can generate an API key. Paste the key when prompted.

  2. Check status:

    assay auth status
  3. List documents:

    assay documents list
  4. Search documents:

    assay documents search --query "AI safety"

Commands

Authentication

  • assay auth login - Authenticate and generate API key
  • assay auth status - Show API key status and quota information
  • assay auth rotate - Rotate API key (opens Dashboard)

Documents

  • assay documents list - List documents with pagination
    • --filter <type> - Document filter: public (all public docs), personal (your docs), or private (your private docs only). Default: public
    • --visibility <type> - [DEPRECATED] Use --filter instead. Filter by visibility (private, public, all)
    • --limit <number> - Maximum results per page
    • --cursor <cursor> - Pagination cursor
  • assay documents get <id> - Get document details
  • assay documents summary <id> - Get document summary
    • --type <type> - Summary type: comprehensive, casual, or faq. Default: comprehensive
  • assay documents search - Search documents
    • --query <query> - General search query
    • --theme <theme> - Canonical theme ID or partial match
    • --author <author> - Author name
    • --title <title> - Document title
    • --keywords <keywords> - Keywords or concepts
    • --filter <type> - Document filter: public (all public docs), personal (your docs), or private (your private docs only). Default: public
    • --visibility <type> - [DEPRECATED] Use --filter instead. Document visibility filter
    • --limit <number> - Maximum results

Themes

  • assay themes list - Browse canonical themes
    • --domain <domain> - L0 domain ID (returns L1 themes for that domain)

Configuration

Configuration is stored in:

  • Unix/macOS: ~/.assay/config.json
  • Windows: %APPDATA%\assay\config.json

API keys are stored securely in the OS keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service).

If keychain is unavailable (e.g., headless Linux), you can:

  • Set ASSAY_API_KEY environment variable
  • Or use the config file with secure permissions (chmod 600)

Environment Variables

  • ASSAY_API_KEY - API key (overrides config)
  • ASSAY_BASE_URL - Base URL (overrides config)
  • ASSAY_CONFIG_DIR - Config directory (overrides default)

Output Formats

Set output format in config or use --format option:

  • json (default) - JSON output
  • table - Table format
  • yaml - YAML output

Error Handling

The CLI automatically:

  • Retries on rate limit errors (429) with exponential backoff
  • Shows expiration warnings when API key expires soon
  • Provides helpful error messages with suggestions

Examples

# List all public documents (default)
assay documents list

# List your documents (public + private)
assay documents list --filter personal

# List only your private documents
assay documents list --filter private

# Search for documents about AI safety in public collection
assay documents search --query "AI safety" --filter public --limit 10

# Search in your documents
assay documents search --query "AI safety" --filter personal

# Get a specific document
assay documents get abc123

# Get document summary
assay documents summary abc123 --type casual

# Browse themes
assay themes list

# List L1 themes for a domain
assay themes list --domain ARTIFICIAL_INTELLIGENCE

Troubleshooting

"No API key found"

  • Run assay auth login to authenticate

"API key expired"

  • Run assay auth login to generate a new key

"Keychain not available"

  • Set ASSAY_API_KEY environment variable
  • Or ensure Secret Service is installed (Linux)

"Rate limit exceeded"

  • Wait for quota reset (shown in error message)
  • Check quota with assay auth status