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

@webcrawlerapi/ckb

v0.1.0

Published

A command-line tool for building a searchable knowledge base. Documents are stored in Cloudflare R2 and indexed for keyword, hybrid, and semantic retrieval via Cloudflare AI Search (AutoRAG).

Readme

ckb — personal knowledge base CLI

A command-line tool for building a searchable knowledge base. Documents are stored in Cloudflare R2 and indexed for keyword, hybrid, and semantic retrieval via Cloudflare AI Search (AutoRAG).

Requirements

  • Node.js 18+
  • Cloudflare account with:
    • An AI Search (AutoRAG) instance
    • An R2 bucket
    • An API token with AI Search + R2 permissions
  • WebCrawlerAPI key (optional, for crawl)

Install

npm i

Setup

ckb auth

How to get your API keys

Prompts for:

| Field | Where to find it | |-------|-----------------| | Cloudflare Account ID | Cloudflare dashboard → right sidebar | | API Token | My Profile → API Tokens | | AI Search Instance ID | AI Search dashboard | | R2 Bucket Name | R2 dashboard | | R2 Access Key ID | R2 → Manage R2 API Tokens | | R2 Secret Access Key | R2 → Manage R2 API Tokens | | WebCrawlerAPI Key | dash.webcrawlerapi.com/access (optional) |

Credentials are saved to ~/.ckb/config.json.

Commands

Typical flow:

ckb add ./notes.md -c personal
ckb crawl -u https://docs.example.com -c docs/example
ckb reindex
ckb search "auth flow"
ckb query "auth flow" --files
ckb get docs/example/page.md

ckb add <file> -c <collection>

Upload a local file to R2 under the given collection prefix.

ckb add ./notes.md -c personal
ckb add ./report.pdf -c work/q1

The R2 key becomes <collection>/<filename>.

ckb crawl -u <url> -c <collection>

Crawl a website, convert pages to markdown, and upload them to R2.

ckb crawl -u https://docs.example.com -c docs/example
ckb crawl -u https://docs.example.com -c docs/example -l 50 --main-content-only

Options:

| Flag | Description | |------|-------------| | -u, --url <url> | Starting URL (required) | | -c, --collection <folder> | Collection name / R2 prefix (required) | | -l, --items-limit <n> | Max pages to crawl | | -w, --whitelist-regexp <pattern> | Only crawl URLs matching pattern | | -b, --blacklist-regexp <pattern> | Skip URLs matching pattern | | -m, --main-content-only | Extract main content only (skip nav/footer) |

Pages are cached locally at ~/.ckb/cache/<hostname>-<timestamp>/. If a crawl is interrupted, re-running the same command resumes from the saved job ID.

ckb get <key>

Print the full content of a file stored in R2 by object key.

ckb get docs/example/page.md
ckb search "auth flow" --files

Use the key printed by ckb search --files or returned in search JSON as chunk.item.key.

ckb search <query>

Keyword search across the knowledge base.

ckb search "how to configure nginx"
ckb search "telegram bot setup" -c docs/n8n
ckb search "auth flow" -n 5

Options:

| Flag | Description | |------|-------------| | -c, --collection <folder> | Scope results to a collection | | -n, --max_num_results <n> | Max results to return | | --files | Print matching file names only | | --match-threshold <n> | Min retrieval score threshold (0-1) | | --debug | Print the curl request before executing | | --json | Print raw JSON response |

ckb query <query>

Hybrid retrieval with reranking across the knowledge base.

ckb query "how do I configure nginx for websockets"
ckb query "telegram bot setup" -c docs/n8n
ckb query "auth flow" -n 5

Options:

| Flag | Description | |------|-------------| | -c, --collection <folder> | Scope results to a collection | | -n, --max_num_results <n> | Max results to return | | --files | Print matching file names only | | --match-threshold <n> | Min retrieval score threshold (0-1) | | --debug | Print the curl request before executing | | --json | Print raw JSON response |

ckb reindex

Trigger an AI Search indexing job to pick up newly uploaded documents.

ckb reindex

Indexing runs asynchronously on Cloudflare's side. Run ckb status to check progress.

ckb status

Show AI Search instance metadata and recent indexing jobs.

ckb status

Collections

Collections are R2 key prefixes (collection/filename). They let you organize documents and scope searches:

# Add documents to different collections
ckb add ./k8s-guide.md -c docs/kubernetes
ckb add ./postgres.md -c docs/databases

# Keyword search within a specific collection
ckb search "connection pooling" -c docs/databases

# Hybrid retrieval with reranking within a specific collection
ckb query "how should I tune connection pooling" -c docs/databases

Config file

~/.ckb/config.json — written by ckb auth, read by all other commands. Edit manually to update credentials without re-running the full auth flow.