{"_id":"@bpsingh01012022/cleaner","name":"@bpsingh01012022/cleaner","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bpsingh01012022/cleaner","version":"1.0.0","description":"A smart cleanup CLI that locates backup files and folders using patterns and automatically archives them into dated folders while preserving structure.","main":"bin/cleaner.js","bin":{"cleaner":"bin/cleaner.js"},"type":"commonjs","preferGlobal":true,"scripts":{"start":"node bin/cleaner.js","build":"tsc","test":"node test/cli.test.js","prepare":"npm run build"},"dependencies":{"archiver":"5.3.1"},"devDependencies":{"@types/archiver":"7.0.0","@types/node":"24.10.1","typescript":"5.9.3"},"repository":{"type":"git","url":"git+https://github.com/bpsingh2022/cleaner.git"},"keywords":["cli","cleanup","backup","archive","file-system","auto-cleaner","maintenance","node-cli","automation"],"engines":{"node":">=18"},"author":{"name":"bpsingh2020","email":"bpsingh01012022@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/bpsingh2022/cleaner/issues"},"homepage":"https://github.com/bpsingh2022/cleaner#readme","_id":"@bpsingh01012022/cleaner@1.0.0","gitHead":"993be819141e4327751bb539d99b2a92dbafbbad","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-+cfNoV2luiko2VpJQsX/BONoevgJgSt7V26LwCt1VMyoakD13ZESjCH0pTAZ091Kg6FgDmt7f8yQ2tjTY4JVTQ==","shasum":"a94a33497672b3a4d51e8f34b3f9bc7a37540b40","tarball":"https://registry.npmjs.org/@bpsingh01012022/cleaner/-/cleaner-1.0.0.tgz","fileCount":7,"unpackedSize":23696,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCOlFlFjvP0WKNz9jGE9pK1f0JKe0dvXFn+Rhyla0Z3EAIhAOyCG83ZL+rHGwlb9Nwu88WSKfvOZoG2uQx/taVKE/R8"}]},"_npmUser":{"name":"bpsingh01012022","email":"bpsingh01012022@gmail.com"},"directories":{},"maintainers":[{"name":"bpsingh01012022","email":"bpsingh01012022@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cleaner_1.0.0_1763940159968_0.6170914677050028"},"_hasShrinkwrap":false}},"time":{"created":"2025-11-23T23:22:39.892Z","1.0.0":"2025-11-23T23:22:40.163Z","modified":"2025-11-23T23:22:40.450Z"},"maintainers":[{"name":"bpsingh01012022","email":"bpsingh01012022@gmail.com"}],"description":"A smart cleanup CLI that locates backup files and folders using patterns and automatically archives them into dated folders while preserving structure.","homepage":"https://github.com/bpsingh2022/cleaner#readme","keywords":["cli","cleanup","backup","archive","file-system","auto-cleaner","maintenance","node-cli","automation"],"repository":{"type":"git","url":"git+https://github.com/bpsingh2022/cleaner.git"},"author":{"name":"bpsingh2020","email":"bpsingh01012022@gmail.com"},"bugs":{"url":"https://github.com/bpsingh2022/cleaner/issues"},"license":"MIT","readme":"# 🧹 Cleaner CLI\r\n\r\n[![npm version](https://img.shields.io/npm/v/cleaner-cli.svg)](https://www.npmjs.com/package/cleaner-cli)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\r\n\r\nCleaner is a simple yet powerful CLI tool for organizing and archiving files based on patterns.\r\nIt preserves folder structure, supports dry-run mode, verbose logs, and optional ZIP compression — making it useful for cleaning backups, outdated builds, logs, or messy project directories.\r\n\r\n---\r\n\r\n## ⚠️ Disclaimer\r\n\r\n> **This tool is under active development. Use carefully.**\r\n> Always test in a safe environment before running it on important data.\r\n> The author assumes **no responsibility for unintended modifications or data loss.**\r\n\r\n---\r\n\r\n## 📚 Documentation\r\n\r\n* 📘 **User Guide** → [docs/user-guide.md](docs/user-guide.md)\r\n* 🛠 **Developer Guide** → [docs/developer-guide.md](docs/developer-guide.md)\r\n\r\n---\r\n\r\n## ✨ Features\r\n\r\n* Archive files and folders matching one or multiple patterns\r\n* Preserves directory structure inside `bk-archive/YYYY-MM-DD/`\r\n* Supports:\r\n\r\n  * `--dry-run` (simulation mode)\r\n  * `--verbose` (detailed logs)\r\n  * `--zip` (optional archive compression)\r\n* Logs all actions to:\r\n  `bk-backup-log-YYYY-MM-DD.txt`\r\n* Safe move strategy with fallback copy-delete\r\n* Automatically ignores its own archive folder\r\n\r\n---\r\n\r\n## 📦 Installation\r\n\r\nClone the repository and install dependencies:\r\n\r\n```bash\r\ngit clone https://github.com/bpsingh2022/cleaner.git\r\ncd cleaner\r\nnpm install\r\n```\r\n\r\n### Optional: Install globally\r\n\r\n```bash\r\nnpm install -g .\r\ncleaner --help\r\n```\r\n\r\n---\r\n\r\n## 🛠 Usage\r\n\r\n```bash\r\ncleaner [sourceFolder] \r\n        [--dry-run] \r\n        [--verbose] \r\n        [--zip] \r\n        [--pattern \"bk-*\"] \r\n        [--patterns \"bk-*,logs*,dist\"]\r\n        [--archive \"my-archive\"]\r\n```\r\n\r\n---\r\n\r\n### 💡 Examples\r\n\r\nPreview actions without making changes:\r\n\r\n```bash\r\ncleaner --dry-run --verbose\r\n```\r\n\r\nArchive multiple pattern groups with zipping:\r\n\r\n```bash\r\ncleaner /projects/myapp --patterns \"bk-*,logs*,dist\" --zip\r\n```\r\n\r\nUse repeated `--pattern` flags:\r\n\r\n```bash\r\ncleaner . --pattern \"backup-*\" --pattern \"old_*\" --verbose\r\n```\r\n\r\n---\r\n\r\n## 🧠 Design Notes\r\n\r\n* **Never enters:** `bk-archive`\r\n* **Error-safe:** all operations wrapped in try/catch\r\n* **ZIP mode:** enabled only when `--zip` is supplied\r\n* **Pattern support:** prefix, suffix, contains, exact names\r\n\r\n---\r\n\r\n## 📄 License\r\n\r\nThis project is licensed under the **MIT License**.\r\nSee: [LICENSE](LICENSE)\r\n","readmeFilename":"README.md","_rev":"1-d622de57319c260d9418d69d42a68f00"}