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

@clera/typesense-cli

v1.0.0

Published

A modern CLI for managing Typesense search clusters

Readme

@clera/typesense-cli

A modern command-line interface for managing Typesense search clusters.

Features

  • Collections - List, inspect, create, patch, and delete collections
  • Documents - Search, export, count, and delete documents
  • API Keys - Create, list, delete, and generate scoped search keys
  • Aliases - Manage collection aliases for zero-downtime reindexing
  • Health - Check server health and metrics

Installation

npm install -g @clera/typesense-cli

Or with pnpm:

pnpm add -g @clera/typesense-cli

From source

git clone https://github.com/getclera/typesense-cli.git
cd typesense-cli
pnpm install
pnpm build
pnpm link --global

Configuration

Set environment variables to connect to your Typesense server:

export TYPESENSE_HOST=your-typesense-host.a1.typesense.net
export TYPESENSE_ADMIN_KEY=your-admin-api-key

# Optional (defaults shown)
export TYPESENSE_PORT=443
export TYPESENSE_PROTOCOL=https

Or create a .env file:

TYPESENSE_HOST=your-typesense-host.a1.typesense.net
TYPESENSE_ADMIN_KEY=your-admin-api-key

Usage

Health Check

typesense-cli health
typesense-cli metrics
typesense-cli debug

Collections

# List all collections
typesense-cli collections list

# Get collection details
typesense-cli collections get <name>

# Create from schema file
typesense-cli collections create <name> -s schema.json

# Patch collection schema
typesense-cli collections patch <name> -s update.json

# Add a field
typesense-cli collections add-field <collection> -n fieldName -t string --facet

# Drop a field
typesense-cli collections drop-field <collection> <field>

# Delete a collection
typesense-cli collections delete <name>

Documents

# Search
typesense-cli docs search <collection> -q "query" -f "status:active"

# Get document
typesense-cli docs get <collection> <id>

# Count
typesense-cli docs count <collection> -f "status:active"

# Export (JSONL)
typesense-cli docs export <collection> --fields "id,name,email"

# Delete
typesense-cli docs delete <collection> <id>
typesense-cli docs delete-by-query <collection> -f "status:archived"

API Keys

# List keys
typesense-cli keys list

# Create key
typesense-cli keys create -d "Search key" -a "documents:search" -c "products"

# Generate scoped key
typesense-cli keys generate-scoped -k <key> -f "tenant_id:abc123"

# Delete key
typesense-cli keys delete <id>

Aliases

typesense-cli aliases list
typesense-cli aliases upsert <alias> <collection>
typesense-cli aliases delete <alias>

Sync & Inspection

typesense-cli sync status
typesense-cli sync verify <collection>
typesense-cli sync facets <collection> -f "status"
typesense-cli sync drop <collection>

Output Formats

Use --json for JSON output:

typesense-cli collections list --json

Destructive Operations

Delete commands prompt for confirmation. Use --force to skip:

typesense-cli collections delete myCollection --force

License

MIT - see LICENSE