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

torch-it

v2.6.2

Published

CLI to reset, clean, and rebuild Node.js project environments.

Readme

🔥 Torch It

GitHub Release tests workflow License: MIT npm version

One command to nuke caches, dependencies, and Docker environments — then rebuild from scratch.

Project stopped working for no obvious reason? torch-it cleans up 50+ build artifacts, cache directories, and temporary files, then reinstalls your dependencies fresh. It's surprising how often this just fixes things. 🤞


Quick Start

npm install -g torch-it   # install globally (recommended)
cd your-project
torch-it                  # clean and rebuild

torch-it will show you a preview of what it's about to delete and ask for confirmation before doing anything destructive.


What It Does

Always runs

  1. Removes build artifacts and cache directories (50+ targets — node_modules, dist, .next, .cache, .vite, etc.)
  2. Removes log files and temporary files (*.log, *.tgz, *.tar.gz, etc.)
  3. Removes any custom paths you define in torchrc.json
  4. Cleans your package manager's cache (npm, yarn, or pnpm)
  5. Reinstalls all dependencies

Optionally runs (Docker mode)

When dockerMode: true and a docker-compose.yml or Dockerfile is present:

| Step | When | Command | |------|------|---------| | Teardown | Before cleanup | docker compose down --rmi all --volumes | | Rebuild | After dependency install | docker compose build --pull --no-cache | | Start | After successful rebuild | docker compose up -d |

Note: All Docker operations use docker compose (plugin). Ensure Docker Compose plugin is installed and on your PATH.


Installation

Global (recommended)

Install once, use in any project:

npm install -g torch-it

Per-project

npm install torch-it --save-dev

Add a script to package.json:

{
  "scripts": {
    "torch": "torch-it"
  }
}

Then run with npm run torch or npx torch-it.


Usage

Basic run

torch-it

Shows a preview of what will be deleted, then prompts: Continue? Type Yes or No (y/n).

Skip confirmation (CI / automation)

torch-it --yes   # or -y

Dry run (preview only, no changes)

torch-it --test

Show current configuration

torch-it --config

Displays all active settings, every cleanup target, custom paths, protected paths, and Docker settings. Useful for verifying your setup before running.


Configuration

Create a torchrc.json file in your project root to customise behaviour. Everything is optional — torch-it works with sensible defaults out of the box.

{
  "customPaths": ["apps/web/.next", "services/api/tmp", "coverage-final.json"],
  "protectedPaths": ["important-data/", "config/production.json"],
  "dockerMode": false,
  "rebuild": true,
  "logfile": false
}

| Option | Type | Default | Description | |--------|------|---------|-------------| | customPaths | string[] | [] | Extra directories or files to delete during cleanup | | protectedPaths | string[] | [] | Paths to skip — preserved even if they match built-in targets | | dockerMode | boolean | false | Enable Docker teardown, rebuild, and launch | | rebuild | boolean | true | Set to false to skip dependency reinstall and Docker rebuild (cleanup still runs) | | logfile | boolean | false | Write runtime output to torch-it.log in the project root |

Command line overrides

Any config option can be overridden with a flag. Flags take precedence over torchrc.json.

torch-it --yes --rebuild=false --customPaths=["temp/","logs/"]
torch-it --dockerMode=true --logfile=true

All flags:

| Flag | Description | |------|-------------| | --help | Show help and available options | | --version, -v | Show version and exit | | --config | Show current configuration and exit | | --test | Dry run — preview changes without executing | | --yes, -y | Skip confirmation prompt | | --customPaths=[...] | Extra paths to delete | | --protectedPaths=[...] | Paths to preserve | | --dockerMode=true\|false | Enable/disable Docker steps | | --rebuild=true\|false | Enable/disable dependency reinstall and Docker rebuild | | --logfile=true\|false | Enable/disable log file output |


Supported Frameworks & Tools

React, Next.js, Vue, Vite, SvelteKit, React Native, Expo, Remix, Qwik, Nuxt, Astro, Angular, Solid, Docusaurus, and 40+ more.

Package managers: npm · yarn · pnpm

Framework build outputs

dist, build, out, .output, .next, .nuxt, .svelte-kit, .svelte, .remix, .qwik, .astro, .angular, .angular/cache, .solid, .docusaurus, .nitro

Build tool caches

.cache, .parcel-cache, .webpack, .rollup.cache, .vite, .swc, .rpt2_cache, .eslintcache, .stylelintcache, .sass-cache, .babel-cache, .cache-loader

Package manager caches

node_modules/.cache, .npm, .pnpm-store, .pnpm-debug.log, .yarn/cache, .yarn/unplugged, .yarn/install-state.gz

Monorepo & build tools

.turbo, .nx/cache, .lerna, .rush, .yalc

Blockchain & Web3

.hardhat, .foundry, .anchor

Deployment & platform

.vercel, .netlify, .wrangler, .amplify, .sst, .firebase, .serverless

Mobile development

android/.gradle, android/build, android/app/build, ios/Pods, ios/build, .expo, .expo-shared

File patterns

*.log, *.tgz, *.tar.gz, tsconfig.tsbuildinfo, coverage, .nyc_output, storybook-static, .storybook-out

Temporary files

.tmp, tmp, temp, lib, es, cjs, umd, jspm_packages, .typings


Logging

By default, output goes to the console only. To save a log file for troubleshooting, set logfile: true in torchrc.json or pass --logfile=true.

The log is written to torch-it.log in your project root. Add it to .gitignore:

torch-it.log

Troubleshooting

Docker issues: Run docker compose ps from the project root to check if Compose is working. For rebuilds, confirm docker compose is on your PATH. Check that the Docker daemon is running with docker info.

Missing package.json: Run npm init -y to initialise a project, or make sure you're in the right directory.

Not sure what will be deleted? Run torch-it --config to see the full list of targets, or torch-it --test for a dry run.


License

MIT — Happy torching! 🔥✨