New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sad-cli

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sad-cli

A CLI tool to search and delete files/folders interactively with ignore support

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

sad-cli 🔍🗑️

Search and Delete CLI (SAD-CLI) is a simple Node.js tool that allows you to search for files/folders and delete them interactively.

📌 Installation

Run it without installing:

npx sad-cli <folder-path> <name-to-delete1> <name-to-delete2> ... --ignore <ignore1> <ignore2> ...

Or install it globally:

npm install -g sad-cli

Or install it in a Node.js project:

npm install sad-cli

🚀 Usage

1️⃣ CLI Mode

sad-cli <folder-path> <name-to-delete1> <name-to-delete2> ... --ignore <ignore1> <ignore2> ...

Examples 1️⃣ Delete test.txt but ignore important.txt

npx sad-cli /path/to/folder test.txt test.mp3 --ignore important.txt important2.pdf

2️⃣ Delete node_modules but ignore essential_modules

npx sad-cli ./my-project node_modules --ignore essential_modules

2️⃣ Node.js Module Mode

const sadCli = require("sad-cli");

(async () => {
  await sadCli("./my-folder", ["old-file.txt"], ["important-folder"]);
})();

🔹 Features

  • ✅ Logs directory structure before scanning
  • ✅ Skips ignored files/folders
  • ✅ Does not scan inside ignored folders
  • ✅ Prompts confirmation before deletion

MIT Licensed | Author: EmmsDan

sad-cli

Keywords

cli

FAQs

Package last updated on 22 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts