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

@polymer-labs/crystal-cache

v1.0.0

Published

Global package caching system with Crystal Cache architecture

Readme

@polymer-labs/crystal-cache

Global package caching system with Crystal Cache architecture for Gel package manager.

Installation

npm install @polymer-labs/crystal-cache

Usage

const CrystalCache = require('@polymer-labs/crystal-cache');

// Initialize cache
const cache = new CrystalCache();

// Store a package
await cache.store('react', '18.2.0', '/path/to/react-18.2.0.tar.gz');

// Check if package exists
const exists = cache.has('react', '18.2.0');

// Get package path
const pkgPath = cache.get('react', '18.2.0');

// Link package to project
await cache.link('react', '18.2.0', '/project/node_modules/react');

// Get cache statistics
const stats = cache.getStats();
console.log(`Packages: ${stats.totalPackages}`);
console.log(`Size: ${stats.totalSize}`);
console.log(`Saved: ${stats.spaceSaved}`);

Features

  • 🔮 Global Deduplication - Store packages once, use everywhere
  • 🔗 Symlink Management - Efficient package linking
  • 💾 Space Efficient - Reduces disk usage significantly
  • Fast Access - Quick package retrieval
  • 🔒 Integrity Checks - Hash-based verification
  • 📊 Usage Statistics - Track cache efficiency

Architecture

The Crystal Cache uses a centralized storage model:

~/.gel/crystal-cache/
├── packages/
│   ├── [email protected]/
│   ├── [email protected]/
│   └── [email protected]/
└── metadata.json

How It Works

  1. Storage: Packages are extracted once to global cache
  2. Linking: Projects receive symlinks to cached packages
  3. Deduplication: Same package version shared across projects
  4. Integrity: SHA-256 hashing ensures package authenticity

API

Constructor

const cache = new CrystalCache(options);

Options:

  • cacheDir (string) - Custom cache directory (default: ~/.gel/crystal-cache)

Methods

store(name, version, tarballPath)

Store a package tarball in cache.

has(name, version)

Check if package exists in cache.

get(name, version)

Get path to cached package.

link(name, version, targetPath)

Create symlink from cache to project.

remove(name, version)

Remove package from cache.

clear()

Clear entire cache.

getStats()

Get cache statistics.

list()

List all cached packages.

Performance

Typical performance improvements:

  • Installation Speed: 3-5x faster on repeated installs
  • Disk Space: 60-80% reduction across multiple projects
  • Network Usage: Eliminates redundant package downloads

Cache Location

Default: ~/.gel/crystal-cache

Override with environment variable:

export GEL_CACHE_DIR=/custom/path

Maintenance

// Clean old versions
cache.prune({ keepLatest: 2 });

// Verify integrity
const results = await cache.verify();

// Rebuild metadata
await cache.rebuild();

License

MIT © Polymer Labs