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

sort-files-cli

v1.1.2

Published

A CLI tool to sort files into predefined categories

Readme

📂 Sort Files CLI

npm version license install size

A sleek, powerful command-line tool that automatically organizes your messy directories into beautiful, categorized folders based on file types.


✨ Features

  • 🚀 Instant Organization: Sort hundreds of files in milliseconds.
  • 📂 Smart Categorization: Automatically groups files into Images, Videos, Code, Documents, and more.
  • � Safety First: Includes a --dry-run mode to preview changes and a --revert flag to undo everything.
  • ⚡ Modern UI: Beautiful terminal output with progress spinners and color-coded feedback.
  • � Developer Ready: Supports common programming extensions like JS, PY, GO, TS, and more.

� Before & After

Before:

Downloads/
├── vacation.jpg
├── report.pdf
├── script.py
├── archive.zip
└── notes.txt

After:

Downloads/
├── 📸 images/vacation.jpg
├── 📄 documents/report.pdf, notes.txt
├── 💻 code/script.py
└── 📦 archives/archive.zip

🛠 Installation

Install the tool globally using npm:

npm install -g sort-files-cli

🚀 Usage

Basic Commands

# Sort the current directory
sort-files

# Sort a specific folder
sort-files ~/Downloads

# Preview changes without moving any files (Highly Recommended!)
sort-files --dry-run

# Oops! Revert everything back to how it was
sort-files --revert

🎛 Options

| Flag | Description | | :--- | :--- | | -d, --dry-run | Preview changes without moving files | | -r, --revert | Revert files back to their original location | | -h, --help | Display help information | | -V, --version | Display version number |


📁 Supported Categories

| Category | Icon | Extensions | | :--- | :--- | :--- | | Images | 📸 | jpg, png, gif, svg, webp, ico, raw ... | | Videos | 🎥 | mp4, mov, avi, mkv, webm ... | | Documents | 📄 | pdf, docx, txt, xlsx, pptx, csv ... | | Code | 💻 | js, py, html, css, ts, go, json, md ... | | Archives | 📦 | zip, rar, 7z, tar, gz, iso ... | | Music | 🎵 | mp3, wav, flac, m4a, aac ... | | E-books | 📚 | epub, mobi, azw3, fb2 | | Executables | ⚙️ | exe, dmg, pkg, app, sh, bin | | Fonts | 🔡 | ttf, otf, woff, woff2 |


🛡 How It Works

  1. Scanning: The tool identifies all files in your target directory.
  2. Analysis: It checks the file extension against a database of categories.
  3. Execution: It safely moves files into categorized subfolders (creating them if they don't exist).
  4. Cleanup: Empty category folders are removed when you use the --revert command.

🤝 Contributing

Found a bug or have a feature request?

  1. Fork the GitHub Repository.
  2. Create your feature branch (git checkout -b feature/AmazingFeature).
  3. Commit your changes (git commit -m 'Add some AmazingFeature').
  4. Push to the branch (git push origin feature/AmazingFeature).
  5. Open a Pull Request.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Author: Tochukwu Nweke
Project Link: https://github.com/nwekeKent/sort-file-cli