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

@onlybond/crate

v1.1.0

Published

A virtual environment for Node.js — like Python's venv, but for npm, pnpm, yarn, and bun

Readme

📦 Crate

CI npm version License: MIT TypeScript

A virtual environment for Node.js — like Python's venv, but for npm, pnpm, yarn, and bun.

Crate replaces node_modules/ with a clean, isolated .crate/ folder and a global package store.
You can activate Crate in any project and keep using your favorite package manager exactly the same way —
but everything installs into .crate/lib instead of polluting your project with node_modules/.

✨ Features

  • 🚀 Faster installs — reuse packages from a global store
  • 🧹 No giant node_modules/ — projects stay clean
  • 🔄 Works with all package managers (npm, pnpm, yarn, bun)
  • 🛠 No new workflow — keep typing npm install or pnpm add, Crate redirects automatically
  • 🔒 Isolation per project — no accidental cross-pollution
  • 🎯 Zero configuration — works out of the box

🚀 Installation

Install Crate globally:

pnpm install -g @onlybond/crate
# or
npm install -g @onlybond/crate

🔹 Usage

1. Initialize a project

Explicitly set up Crate in your project:

crate init

This creates a .crate/ folder and prepares the environment.


2. Migrate from node_modules

If you already have dependencies in node_modules/:

crate migrate

This moves them into Crate's store and links them into .crate/lib, then removes node_modules/.


3. Activate the environment

The main command:

crate activate

✅ What happens:

  • If .crate/ doesn't exist, Crate auto-migrates your project.
  • Environment variables (NODE_PATH, PATH) are updated.
  • Shims for npm, pnpm, yarn, bun are installed into .crate/bin/.
  • Your shell prompt changes to show you're inside Crate.

Exit any time with:

exit

(or just close your terminal tab/window).


4. Disable the environment

To return to standard node_modules mode:

crate disable

This will reinstall all dependencies into node_modules/ and clean up the Crate environment.


🔹 Example Workflow

pnpm add react

# Start Crate
crate activate

# Inside Crate (prompt shows `(crate:project)`)
npm install lodash
yarn add typescript
bun add express
pnpm add chalk

# Verify: no node_modules created
ls node_modules   # ❌ not found
ls .crate/lib     # ✅ contains react, lodash, typescript, express, chalk

exit
# Back to normal environment

📂 Project Layout

my-app/
 ├── package.json
 ├── pnpm-lock.yaml
 ├── .crate/
 │   ├── lib/         # packages linked here instead of node_modules
 │   ├── bin/         # shims for npm, pnpm, yarn, bun
 │   └── manifest.json

Global cache (shared across all projects):

~/.crate/store/
 ├── [email protected]/
 ├── [email protected]/
 ├── [email protected]/
 └── [email protected]/

🔹 Why Crate?

  • 🚀 Faster installs — reuse packages from a global store.
  • 🧹 No giant node_modules/ — projects stay clean.
  • 🔄 Works with all package managers (npm, pnpm, yarn, bun).
  • 🛠 No new workflow — keep typing npm install or pnpm add, Crate redirects automatically.
  • 🔒 Isolation per project — no accidental cross-pollution.

🛣 Roadmap

  • [x] Init & migrate commands
  • [x] Activation with environment prompt
  • [x] Shims for npm, pnpm, yarn, bun
  • [x] Disable command to return to node_modules
  • [ ] Proper dependency tree resolution (flattening like pnpm)
  • [ ] Windows/macOS/Linux full parity testing
  • [ ] Deactivation helper (crate deactivate)

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details on how to get started.

Development Setup

# Clone the repository
git clone https://github.com/onlybond/crate.git
cd crate

# Install dependencies
pnpm install

# Build the project
pnpm build

# Link for local testing
pnpm link

Running Tests

# Run all tests
pnpm test

# Run tests in watch mode
pnpm test:watch

# Run tests with coverage
pnpm test:coverage

Code Quality

# Lint code
pnpm lint

# Format code
pnpm format

# Type check
pnpm type-check

📋 Roadmap

  • [x] Init & migrate commands
  • [x] Activation with environment prompt
  • [x] Shims for npm, pnpm, yarn, bun
  • [x] Disable command to return to node_modules
  • [ ] Proper dependency tree resolution (flattening like pnpm)
  • [ ] Windows/macOS/Linux full parity testing
  • [ ] Deactivation helper (crate deactivate)
  • [ ] Plugin system for custom package managers
  • [ ] Integration with popular IDEs

🐛 Issues & Support

🔒 Security

Please see our Security Policy for information about reporting security vulnerabilities.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • Inspired by Python's venv and virtualenv
  • Built with TypeScript and Node.js
  • Thanks to all contributors who help make this project better