@tukuyomil032/broom 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +554 -0
- package/dist/commands/analyze.js +371 -0
- package/dist/commands/backup.js +257 -0
- package/dist/commands/clean.js +255 -0
- package/dist/commands/completion.js +714 -0
- package/dist/commands/config.js +474 -0
- package/dist/commands/doctor.js +280 -0
- package/dist/commands/duplicates.js +325 -0
- package/dist/commands/help.js +34 -0
- package/dist/commands/index.js +22 -0
- package/dist/commands/installer.js +266 -0
- package/dist/commands/optimize.js +270 -0
- package/dist/commands/purge.js +271 -0
- package/dist/commands/remove.js +184 -0
- package/dist/commands/reports.js +173 -0
- package/dist/commands/schedule.js +249 -0
- package/dist/commands/status.js +468 -0
- package/dist/commands/touchid.js +230 -0
- package/dist/commands/uninstall.js +336 -0
- package/dist/commands/update.js +182 -0
- package/dist/commands/watch.js +258 -0
- package/dist/index.js +131 -0
- package/dist/scanners/base.js +21 -0
- package/dist/scanners/browser-cache.js +111 -0
- package/dist/scanners/dev-cache.js +64 -0
- package/dist/scanners/docker.js +96 -0
- package/dist/scanners/downloads.js +66 -0
- package/dist/scanners/homebrew.js +82 -0
- package/dist/scanners/index.js +126 -0
- package/dist/scanners/installer.js +87 -0
- package/dist/scanners/ios-backups.js +82 -0
- package/dist/scanners/node-modules.js +75 -0
- package/dist/scanners/temp-files.js +65 -0
- package/dist/scanners/trash.js +90 -0
- package/dist/scanners/user-cache.js +62 -0
- package/dist/scanners/user-logs.js +53 -0
- package/dist/scanners/xcode.js +124 -0
- package/dist/types/index.js +23 -0
- package/dist/ui/index.js +5 -0
- package/dist/ui/monitors.js +345 -0
- package/dist/ui/output.js +304 -0
- package/dist/ui/prompts.js +270 -0
- package/dist/utils/config.js +133 -0
- package/dist/utils/debug.js +119 -0
- package/dist/utils/fs.js +283 -0
- package/dist/utils/help.js +265 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/paths.js +142 -0
- package/dist/utils/report.js +404 -0
- package/package.json +87 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, tukuyomil032 All Rights Reserved.
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,554 @@
|
|
|
1
|
+
# ๐งน Broom
|
|
2
|
+
|
|
3
|
+
A powerful macOS disk cleanup CLI written in TypeScript. Inspired by [Mole](https://github.com/tw93/Mole).
|
|
4
|
+
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://www.typescriptlang.org/)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
## ๐ Table of Contents
|
|
10
|
+
|
|
11
|
+
- [Features](#features)
|
|
12
|
+
- [Installation](#installation)
|
|
13
|
+
- [Quick Start](#quick-start)
|
|
14
|
+
- [Commands](#commands)
|
|
15
|
+
- [Usage Examples](#usage-examples)
|
|
16
|
+
- [Cleanup Categories](#cleanup-categories)
|
|
17
|
+
- [Configuration](#configuration)
|
|
18
|
+
- [Documentation](#documentation)
|
|
19
|
+
- [Tech Stack](#tech-stack)
|
|
20
|
+
- [License](#license)
|
|
21
|
+
|
|
22
|
+
## โจ Features
|
|
23
|
+
|
|
24
|
+
- **๐งน Deep Cleaning** - Remove caches, logs, trash, browser data, and dev artifacts
|
|
25
|
+
- **๐๏ธ Smart Uninstall** - Completely remove apps and their leftover files
|
|
26
|
+
- **โก System Optimization** - Flush DNS, rebuild Spotlight, purge memory
|
|
27
|
+
- **๐ Disk Analysis** - Visualize disk usage with interactive drill-down
|
|
28
|
+
- **๐ป System Monitoring** - Real-time CPU, memory, disk, and network dashboard
|
|
29
|
+
- **๐ฅ Project Purge** - Clean build artifacts (node_modules, target, dist, etc.)
|
|
30
|
+
- **๐ฆ Installer Cleanup** - Find and remove old installer files
|
|
31
|
+
- **๐ Duplicate Finder** - Locate and remove duplicate files
|
|
32
|
+
- **๐ HTML Reports** - Generate detailed cleanup reports with charts
|
|
33
|
+
- **โ๏ธ Configuration** - Whitelist/blacklist paths, customize safety levels
|
|
34
|
+
- **๐ฉบ Health Check** - Run system diagnostics
|
|
35
|
+
- **๐พ Backup & Restore** - Safe file backup before cleanup
|
|
36
|
+
- **โฐ Scheduler** - Automate cleanup tasks
|
|
37
|
+
- **๐๏ธ Directory Watch** - Monitor directory sizes
|
|
38
|
+
- **๐ Touch ID** - Sudo authentication with Touch ID
|
|
39
|
+
- **๐ Shell Completion** - Tab completion for Bash, Zsh, Fish
|
|
40
|
+
|
|
41
|
+
## ๐ Installation
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
# Clone the repository
|
|
45
|
+
git clone https://github.com/your-username/broom.git
|
|
46
|
+
cd broom
|
|
47
|
+
|
|
48
|
+
# Install dependencies
|
|
49
|
+
bun install # or npm install
|
|
50
|
+
|
|
51
|
+
# Build the project
|
|
52
|
+
bun run build # or npm run build
|
|
53
|
+
|
|
54
|
+
# Link globally (optional)
|
|
55
|
+
bun link
|
|
56
|
+
|
|
57
|
+
# Run projects
|
|
58
|
+
broom <command> <option>
|
|
59
|
+
|
|
60
|
+
# or
|
|
61
|
+
bun run dev <command> <option>
|
|
62
|
+
|
|
63
|
+
# or
|
|
64
|
+
bun dist/index.js <command> <option>
|
|
65
|
+
|
|
66
|
+
# CLI help windows
|
|
67
|
+
broom --help
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## ๐ฏ Usage
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Interactive cleanup - scan and select categories
|
|
74
|
+
broom clean
|
|
75
|
+
|
|
76
|
+
# Preview mode - see what would be cleaned
|
|
77
|
+
broom clean --dry-run
|
|
78
|
+
|
|
79
|
+
# Clean all safe categories automatically
|
|
80
|
+
broom clean --all --yes
|
|
81
|
+
|
|
82
|
+
# Generate HTML report after cleanup
|
|
83
|
+
broom clean --report --open
|
|
84
|
+
|
|
85
|
+
# Analyze disk usage
|
|
86
|
+
broom analyze
|
|
87
|
+
|
|
88
|
+
# System status dashboard
|
|
89
|
+
broom status --watch
|
|
90
|
+
|
|
91
|
+
# Complete uninstall of an app
|
|
92
|
+
broom uninstall
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## ๐ Commands
|
|
96
|
+
|
|
97
|
+
### Core Commands
|
|
98
|
+
|
|
99
|
+
| Command | Description | Key Options |
|
|
100
|
+
| ----------- | -------------------------- | --------------------------------------------------------------- |
|
|
101
|
+
| `clean` | Deep system cleanup | `--dry-run`, `--all`, `--yes`, `--unsafe`, `--report`, `--open` |
|
|
102
|
+
| `analyze` | Disk space analysis | `--path <path>`, `--depth <n>`, `--limit <n>` |
|
|
103
|
+
| `status` | System resource monitoring | `--watch`, `--interval <ms>` |
|
|
104
|
+
| `uninstall` | Remove apps completely | `--dry-run`, `--yes` |
|
|
105
|
+
| `optimize` | System maintenance | `--dry-run`, `--yes`, `--all` |
|
|
106
|
+
|
|
107
|
+
### Utility Commands
|
|
108
|
+
|
|
109
|
+
| Command | Description | Key Options |
|
|
110
|
+
| ------------ | ----------------------- | ----------------------------------------------------- |
|
|
111
|
+
| `purge` | Clean project artifacts | `--dry-run`, `--yes`, `--path <path>` |
|
|
112
|
+
| `installer` | Remove installer files | `--dry-run`, `--yes` |
|
|
113
|
+
| `duplicates` | Find duplicate files | `--path <path>`, `--min-size <size>`, `--interactive` |
|
|
114
|
+
| `reports` | Manage cleanup reports | `list`, `clean`, `open`, `--yes` |
|
|
115
|
+
| `backup` | Create file backups | `--path <path>`, `--tag <name>` |
|
|
116
|
+
| `restore` | Restore from backup | `--tag <name>`, `--path <path>` |
|
|
117
|
+
|
|
118
|
+
### Configuration Commands
|
|
119
|
+
|
|
120
|
+
| Command | Description | Subcommands |
|
|
121
|
+
| ------------ | ------------------- | -------------------------------------------- |
|
|
122
|
+
| `config` | Manage settings | `show`, `set <key> <value>`, `reset`, `path` |
|
|
123
|
+
| `touchid` | Touch ID for sudo | `enable`, `disable`, `status` |
|
|
124
|
+
| `completion` | Shell completion | `bash`, `zsh`, `fish`, `install` |
|
|
125
|
+
| `doctor` | System diagnostics | - |
|
|
126
|
+
| `schedule` | Automate cleanups | `add`, `remove`, `list` |
|
|
127
|
+
| `watch` | Monitor directories | `--add`, `--remove`, `--list`, `--check` |
|
|
128
|
+
|
|
129
|
+
### System Commands
|
|
130
|
+
|
|
131
|
+
| Command | Description | Options |
|
|
132
|
+
| -------- | --------------- | ----------- |
|
|
133
|
+
| `update` | Update broom | - |
|
|
134
|
+
| `remove` | Uninstall broom | `--yes` |
|
|
135
|
+
| `help` | Display help | `[command]` |
|
|
136
|
+
|
|
137
|
+
## ๐ก Usage Examples
|
|
138
|
+
|
|
139
|
+
### Cleanup Operations
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Interactive cleanup with category selection
|
|
143
|
+
broom clean
|
|
144
|
+
|
|
145
|
+
# Dry run - preview without deleting
|
|
146
|
+
broom clean --dry-run
|
|
147
|
+
|
|
148
|
+
# Clean all safe categories without prompts
|
|
149
|
+
broom clean --all --yes
|
|
150
|
+
|
|
151
|
+
# Include risky categories (downloads, trash)
|
|
152
|
+
broom clean --unsafe --yes
|
|
153
|
+
|
|
154
|
+
# Generate HTML report with charts
|
|
155
|
+
broom clean --report --open
|
|
156
|
+
|
|
157
|
+
# Clean specific categories interactively
|
|
158
|
+
broom clean # then select from menu
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Disk Analysis
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
# Analyze home directory
|
|
165
|
+
broom analyze
|
|
166
|
+
|
|
167
|
+
# Analyze specific path with depth
|
|
168
|
+
broom analyze --path ~/Library --depth 3
|
|
169
|
+
|
|
170
|
+
# Show top 20 largest items
|
|
171
|
+
broom analyze --limit 20
|
|
172
|
+
|
|
173
|
+
# Analyze entire disk
|
|
174
|
+
broom analyze --path / --depth 2
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### System Monitoring
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
# Show current system status
|
|
181
|
+
broom status
|
|
182
|
+
|
|
183
|
+
# Live monitoring dashboard
|
|
184
|
+
broom status --watch
|
|
185
|
+
|
|
186
|
+
# Custom refresh interval (500ms)
|
|
187
|
+
broom status --watch --interval 500
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### App Management
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
# Uninstall app with interactive selection
|
|
194
|
+
broom uninstall
|
|
195
|
+
|
|
196
|
+
# Preview uninstall without deleting
|
|
197
|
+
broom uninstall --dry-run
|
|
198
|
+
|
|
199
|
+
# Uninstall without confirmation
|
|
200
|
+
broom uninstall --yes
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### System Optimization
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
# Run all optimization tasks
|
|
207
|
+
broom optimize --all
|
|
208
|
+
|
|
209
|
+
# Preview optimization tasks
|
|
210
|
+
broom optimize --dry-run
|
|
211
|
+
|
|
212
|
+
# Tasks include:
|
|
213
|
+
# - Flush DNS cache
|
|
214
|
+
# - Rebuild Spotlight index
|
|
215
|
+
# - Purge memory cache
|
|
216
|
+
# - Verify disk
|
|
217
|
+
# - Repair permissions
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Project Cleanup
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Clean current directory
|
|
224
|
+
broom purge
|
|
225
|
+
|
|
226
|
+
# Clean specific project
|
|
227
|
+
broom purge --path ~/projects/myapp
|
|
228
|
+
|
|
229
|
+
# Preview what would be cleaned
|
|
230
|
+
broom purge --dry-run
|
|
231
|
+
|
|
232
|
+
# Cleans: node_modules, target, dist, build, .next, etc.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Duplicate Files
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Find duplicates in home directory
|
|
239
|
+
broom duplicates
|
|
240
|
+
|
|
241
|
+
# Scan specific path with size filter
|
|
242
|
+
broom duplicates --path ~/Documents --min-size 1MB
|
|
243
|
+
|
|
244
|
+
# Interactive mode to choose what to keep
|
|
245
|
+
broom duplicates --interactive
|
|
246
|
+
|
|
247
|
+
# Custom hash algorithm
|
|
248
|
+
broom duplicates --hash md5
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Reports Management
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
# List all generated reports
|
|
255
|
+
broom reports
|
|
256
|
+
broom reports list
|
|
257
|
+
|
|
258
|
+
# Delete all reports
|
|
259
|
+
broom reports clean
|
|
260
|
+
|
|
261
|
+
# Delete without confirmation
|
|
262
|
+
broom reports clean --yes
|
|
263
|
+
|
|
264
|
+
# Open latest report in browser
|
|
265
|
+
broom reports open
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Backup & Restore
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
# Backup important files
|
|
272
|
+
broom backup --path ~/Documents --tag "before-cleanup"
|
|
273
|
+
|
|
274
|
+
# List backups
|
|
275
|
+
broom backup --list
|
|
276
|
+
|
|
277
|
+
# Restore from backup
|
|
278
|
+
broom restore --tag "before-cleanup"
|
|
279
|
+
|
|
280
|
+
# Restore to different location
|
|
281
|
+
broom restore --tag "backup-001" --path ~/restored
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Configuration
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Show current configuration
|
|
288
|
+
broom config show
|
|
289
|
+
|
|
290
|
+
# Set safety level (safe, moderate, aggressive)
|
|
291
|
+
broom config set safetyLevel moderate
|
|
292
|
+
|
|
293
|
+
# Add path to whitelist
|
|
294
|
+
echo ~/important-folder >> ~/.config/broom/whitelist
|
|
295
|
+
|
|
296
|
+
# View config file location
|
|
297
|
+
broom config path
|
|
298
|
+
|
|
299
|
+
# Reset to defaults
|
|
300
|
+
broom config reset
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Shell Completion
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
# Install for current shell (auto-detect)
|
|
307
|
+
broom completion install
|
|
308
|
+
|
|
309
|
+
# Generate for specific shell
|
|
310
|
+
broom completion bash > /usr/local/etc/bash_completion.d/broom
|
|
311
|
+
broom completion zsh > ~/.zsh/completions/_broom
|
|
312
|
+
broom completion fish > ~/.config/fish/completions/broom.fish
|
|
313
|
+
|
|
314
|
+
# Zsh manual setup
|
|
315
|
+
broom completion zsh > ~/.zsh/completions/_broom
|
|
316
|
+
# Add to ~/.zshrc: fpath=(~/.zsh/completions $fpath)
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Touch ID Setup
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Enable Touch ID for sudo
|
|
323
|
+
broom touchid enable
|
|
324
|
+
|
|
325
|
+
# Check status
|
|
326
|
+
broom touchid status
|
|
327
|
+
|
|
328
|
+
# Disable Touch ID
|
|
329
|
+
broom touchid disable
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### Scheduling
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# Schedule weekly cleanup
|
|
336
|
+
broom schedule add --weekly
|
|
337
|
+
|
|
338
|
+
# Schedule daily at 2 AM
|
|
339
|
+
broom schedule add --daily --time 02:00
|
|
340
|
+
|
|
341
|
+
# List scheduled tasks
|
|
342
|
+
broom schedule list
|
|
343
|
+
|
|
344
|
+
# Remove schedule
|
|
345
|
+
broom schedule remove <id>
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Directory Watch
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
# Add directory to watch
|
|
352
|
+
broom watch --add --path ~/Downloads --threshold 1GB
|
|
353
|
+
|
|
354
|
+
# List watched directories
|
|
355
|
+
broom watch --list
|
|
356
|
+
|
|
357
|
+
# Check all watches now
|
|
358
|
+
broom watch --check
|
|
359
|
+
|
|
360
|
+
# Remove watch
|
|
361
|
+
broom watch --remove ~/Downloads
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
## ๐๏ธ Cleanup Categories
|
|
365
|
+
|
|
366
|
+
## ๐๏ธ Cleanup Categories
|
|
367
|
+
|
|
368
|
+
### โ
Safe (Default)
|
|
369
|
+
|
|
370
|
+
Always safe to clean without risk of data loss:
|
|
371
|
+
|
|
372
|
+
- **User Cache** - `~/Library/Caches` (app caches)
|
|
373
|
+
- **User Logs** - `~/Library/Logs` (application logs)
|
|
374
|
+
- **Browser Cache** - Chrome, Safari, Firefox, Edge, Brave, Arc
|
|
375
|
+
- **Temporary Files** - `/tmp`, `/var/folders`
|
|
376
|
+
|
|
377
|
+
### โ ๏ธ Moderate (Safe with review)
|
|
378
|
+
|
|
379
|
+
Generally safe but review before cleaning:
|
|
380
|
+
|
|
381
|
+
- **Development Cache** - npm, yarn, pip, cargo, gradle, Maven
|
|
382
|
+
- **Xcode Cache** - DerivedData, Archives, DeviceSupport
|
|
383
|
+
- **Homebrew Cache** - Downloaded packages
|
|
384
|
+
- **Docker Cache** - Build cache, unused images
|
|
385
|
+
- **Node Modules** - In workspace (check before deleting)
|
|
386
|
+
- **iOS Simulator** - Simulator data
|
|
387
|
+
|
|
388
|
+
### ๐จ Risky (Requires `--unsafe`)
|
|
389
|
+
|
|
390
|
+
May contain important files - review carefully:
|
|
391
|
+
|
|
392
|
+
- **Trash** - `~/.Trash` (deleted files)
|
|
393
|
+
- **Downloads** - `~/Downloads` (old files)
|
|
394
|
+
- **iOS Backups** - iPhone/iPad backups
|
|
395
|
+
- **Installer Packages** - `.dmg`, `.pkg` files
|
|
396
|
+
|
|
397
|
+
## โ๏ธ Configuration
|
|
398
|
+
|
|
399
|
+
### Config Location
|
|
400
|
+
|
|
401
|
+
- Config directory: `~/.config/broom/`
|
|
402
|
+
- Main config: `~/.config/broom/config.json`
|
|
403
|
+
- Whitelist: `~/.config/broom/whitelist`
|
|
404
|
+
- Reports: `~/.broom/reports/`
|
|
405
|
+
|
|
406
|
+
### Whitelist Example
|
|
407
|
+
|
|
408
|
+
Create `~/.config/broom/whitelist`:
|
|
409
|
+
|
|
410
|
+
```
|
|
411
|
+
# Protected paths (one per line)
|
|
412
|
+
~/Documents/important-project
|
|
413
|
+
~/Library/Application Support/MyApp
|
|
414
|
+
/Volumes/External/backup
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
### Config Options
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"safetyLevel": "safe", // safe, moderate, aggressive
|
|
422
|
+
"dryRun": false,
|
|
423
|
+
"confirmBeforeDelete": true,
|
|
424
|
+
"excludePaths": [],
|
|
425
|
+
"scanDepth": 3
|
|
426
|
+
}
|
|
427
|
+
```
|
|
428
|
+
|
|
429
|
+
### Global Options
|
|
430
|
+
|
|
431
|
+
All commands support these options:
|
|
432
|
+
|
|
433
|
+
| Option | Description |
|
|
434
|
+
| --------------- | ------------------------ |
|
|
435
|
+
| `-v, --version` | Display version number |
|
|
436
|
+
| `-h, --help` | Display help information |
|
|
437
|
+
| `--debug` | Enable debug logging |
|
|
438
|
+
|
|
439
|
+
## ๐ Documentation
|
|
440
|
+
|
|
441
|
+
Detailed documentation available in the `docs/` directory:
|
|
442
|
+
|
|
443
|
+
- **[COMMANDS.md](docs/COMMANDS.md)** - Complete command reference
|
|
444
|
+
- **[HTML_REPORT.md](docs/HTML_REPORT.md)** - HTML report features
|
|
445
|
+
- **[SCANNERS.md](docs/SCANNERS.md)** - Scanner implementation details
|
|
446
|
+
- **[MIGRATION.md](docs/MIGRATION.md)** - Migration from Mole
|
|
447
|
+
- **[README.md](docs/README.md)** - Full project documentation (Japanese)
|
|
448
|
+
|
|
449
|
+
## ๐ ๏ธ Tech Stack
|
|
450
|
+
|
|
451
|
+
### Core Dependencies
|
|
452
|
+
|
|
453
|
+
- **TypeScript** - Type-safe development
|
|
454
|
+
- **Node.js 18+** - Runtime environment
|
|
455
|
+
- **Commander.js** - CLI framework and argument parsing
|
|
456
|
+
- **@inquirer/prompts** - Interactive prompts and menus
|
|
457
|
+
- **chalk** - Terminal string styling
|
|
458
|
+
- **ora** - Elegant terminal spinners
|
|
459
|
+
|
|
460
|
+
### Utilities
|
|
461
|
+
|
|
462
|
+
- **systeminformation** - System monitoring and hardware info
|
|
463
|
+
- **fast-glob** - Fast file pattern matching
|
|
464
|
+
- **handlebars** - HTML template engine for reports
|
|
465
|
+
- **cli-progress** - Beautiful progress bars
|
|
466
|
+
|
|
467
|
+
### Development
|
|
468
|
+
|
|
469
|
+
- **ESLint** - Code linting
|
|
470
|
+
- **Prettier** - Code formatting
|
|
471
|
+
- **tsup** - TypeScript bundler
|
|
472
|
+
- **bun** - Fast package manager (optional)
|
|
473
|
+
|
|
474
|
+
## ๐๏ธ Project Structure
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
broom/
|
|
478
|
+
โโโ src/
|
|
479
|
+
โ โโโ commands/ # Command implementations
|
|
480
|
+
โ โ โโโ clean.ts
|
|
481
|
+
โ โ โโโ analyze.ts
|
|
482
|
+
โ โ โโโ status.ts
|
|
483
|
+
โ โ โโโ ...
|
|
484
|
+
โ โโโ scanners/ # File scanners
|
|
485
|
+
โ โ โโโ base.ts
|
|
486
|
+
โ โ โโโ browser-cache.ts
|
|
487
|
+
โ โ โโโ ...
|
|
488
|
+
โ โโโ ui/ # User interface
|
|
489
|
+
โ โ โโโ output.ts # Formatted output
|
|
490
|
+
โ โ โโโ prompts.ts # Interactive prompts
|
|
491
|
+
โ โโโ utils/ # Utility functions
|
|
492
|
+
โ โ โโโ fs.ts # File system utilities
|
|
493
|
+
โ โ โโโ config.ts # Configuration
|
|
494
|
+
โ โ โโโ report.ts # HTML report generator
|
|
495
|
+
โ โโโ types/ # TypeScript types
|
|
496
|
+
โ โโโ index.ts # Entry point
|
|
497
|
+
โโโ docs/ # Documentation
|
|
498
|
+
โโโ dist/ # Compiled output
|
|
499
|
+
โโโ package.json
|
|
500
|
+
```
|
|
501
|
+
|
|
502
|
+
## ๐งช Development
|
|
503
|
+
|
|
504
|
+
```bash
|
|
505
|
+
# Install dependencies
|
|
506
|
+
bun install
|
|
507
|
+
|
|
508
|
+
# Development mode with auto-reload
|
|
509
|
+
bun run dev
|
|
510
|
+
|
|
511
|
+
# Build for production
|
|
512
|
+
bun run build
|
|
513
|
+
|
|
514
|
+
# Run tests
|
|
515
|
+
bun test
|
|
516
|
+
|
|
517
|
+
# Lint code
|
|
518
|
+
bun run lint
|
|
519
|
+
|
|
520
|
+
# Format code
|
|
521
|
+
bun run format
|
|
522
|
+
|
|
523
|
+
# Type check
|
|
524
|
+
bun run typecheck
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
## ๐ค Contributing
|
|
528
|
+
|
|
529
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
530
|
+
|
|
531
|
+
1. Fork the repository
|
|
532
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
533
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
534
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
535
|
+
5. Open a Pull Request
|
|
536
|
+
|
|
537
|
+
## ๐ License
|
|
538
|
+
|
|
539
|
+
MIT License - see the [LICENSE](LICENSE) file for details.
|
|
540
|
+
|
|
541
|
+
## ๐ Acknowledgments
|
|
542
|
+
|
|
543
|
+
- Inspired by [Mole](https://github.com/tw93/Mole) by [Tw93](https://github.com/tw93)
|
|
544
|
+
- Built with modern TypeScript and Node.js ecosystem
|
|
545
|
+
|
|
546
|
+
## ๐ Links
|
|
547
|
+
|
|
548
|
+
- [GitHub Repository](https://github.com/tukuyomil032/broom)
|
|
549
|
+
- [Issue Tracker](https://github.com/tukuyomil032/issues)
|
|
550
|
+
- [Documentation](docs/README.md)
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
Made with โค๏ธ by the Broom team
|