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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@catalystlabs/catalyst-index-sdk

v0.1.1

Published

Developer-friendly TypeScript client for the Catalyst RAG Server.

Downloads

13

Readme

Catalyst Index TypeScript SDK

Developer experience first client for the Catalyst Index Server. Build ingestion pipelines, kick off background jobs, and render search results with rich metadata in a few lines of code.

Highlights

  • One-line setupnew CatalystIndexClient({ baseUrl, apiKey }) returns a fully typed client ready for browser or Node/Bun.
  • Full endpoint coverage – projects, ingestion (sync/async/URLs/ZIP/crawl), jobs, search (single + federated), webhooks, monitors, and health.
  • Rich metadata – search results include page numbers, paragraph indices, headings, and chunk hashes for deep linking.
  • Type-safe errors – every call returns { ok: true, data } | { ok: false, error } with detailed error information.
  • DX tooling – Built with Bun + tsup + Vitest with zero-config type generation from OpenAPI.

Quickstart

npm install @catalystlabs/catalyst-index-sdk
# or
bun install @catalystlabs/catalyst-index-sdk
import { CatalystIndexClient } from '@catalystlabs/catalyst-index-sdk';

const client = new CatalystIndexClient({
	baseUrl: process.env.RAG_ENDPOINT!,
	apiKey: process.env.RAG_API_KEY!,
});

// Create a project
const project = await client.projects.create({
	name: 'My Knowledge Base',
	description: 'Documentation and guides'
});

// Search
const results = await client.search.query(project.data.project_id, {
	query: 'refund policy',
	top_k: 10,
	rerank: true
});

if (results.ok) {
	results.data.results.forEach(result => {
		console.log(`${result.score.toFixed(3)} - ${result.text.slice(0, 100)}...`);
	});
}

Repository Layout

├── docs/                  # Developer guides & API reference
├── examples/              # Runnable usage samples (Bun scripts)
├── src/
│   ├── client.ts          # HTTP client + middleware stack
│   ├── config.ts          # runtime configuration + retry wiring
│   ├── endpoints/         # Feature-specific API modules
│   ├── helpers/           # Metadata, retry, and polling helpers
│   ├── models/            # Typed request/response contracts
│   └── index.ts           # Public exports
├── package.json
├── bun.lock
├── tsconfig.json
├── tsup.config.ts
└── vitest.config.ts

DX Principles

  • Dead-simple ingestion – Helpers accept File, Blob, ArrayBuffer, or raw strings; async ingestion returns job IDs with jobs.poll convenience.
  • Typed errors – Every call resolves to { ok: true, data } | { ok: false, error } with status/code/details.
  • Metadata aware – Search helpers surface source_page, source_paragraph_index, headings, and chunk hashes for deep linking.
  • Extensible fetch layer – Provide custom fetch, retry policy, timeouts, or headers without rewriting the client.

Scripts (via Bun)

| Command | Description | | ------------------- | ------------------------------------------------------------ | | bun run dev | Watch/rebuild the SDK during development. | | bun run build | Emit ESM + CJS bundles with declaration files. | | bun run test | Execute Vitest unit suite. | | bun run lint | Run Biome formatting/linting. | | bun run typecheck | Strict TypeScript checks (tsc --noEmit). | | bun run generate | Pull the latest OpenAPI spec into src/models/generated.ts. |

Getting Started Locally

bun install
bun run build
# optional: export RAG_OPENAPI_URL="https://your-server/openapi.json?key=..."
# bun run generate
bun run typecheck
# bun run test    # optional smoke tests

See docs/CONTRIBUTING.md for coding standards and release workflow. Additional runnable samples live in examples/ (ingestion, search, job polling).