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

@aryannaik225/repo-cleaner

v1.0.4

Published

A CLI tool to remove comments from code files in a repository.

Readme

Repo Cleaner CLI

A safer, smarter way to remove comments from your code.

Repo Cleaner is a CLI tool that automatically strips comments from your source code files while preserving critical configuration files. It supports multiple languages (JS, Python, Java, etc.) and features a Preview Mode so you know exactly what will be changed before it happens.

NPM Version License

🚀 Quick Start

No installation required! Run it directly using npx:

npx @aryannaik225/repo-cleaner

This will:

  1. Scan your current directory.
  2. Show you a list of files that contain comments.
  3. Ask for confirmation before modifying anything

✨ Features

  • Multi-Language Support: Works with JavaScript, TypeScript, Python, Java, C++, PHP, CSS, HTML, and more.
  • Safety First: Scans and previews files before editing them.
  • Smart Ignores: Automatically skips node_modules, .git, dist, build, and .next folders.
  • Customizable: Precise control over which files to keep and which folders to ignore.
  • Dry Run Mode: Simulate the entire process without touching your disk.

🛠️ Usage & Examples

  1. Basic Usage

    Run in the current folder. It will interactively ask for confirmation.

    npx @aryannaik225/repo-cleaner
  2. Dry Run (Simulation)

    Want to see what would happen without risking your code?

    npx @aryannaik225/repo-cleaner --dry-run
  3. Keep Comments in Specific Files(-k)

    Sometimes you want to keep comments in config files or documentation. (Default keeps: README.md, LICENSE, package.json)

    npx @aryannaik225/repo-cleaner --keep "next.config.js, .env.example, NOTES.md"

    Or Simple

    npx @aryannaik225/repo-cleaner --k "next.config.js, .env.example, NOTES.md"
  4. Ignore Additional Folders(-i)

    If you have a legacy or scripts folder you don't want to touch.

    npx @aryannaik225/repo-cleaner --ignore "legacy, scripts"

    OR Simple

    npx @aryannaik225/repo-cleaner --i "legacy, scripts"
  5. Automation Mode (Skip Prompt)

    Useful for CI/CD pipelines. Use with caution!

    npx @aryannaik225/repo-cleaner --yes

⚙️ Options

| Flag | Description | Default | |------|-------------|---------| | -d, --dir, <path> | Target directory to clean | .(Current Dir) | | -k, --keep, <files> | Comma-separated filenames to preserve | README.md, LICENSE, package.json | | -i, --ignore, <folders> | Comma-separated folders to ignore | node_modules, .git, dist, ... | | --dry-run | Simulate removal without saving changes | false | | -y, --yes | Skip confirmation prompt | false |

📦 Supported Languages

The tool automatically detects comments based on file extensions:

  • Web: .js, .jsx, .ts, .tsx, .html, .css, .scss, .json
  • Backend: .py, .java, .php, .go, .rb
  • Systems: .c, .cpp, .cs, .rs, .swift
  • Scripts: .sh, .sql, .yaml

⚠️ Important Warning

This action is irreversible. While the tool provides a confirmation prompt, once you select "Yes", the comments are gone forever. Always ensure you have a backup or a clean git status before running this tool.

📄 License

ISC License

Created by Aryan Naik