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

gitchamber

v0.0.0

Published

A high-performance GitHub repository caching service built with Cloudflare Workers and Durable Objects. GitChamber provides instant access to repository files with intelligent caching, full-text search, and a clean REST API.

Downloads

5

Readme

GitChamber

A high-performance GitHub repository caching service built with Cloudflare Workers and Durable Objects. GitChamber provides instant access to repository files with intelligent caching, full-text search, and a clean REST API.

🚀 Features

  • Instant File Access: Cache entire GitHub repositories for lightning-fast file retrieval
  • Full-Text Search: Search through repository content using SQLite FTS (Full-Text Search)
  • Smart Caching: Configurable TTL with automatic cache refresh when expired
  • Type-Safe API: Built with Spiceflow and Zod for robust TypeScript support
  • Scalable Architecture: Leverages Cloudflare's global edge network and Durable Objects

🏗️ Architecture

GitChamber uses a two-tier architecture:

  1. Worker Router: Routes requests to the appropriate repository cache instance
  2. Durable Object (RepoCache): Handles per-repository caching, storage, and search

How It Works

  1. When a repository is first accessed, GitChamber downloads the tar.gz archive from GitHub
  2. Files are extracted and stored in SQLite with content indexed for full-text search
  3. Subsequent requests are served instantly from the cache
  4. Cache automatically refreshes based on configurable TTL (default: 6 hours)

📡 API Endpoints

All endpoints follow the pattern: https://gitchamber.com/repos/:owner/:repo/:branch/...

List Files

GET /repos/:owner/:repo/:branch/files

Returns a JSON array of all file paths in the repository.

Get File Content

GET /repos/:owner/:repo/:branch/file/*filepath

Returns the raw content of the specified file.

Search Repository

GET /repos/:owner/:repo/:branch/search/:query

Search through repository content using full-text search. Returns matching files with snippets showing the context of matches.

🔧 Example Usage

List files in remorses/fumabase repository

curl "https://gitchamber.com/repos/remorses/fumabase/main/files"

Read a specific file (cloudflare-tunnel/README.md)

curl "https://gitchamber.com/repos/remorses/fumabase/main/file/cloudflare-tunnel/README.md"

Search for "markdown" in the repository

curl "https://gitchamber.com/repos/remorses/fumabase/main/search/markdown"

More Examples

# List all files
curl "https://gitchamber.com/repos/facebook/react/main/files"

# Get package.json
curl "https://gitchamber.com/repos/facebook/react/main/file/package.json"

# Search for "hooks"
curl "https://gitchamber.com/repos/facebook/react/main/search/hooks"

🛠️ Development

Prerequisites

  • Node.js 18+
  • pnpm
  • Cloudflare Workers CLI (Wrangler)

Setup

# Clone the repository
git clone https://github.com/your-username/gitchamber.git
cd gitchamber

# Install dependencies
pnpm install

# Deploy to Cloudflare Workers
pnpm run deployment

Configuration

The service can be configured via environment variables in wrangler.jsonc:

{
  "vars": {
    "GITHUB_TOKEN": "", // Optional: Increases rate limit to 5,000 req/h
    "CACHE_TTL_MS": "21600000" // Optional: Cache TTL in milliseconds (6h default)
  }
}

Custom Domain

The service is configured to run on gitchamber.com. To use your own domain, update the routes in wrangler.jsonc:

{
  "routes": [
    {
      "pattern": "yourdomain.com/*",
      "custom_domain": true
    }
  ]
}

🏛️ Tech Stack

  • Runtime: Cloudflare Workers
  • Storage: Durable Objects with SQLite
  • Framework: Spiceflow - Type-safe API framework
  • Validation: Zod
  • Archive Parsing: @mjackson/tar-parser
  • Language: TypeScript

📊 Performance

  • Cold Start: ~200-500ms (first access to a repository)
  • Cached Response: ~10-50ms globally
  • Storage: Efficient SQLite storage with FTS indexing
  • Concurrency: Handled automatically by Durable Objects

🔒 Rate Limits

  • Without GitHub Token: 60 requests/hour per IP (GitHub's public API limit)
  • With GitHub Token: 5,000 requests/hour (recommended for production)

📄 License

MIT License - see LICENSE for details.

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

🐛 Issues

If you encounter any issues, please report them on GitHub Issues.