{"id":17436073,"url":"https://github.com/dibe-sh/cleaner","last_synced_at":"2025-09-08T02:41:40.900Z","repository":{"id":257846892,"uuid":"873019683","full_name":"dibe-sh/cleaner","owner":"dibe-sh","description":"Cleaner is a cross-platform command-line tool written in Go that recursively scans directories to remove specified files and directories","archived":false,"fork":false,"pushed_at":"2024-12-09T16:59:20.000Z","size":93,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-10T11:31:12.672Z","etag":null,"topics":["cleaner","clearing","delete","dependencies","golang","nodemodules"],"latest_commit_sha":null,"homepage":"https://dibe-sh.github.io/cleaner","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dibe-sh.png","metadata":{"files":{"readme":"ReadMe.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-15T13:24:37.000Z","updated_at":"2025-04-30T15:25:49.000Z","dependencies_parsed_at":"2025-09-08T02:41:40.631Z","dependency_job_id":null,"html_url":"https://github.com/dibe-sh/cleaner","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"3eb427a14ae70a847e9c30425b086ce64242e383"},"previous_names":["dibe-sh/cleaner"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/dibe-sh/cleaner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dibe-sh%2Fcleaner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dibe-sh%2Fcleaner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dibe-sh%2Fcleaner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dibe-sh%2Fcleaner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dibe-sh","download_url":"https://codeload.github.com/dibe-sh/cleaner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dibe-sh%2Fcleaner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274125183,"owners_count":25226486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cleaner","clearing","delete","dependencies","golang","nodemodules"],"created_at":"2024-10-17T10:01:58.485Z","updated_at":"2025-09-08T02:41:40.877Z","avatar_url":"https://github.com/dibe-sh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cleaner\n\n[![CI](https://github.com/dibe-sh/cleaner/actions/workflows/ci.yml/badge.svg)](https://github.com/dibe-sh/cleaner/actions/workflows/ci.yml)\n\nCleaner is a cross-platform command-line tool written in Go that recursively scans directories to remove specified files and directories. It offers features like concurrency for faster execution, dry-run mode, exclusion patterns, custom logging formats, and more. Cleaner is configurable via a JSON file, allowing for flexible and powerful cleaning operations.\n\n## Features\n\n- Recursive Scanning: Scans directories to any depth.\n- Configurable Cleaning: Remove directories and files based on a JSON configuration.\n- Concurrency: Utilizes multiple CPU cores for faster execution.\n- Dry-Run Mode: Simulate the cleaning process without deleting files.\n- Exclusion Patterns: Exclude specific directories and files from being removed.\n- Custom Logging Formats: Choose between text or JSON log formats.\n- Verbose and Silent Modes: Control console output with the --verbose flag.\n- No External Dependencies: Built as static binaries, requiring no dependencies on the target platforms.\n\n## Table of Contents\n\n- [Cleaner](#cleaner)\n  - [Features](#features)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n    - [Download Pre-built Binaries](#download-pre-built-binaries)\n    - [Build from Source](#build-from-source)\n  - [Usage](#usage)\n    - [Basic Usage](#basic-usage)\n  - [Help](#help)\n  - [Configuration](#configuration)\n    - [Default Configuration (cleaner\\_config.json)](#default-configuration-cleaner_configjson)\n    - [Custom Configuration](#custom-configuration)\n  - [Command-Line Flags](#command-line-flags)\n  - [Examples](#examples)\n  - [Contributing](#contributing)\n  - [License](#license)\n\n## Installation\n\n### Download Pre-built Binaries\n\nPre-built binaries are available for multiple platforms:\n\n- Windows (amd64)\n- macOS (amd64, arm64)\n- Linux (amd64, arm64)\n   Download the appropriate binary for your platform from the [Releases page](https://github.com/dibe-sh/cleaner/releases). The binaries are self-contained and do not require any external dependencies.\n\nExample:\n\n- For macOS on Apple Silicon (M1/M2):\n\nDownload cleaner-darwin-arm64 and make it executable:\n\n```bash\nchmod +x cleaner-darwin-arm64\n```\n\n- For Windows:\n\nDownload cleaner-windows-amd64.exe and run it directly.\n\n### Build from Source\n\nIf you prefer to build Cleaner from source, ensure you have Go installed (version 1.20 or later).\n\nSteps:\n\nClone the Repository:\n\n```bash\ngit clone https://github.com/dibe-sh/cleaner.git\ncd cleaner\n```\n\nBuild the Executable:\n\n```bash\ngo build -ldflags=\"-s -w\" -o cleaner\n```\n\nThe -ldflags=\"-s -w\" flags reduce the binary size by stripping debug information.\nMake the Executable (if necessary):\n\n```bash\nchmod +x cleaner\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n./cleaner --root /path/to/start\n```\n\nThis command starts the cleaning process from the specified root directory using the default configuration.\n\n## Help\n\n```bash\n./cleaner --help\n```\n\nDisplays the list of available command-line flags and their descriptions.\n\n## Configuration\n\nCleaner uses a JSON configuration file to specify which directories and files to remove or exclude.\n\n### Default Configuration (cleaner_config.json)\n\n```json\n{\n    \"directories_to_remove\": [\n        \"node_modules\",\n        \"dist\",\n        \"build\",\n        \"bin\",\n        \".next\",\n        \".turbo\",\n        \".idea\",\n        \".cache\"\n    ],\n    \"file_extensions_to_remove\": [\".DS_Store\", \"__debug_bin\"],\n    \"exclude_directories\": [\".git\", \".svn\"],\n    \"exclude_files\": [],\n    \"matchRegex\": true\n}\n```\n\n- directories_to_remove: List of directory names to remove.\n- file_extensions_to_remove: List of file extensions to remove.\n- exclude_directories: List of directory names to exclude from removal.\n- exclude_files: List of file names to exclude from removal.\n\n### Custom Configuration\n\nYou can specify a custom configuration file using the --config flag:\n\n```bash\n./cleaner --root /path/to/start --config /path/to/custom_config.json\n```\n\n## Command-Line Flags\n\n- --root: Root directory to start scanning (default is current directory .).\n- --config: Path to the JSON configuration file (default is cleaner_config.json).\n- --verbose: Enable verbose console output (true or false, default is true).\n- --save-log: Enable saving logs to file (true or false, default is true).\n- --dry-run: Simulate the cleaning process without deleting files (default is false).\n- --log-format: Log format, either 'text' or 'json' (default is 'text').\n\n## Examples\n\n- Run with Default Settings\n\n```bash\n./cleaner --root /path/to/start\n```\n\n- Dry-Run Mode\n   Simulate the cleaning process without deleting any files:\n\n```bash\n./cleaner --root /path/to/start --dry-run\n```\n\n- Silent Mode without Saving Logs\n   Run without console output and without saving logs:\n\n```bash\n./cleaner --root /path/to/start --verbose=false --save-log=false\n```\n\nCustom Configuration and Log Format\nUse a custom configuration file and save logs in JSON format:\n\n```bash\n./cleaner --root /path/to/start --config custom_config.json --log-format json\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request on GitHub.\n\nSteps to Contribute\n\n- Fork the repository.\n- Create a new branch (git checkout -b feature/YourFeature).\n- Commit your changes (git commit -am 'Add some feature').\n- Push to the branch (git push origin feature/YourFeature).\n- Open a pull request.\n\nComprehensive documentation is available at [Cleaner Documentation](https://dibe-sh.github.io/cleaner).\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdibe-sh%2Fcleaner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdibe-sh%2Fcleaner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdibe-sh%2Fcleaner/lists"}