devkill 0.12.2

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.
Files changed (274) hide show
  1. package/LICENSE +21 -0
  2. package/README.es.md +253 -0
  3. package/README.id.md +238 -0
  4. package/README.md +377 -0
  5. package/README.pt.md +241 -0
  6. package/README.tr.md +242 -0
  7. package/lib/cli/cli.controller.d.ts +81 -0
  8. package/lib/cli/cli.controller.js +760 -0
  9. package/lib/cli/cli.controller.js.map +1 -0
  10. package/lib/cli/interfaces/cli-options.interface.d.ts +5 -0
  11. package/lib/cli/interfaces/cli-options.interface.js +2 -0
  12. package/lib/cli/interfaces/cli-options.interface.js.map +1 -0
  13. package/lib/cli/interfaces/command-keys.interface.d.ts +17 -0
  14. package/lib/cli/interfaces/command-keys.interface.js +2 -0
  15. package/lib/cli/interfaces/command-keys.interface.js.map +1 -0
  16. package/lib/cli/interfaces/config.interface.d.ts +17 -0
  17. package/lib/cli/interfaces/config.interface.js +2 -0
  18. package/lib/cli/interfaces/config.interface.js.map +1 -0
  19. package/lib/cli/interfaces/index.d.ts +11 -0
  20. package/lib/cli/interfaces/index.js +12 -0
  21. package/lib/cli/interfaces/index.js.map +1 -0
  22. package/lib/cli/interfaces/json-output.interface.d.ts +30 -0
  23. package/lib/cli/interfaces/json-output.interface.js +2 -0
  24. package/lib/cli/interfaces/json-output.interface.js.map +1 -0
  25. package/lib/cli/interfaces/key-press.interface.d.ts +7 -0
  26. package/lib/cli/interfaces/key-press.interface.js +2 -0
  27. package/lib/cli/interfaces/key-press.interface.js.map +1 -0
  28. package/lib/cli/interfaces/node-version.interface.d.ts +5 -0
  29. package/lib/cli/interfaces/node-version.interface.js +2 -0
  30. package/lib/cli/interfaces/node-version.interface.js.map +1 -0
  31. package/lib/cli/interfaces/stats.interface.d.ts +15 -0
  32. package/lib/cli/interfaces/stats.interface.js +2 -0
  33. package/lib/cli/interfaces/stats.interface.js.map +1 -0
  34. package/lib/cli/interfaces/ui-positions.interface.d.ts +5 -0
  35. package/lib/cli/interfaces/ui-positions.interface.js +2 -0
  36. package/lib/cli/interfaces/ui-positions.interface.js.map +1 -0
  37. package/lib/cli/interfaces/version.interface.d.ts +5 -0
  38. package/lib/cli/interfaces/version.interface.js +2 -0
  39. package/lib/cli/interfaces/version.interface.js.map +1 -0
  40. package/lib/cli/models/start-parameters.model.d.ts +7 -0
  41. package/lib/cli/models/start-parameters.model.js +25 -0
  42. package/lib/cli/models/start-parameters.model.js.map +1 -0
  43. package/lib/cli/services/console.service.d.ts +23 -0
  44. package/lib/cli/services/console.service.js +87 -0
  45. package/lib/cli/services/console.service.js.map +1 -0
  46. package/lib/cli/services/https.service.d.ts +4 -0
  47. package/lib/cli/services/https.service.js +32 -0
  48. package/lib/cli/services/https.service.js.map +1 -0
  49. package/lib/cli/services/index.d.ts +7 -0
  50. package/lib/cli/services/index.js +8 -0
  51. package/lib/cli/services/index.js.map +1 -0
  52. package/lib/cli/services/json-output.service.d.ts +20 -0
  53. package/lib/cli/services/json-output.service.js +101 -0
  54. package/lib/cli/services/json-output.service.js.map +1 -0
  55. package/lib/cli/services/results.service.d.ts +13 -0
  56. package/lib/cli/services/results.service.js +61 -0
  57. package/lib/cli/services/results.service.js.map +1 -0
  58. package/lib/cli/services/scan.service.d.ts +13 -0
  59. package/lib/cli/services/scan.service.js +79 -0
  60. package/lib/cli/services/scan.service.js.map +1 -0
  61. package/lib/cli/services/spinner.service.d.ts +9 -0
  62. package/lib/cli/services/spinner.service.js +27 -0
  63. package/lib/cli/services/spinner.service.js.map +1 -0
  64. package/lib/cli/services/ui.service.d.ts +17 -0
  65. package/lib/cli/services/ui.service.js +59 -0
  66. package/lib/cli/services/ui.service.js.map +1 -0
  67. package/lib/cli/services/update.service.d.ts +15 -0
  68. package/lib/cli/services/update.service.js +37 -0
  69. package/lib/cli/services/update.service.js.map +1 -0
  70. package/lib/cli/ui/base.ui.d.ts +28 -0
  71. package/lib/cli/ui/base.ui.js +49 -0
  72. package/lib/cli/ui/base.ui.js.map +1 -0
  73. package/lib/cli/ui/components/general.ui.d.ts +7 -0
  74. package/lib/cli/ui/components/general.ui.js +13 -0
  75. package/lib/cli/ui/components/general.ui.js.map +1 -0
  76. package/lib/cli/ui/components/header/header-ui.constants.d.ts +7 -0
  77. package/lib/cli/ui/components/header/header-ui.constants.js +7 -0
  78. package/lib/cli/ui/components/header/header-ui.constants.js.map +1 -0
  79. package/lib/cli/ui/components/header/header.ui.d.ts +18 -0
  80. package/lib/cli/ui/components/header/header.ui.js +96 -0
  81. package/lib/cli/ui/components/header/header.ui.js.map +1 -0
  82. package/lib/cli/ui/components/header/stats.ui.d.ts +25 -0
  83. package/lib/cli/ui/components/header/stats.ui.js +198 -0
  84. package/lib/cli/ui/components/header/stats.ui.js.map +1 -0
  85. package/lib/cli/ui/components/header/status.ui.d.ts +33 -0
  86. package/lib/cli/ui/components/header/status.ui.js +188 -0
  87. package/lib/cli/ui/components/header/status.ui.js.map +1 -0
  88. package/lib/cli/ui/components/help/help-command.ui.d.ts +9 -0
  89. package/lib/cli/ui/components/help/help-command.ui.js +61 -0
  90. package/lib/cli/ui/components/help/help-command.ui.js.map +1 -0
  91. package/lib/cli/ui/components/help/help.constants.d.ts +8 -0
  92. package/lib/cli/ui/components/help/help.constants.js +270 -0
  93. package/lib/cli/ui/components/help/help.constants.js.map +1 -0
  94. package/lib/cli/ui/components/help/help.ui.d.ts +30 -0
  95. package/lib/cli/ui/components/help/help.ui.js +176 -0
  96. package/lib/cli/ui/components/help/help.ui.js.map +1 -0
  97. package/lib/cli/ui/components/logs.ui.d.ts +24 -0
  98. package/lib/cli/ui/components/logs.ui.js +132 -0
  99. package/lib/cli/ui/components/logs.ui.js.map +1 -0
  100. package/lib/cli/ui/components/options.ui.d.ts +29 -0
  101. package/lib/cli/ui/components/options.ui.js +327 -0
  102. package/lib/cli/ui/components/options.ui.js.map +1 -0
  103. package/lib/cli/ui/components/profile-picker.ui.d.ts +25 -0
  104. package/lib/cli/ui/components/profile-picker.ui.js +117 -0
  105. package/lib/cli/ui/components/profile-picker.ui.js.map +1 -0
  106. package/lib/cli/ui/components/result-details.ui.d.ts +23 -0
  107. package/lib/cli/ui/components/result-details.ui.js +182 -0
  108. package/lib/cli/ui/components/result-details.ui.js.map +1 -0
  109. package/lib/cli/ui/components/results.ui.d.ts +86 -0
  110. package/lib/cli/ui/components/results.ui.js +620 -0
  111. package/lib/cli/ui/components/results.ui.js.map +1 -0
  112. package/lib/cli/ui/components/warning.ui.d.ts +12 -0
  113. package/lib/cli/ui/components/warning.ui.js +30 -0
  114. package/lib/cli/ui/components/warning.ui.js.map +1 -0
  115. package/lib/cli/ui/heavy.ui.d.ts +18 -0
  116. package/lib/cli/ui/heavy.ui.js +37 -0
  117. package/lib/cli/ui/heavy.ui.js.map +1 -0
  118. package/lib/cli/ui/index.d.ts +14 -0
  119. package/lib/cli/ui/index.js +15 -0
  120. package/lib/cli/ui/index.js.map +1 -0
  121. package/lib/constants/cli.constants.d.ts +14 -0
  122. package/lib/constants/cli.constants.js +138 -0
  123. package/lib/constants/cli.constants.js.map +1 -0
  124. package/lib/constants/index.d.ts +8 -0
  125. package/lib/constants/index.js +9 -0
  126. package/lib/constants/index.js.map +1 -0
  127. package/lib/constants/main.constants.d.ts +96 -0
  128. package/lib/constants/main.constants.js +79 -0
  129. package/lib/constants/main.constants.js.map +1 -0
  130. package/lib/constants/messages.constants.d.ts +31 -0
  131. package/lib/constants/messages.constants.js +37 -0
  132. package/lib/constants/messages.constants.js.map +1 -0
  133. package/lib/constants/options.constants.d.ts +6 -0
  134. package/lib/constants/options.constants.js +8 -0
  135. package/lib/constants/options.constants.js.map +1 -0
  136. package/lib/constants/os-service-map.constants.d.ts +10 -0
  137. package/lib/constants/os-service-map.constants.js +11 -0
  138. package/lib/constants/os-service-map.constants.js.map +1 -0
  139. package/lib/constants/result-descriptions.constants.d.ts +142 -0
  140. package/lib/constants/result-descriptions.constants.js +203 -0
  141. package/lib/constants/result-descriptions.constants.js.map +1 -0
  142. package/lib/constants/sort.result.d.ts +6 -0
  143. package/lib/constants/sort.result.js +22 -0
  144. package/lib/constants/sort.result.js.map +1 -0
  145. package/lib/constants/spinner.constants.d.ts +5 -0
  146. package/lib/constants/spinner.constants.js +88 -0
  147. package/lib/constants/spinner.constants.js.map +1 -0
  148. package/lib/constants/status.constants.d.ts +7 -0
  149. package/lib/constants/status.constants.js +9 -0
  150. package/lib/constants/status.constants.js.map +1 -0
  151. package/lib/constants/update.constants.d.ts +2 -0
  152. package/lib/constants/update.constants.js +3 -0
  153. package/lib/constants/update.constants.js.map +1 -0
  154. package/lib/constants/workers.constants.d.ts +14 -0
  155. package/lib/constants/workers.constants.js +16 -0
  156. package/lib/constants/workers.constants.js.map +1 -0
  157. package/lib/core/constants/global-ignored.constants.d.ts +1 -0
  158. package/lib/core/constants/global-ignored.constants.js +44 -0
  159. package/lib/core/constants/global-ignored.constants.js.map +1 -0
  160. package/lib/core/constants/index.d.ts +1 -0
  161. package/lib/core/constants/index.js +2 -0
  162. package/lib/core/constants/index.js.map +1 -0
  163. package/lib/core/constants/profiles.constants.d.ts +8 -0
  164. package/lib/core/constants/profiles.constants.js +138 -0
  165. package/lib/core/constants/profiles.constants.js.map +1 -0
  166. package/lib/core/devkill.d.ts +25 -0
  167. package/lib/core/devkill.js +129 -0
  168. package/lib/core/devkill.js.map +1 -0
  169. package/lib/core/index.d.ts +4 -0
  170. package/lib/core/index.js +5 -0
  171. package/lib/core/index.js.map +1 -0
  172. package/lib/core/interfaces/devkill.interface.d.ts +78 -0
  173. package/lib/core/interfaces/devkill.interface.js +2 -0
  174. package/lib/core/interfaces/devkill.interface.js.map +1 -0
  175. package/lib/core/interfaces/devkillrc-config.interface.d.ts +87 -0
  176. package/lib/core/interfaces/devkillrc-config.interface.js +12 -0
  177. package/lib/core/interfaces/devkillrc-config.interface.js.map +1 -0
  178. package/lib/core/interfaces/file-service.interface.d.ts +76 -0
  179. package/lib/core/interfaces/file-service.interface.js +2 -0
  180. package/lib/core/interfaces/file-service.interface.js.map +1 -0
  181. package/lib/core/interfaces/folder.interface.d.ts +89 -0
  182. package/lib/core/interfaces/folder.interface.js +2 -0
  183. package/lib/core/interfaces/folder.interface.js.map +1 -0
  184. package/lib/core/interfaces/index.d.ts +6 -0
  185. package/lib/core/interfaces/index.js +7 -0
  186. package/lib/core/interfaces/index.js.map +1 -0
  187. package/lib/core/interfaces/logger-service.interface.d.ts +59 -0
  188. package/lib/core/interfaces/logger-service.interface.js +2 -0
  189. package/lib/core/interfaces/logger-service.interface.js.map +1 -0
  190. package/lib/core/interfaces/npkill.interface.d.ts +78 -0
  191. package/lib/core/interfaces/npkill.interface.js +2 -0
  192. package/lib/core/interfaces/npkill.interface.js.map +1 -0
  193. package/lib/core/interfaces/npkillrc-config.interface.d.ts +87 -0
  194. package/lib/core/interfaces/npkillrc-config.interface.js +12 -0
  195. package/lib/core/interfaces/npkillrc-config.interface.js.map +1 -0
  196. package/lib/core/interfaces/profile.interface.d.ts +9 -0
  197. package/lib/core/interfaces/profile.interface.js +2 -0
  198. package/lib/core/interfaces/profile.interface.js.map +1 -0
  199. package/lib/core/interfaces/search-status.model.d.ts +35 -0
  200. package/lib/core/interfaces/search-status.model.js +48 -0
  201. package/lib/core/interfaces/search-status.model.js.map +1 -0
  202. package/lib/core/interfaces/services.interface.d.ts +26 -0
  203. package/lib/core/interfaces/services.interface.js +2 -0
  204. package/lib/core/interfaces/services.interface.js.map +1 -0
  205. package/lib/core/npkill.d.ts +25 -0
  206. package/lib/core/npkill.js +129 -0
  207. package/lib/core/npkill.js.map +1 -0
  208. package/lib/core/services/config/config-merger.d.ts +17 -0
  209. package/lib/core/services/config/config-merger.js +57 -0
  210. package/lib/core/services/config/config-merger.js.map +1 -0
  211. package/lib/core/services/config/config-validator.d.ts +3 -0
  212. package/lib/core/services/config/config-validator.js +43 -0
  213. package/lib/core/services/config/config-validator.js.map +1 -0
  214. package/lib/core/services/config/index.d.ts +4 -0
  215. package/lib/core/services/config/index.js +5 -0
  216. package/lib/core/services/config/index.js.map +1 -0
  217. package/lib/core/services/config/profile-validator.d.ts +6 -0
  218. package/lib/core/services/config/profile-validator.js +68 -0
  219. package/lib/core/services/config/profile-validator.js.map +1 -0
  220. package/lib/core/services/config/property-validators.d.ts +33 -0
  221. package/lib/core/services/config/property-validators.js +125 -0
  222. package/lib/core/services/config/property-validators.js.map +1 -0
  223. package/lib/core/services/config.service.d.ts +37 -0
  224. package/lib/core/services/config.service.js +100 -0
  225. package/lib/core/services/config.service.js.map +1 -0
  226. package/lib/core/services/files/files.service.d.ts +28 -0
  227. package/lib/core/services/files/files.service.js +207 -0
  228. package/lib/core/services/files/files.service.js.map +1 -0
  229. package/lib/core/services/files/files.worker.d.ts +1 -0
  230. package/lib/core/services/files/files.worker.js +286 -0
  231. package/lib/core/services/files/files.worker.js.map +1 -0
  232. package/lib/core/services/files/files.worker.service.d.ts +90 -0
  233. package/lib/core/services/files/files.worker.service.js +216 -0
  234. package/lib/core/services/files/files.worker.service.js.map +1 -0
  235. package/lib/core/services/files/index.d.ts +4 -0
  236. package/lib/core/services/files/index.js +5 -0
  237. package/lib/core/services/files/index.js.map +1 -0
  238. package/lib/core/services/files/unix-files.service.d.ts +9 -0
  239. package/lib/core/services/files/unix-files.service.js +28 -0
  240. package/lib/core/services/files/unix-files.service.js.map +1 -0
  241. package/lib/core/services/files/windows-files.service.d.ts +9 -0
  242. package/lib/core/services/files/windows-files.service.js +16 -0
  243. package/lib/core/services/files/windows-files.service.js.map +1 -0
  244. package/lib/core/services/index.d.ts +5 -0
  245. package/lib/core/services/index.js +6 -0
  246. package/lib/core/services/index.js.map +1 -0
  247. package/lib/core/services/logger.service.d.ts +22 -0
  248. package/lib/core/services/logger.service.js +84 -0
  249. package/lib/core/services/logger.service.js.map +1 -0
  250. package/lib/core/services/profiles.service.d.ts +54 -0
  251. package/lib/core/services/profiles.service.js +86 -0
  252. package/lib/core/services/profiles.service.js.map +1 -0
  253. package/lib/core/services/stream.service.d.ts +12 -0
  254. package/lib/core/services/stream.service.js +39 -0
  255. package/lib/core/services/stream.service.js.map +1 -0
  256. package/lib/dirname.d.ts +2 -0
  257. package/lib/dirname.js +6 -0
  258. package/lib/dirname.js.map +1 -0
  259. package/lib/index.d.ts +2 -0
  260. package/lib/index.js +11 -0
  261. package/lib/index.js.map +1 -0
  262. package/lib/main.d.ts +2 -0
  263. package/lib/main.js +19 -0
  264. package/lib/main.js.map +1 -0
  265. package/lib/utils/get-file-content.d.ts +1 -0
  266. package/lib/utils/get-file-content.js +6 -0
  267. package/lib/utils/get-file-content.js.map +1 -0
  268. package/lib/utils/is-safe-to-delete.d.ts +1 -0
  269. package/lib/utils/is-safe-to-delete.js +9 -0
  270. package/lib/utils/is-safe-to-delete.js.map +1 -0
  271. package/lib/utils/unit-conversions.d.ts +11 -0
  272. package/lib/utils/unit-conversions.js +54 -0
  273. package/lib/utils/unit-conversions.js.map +1 -0
  274. package/package.json +96 -0
package/README.md ADDED
@@ -0,0 +1,377 @@
1
+ <p align="center">
2
+ <img src="./docs/npkill-text-clean.svg" width="380" alt="devkill logo" />
3
+ </p>
4
+ <p align="center">
5
+ <img alt="npm" src="https://img.shields.io/npm/dy/devkill.svg">
6
+ <a href="#donations"><img src="https://img.shields.io/badge/donate-<3-red" alt="Donations Badge"/></a>
7
+ <img alt="npm version" src="https://img.shields.io/npm/v/devkill.svg">
8
+ <img alt="NPM" src="https://img.shields.io/npm/l/devkill.svg">
9
+ </p>
10
+
11
+ ### Find and **clean** junk directories across multiple languages :sparkles:
12
+
13
+ <p align="center">
14
+ <img src="/docs/npkill-demo-0.10.0.gif" alt="devkill demo GIF" />
15
+ </p>
16
+
17
+ Devkill lets you scan your system for directories that are safe to delete — `node_modules`, Python virtual environments, Rust build targets, Unity caches, and more. Choose a language profile, browse results, and reclaim disk space. Yay!
18
+
19
+ ## i18n
20
+
21
+ We're making an effort to internationalize the Devkill docs. Here's a list of the available translations:
22
+
23
+ - [Español](./README.es.md)
24
+ - [Indonesian](./README.id.md)
25
+ - [Português](./README.pt.md)
26
+ - [Turkish](./README.tr.md)
27
+
28
+ ## Table of Contents
29
+
30
+ - [Features](#features)
31
+ - [Installation](#installation)
32
+ - [Usage](#usage)
33
+ - [Profiles](#profiles)
34
+ - [Search Mode](#search-mode)
35
+ - [Multi-Select Mode](#multi-select-mode)
36
+ - [Options](#options)
37
+ - [Examples](#examples)
38
+ - [JSON Output](#json-output)
39
+ - [Set Up Locally](#setup-locally)
40
+ - [API](#API)
41
+ - [Roadmap](#roadmap)
42
+ - [Known bugs](#known-bugs)
43
+ - [Contributing](#contributing)
44
+ - [Buy us a coffee](#donations)
45
+ - [License](#license)
46
+
47
+ <a name="features"></a>
48
+
49
+ # :heavy_check_mark: Features
50
+
51
+ - **Multi-language cleanup:** Profiles for Node.js, Python, Rust, Java, C++, Unity, Unreal, Godot, and more — each with curated lists of safe-to-delete directories.
52
+
53
+ - **Interactive profile picker:** On launch, choose which language ecosystems to scan. Mix and match profiles as needed.
54
+
55
+ - **Last Workspace Usage**: Check when was the last time you modified a file in the workspace (indicated in the **last_mod** column).
56
+
57
+ - **Very fast:** Devkill is written in TypeScript, but searches are performed at a low level, improving performance greatly.
58
+
59
+ - **Easy to use:** Say goodbye to lengthy commands. Using devkill is as simple as picking a profile, reading a list of directories, and pressing Del to get rid of them.
60
+
61
+ - **Minified:** It barely has any dependencies.
62
+
63
+ <a name="installation"></a>
64
+
65
+ # :cloud: Installation
66
+
67
+ You don't really need to install it to use it!
68
+ Simply use the following command:
69
+
70
+ ```bash
71
+ $ npx devkill
72
+ ```
73
+
74
+ Or if for some reason you really want to install it:
75
+
76
+ ```bash
77
+ $ npm i -g devkill
78
+ # Unix users may need to run the command with sudo. Go carefully
79
+ ```
80
+
81
+ > Devkill requires node>=18.18.0.
82
+
83
+ <a name="usage"></a>
84
+
85
+ # :clipboard: Usage
86
+
87
+ ```bash
88
+ $ npx devkill
89
+ # or just devkill if installed globally
90
+ ```
91
+
92
+ On startup, devkill shows a profile picker where you can choose which language ecosystems to scan (Node.js, Python, Rust, etc.). Press <kbd>Space</kbd> to toggle profiles, <kbd>Enter</kbd> to start scanning, or <kbd>Esc</kbd> to skip and use the default (`node`).
93
+
94
+ Move between the listed folders with <kbd>↓</kbd> <kbd>↑</kbd>, and use <kbd>Space</kbd> or <kbd>Del</kbd> to delete the selected folder.
95
+ You can also use <kbd>j</kbd> and <kbd>k</kbd> to move between the results.
96
+
97
+ You can open the directory where the selected result is placed by pressing <kbd>o</kbd>.
98
+
99
+ To exit, <kbd>Q</kbd> or <kbd>Ctrl</kbd> + <kbd>c</kbd>.
100
+
101
+ **Important!** Some applications installed on the system need their directories to work and deleting them may break them. Devkill will highlight them by displaying a :warning: to be careful.
102
+
103
+ <a name="profiles"></a>
104
+
105
+ ## Profiles
106
+
107
+ Profiles are named presets of directories to scan for a given language ecosystem. Devkill ships with built-in profiles:
108
+
109
+ | Profile | Key targets |
110
+ | ------- | ----------- |
111
+ | `node` _(default)_ | `node_modules`, `.next`, `.nuxt`, `.cache`, `coverage`, ... |
112
+ | `python` | `__pycache__`, `.venv`, `venv`, `.pytest_cache`, ... |
113
+ | `data-science` | `.ipynb_checkpoints`, `.mlruns`, `.dvc`, ... |
114
+ | `java` | `target`, `.gradle`, `out` |
115
+ | `rust` | `target` |
116
+ | `swift` | `DerivedData`, `.swiftpm` |
117
+ | `dotnet` | `obj`, `TestResults`, `.vs` |
118
+ | `ruby` | `.bundle` |
119
+ | `elixir` | `_build`, `deps`, `cover` |
120
+ | `haskell` | `dist-newstyle`, `.stack-work` |
121
+ | `scala` | `.bloop`, `.metals`, `target` |
122
+ | `cpp` | `CMakeFiles`, `cmake-build-debug`, `cmake-build-release` |
123
+ | `unity` | `Library`, `Temp`, `Obj` |
124
+ | `unreal` | `Intermediate`, `DerivedDataCache`, `Binaries` |
125
+ | `godot` | `.import`, `.godot` |
126
+ | `android` | `.cxx`, `externalNativeBuild` |
127
+ | `infra` | `.serverless`, `.terraform`, `.vercel`, `.netlify`, ... |
128
+ | `all` | Every target from all profiles above |
129
+
130
+ Use `-p` / `--profiles` to specify profiles directly without the picker:
131
+
132
+ ```bash
133
+ devkill --profiles node,python,rust
134
+ ```
135
+
136
+ See [Profiles Documentation](./docs/profiles.md) for the full target list per profile.
137
+
138
+ <a name="search-mode"></a>
139
+
140
+ ## Search Mode
141
+
142
+ Search mode allows you to filter results. This can be particularly useful for limiting the view to a specific route or ensuring that only those results that meet the specified condition are "selected all."
143
+
144
+ For example, you can use this expression to limit the results to those that are in the `work` directory and that include `data` somewhere in the path: `/work/.*/data`.
145
+
146
+ Press <kbd>/</kbd> to enter search mode. You can type a regex pattern to filter results.
147
+
148
+ Press <kbd>Enter</kbd> to confirm the search and navigate the filtered results, or <kbd>Esc</kbd> to clear and exit.
149
+
150
+ To exit from this mode, leave empty.
151
+
152
+ ## Multi-Select Mode
153
+
154
+ This mode allows you to select and delete multiple folders at once, making it more efficient when cleaning up many directories.
155
+
156
+ ### Entering Multi-Select Mode
157
+
158
+ Press <kbd>T</kbd> to toggle multi-select mode. When active, you'll see a selection counter and additional instructions at the top of the results.
159
+
160
+ ### Controls
161
+
162
+ - **<kbd>Space</kbd>**: Toggle selection of the current folder.
163
+ - **<kbd>V</kbd>**: Start/end range selection mode.
164
+ - **<kbd>A</kbd>**: Toggle select/unselect all folders.
165
+ - **<kbd>Enter</kbd>**: Delete all selected folders.
166
+ - **<kbd>T</kbd>**: Unselect all and back to normal mode.
167
+
168
+ ### Range Selection
169
+
170
+ After pressing <kbd>V</kbd> to enter range selection mode:
171
+
172
+ - Move the cursor with arrow keys, <kbd>j</kbd>/<kbd>k</kbd>, <kbd>Home</kbd>/<kbd>End</kbd>, or page up/down
173
+ - All folders between the starting position and current cursor position will be selected/deselected
174
+ - Press <kbd>V</kbd> again to exit range selection mode
175
+
176
+ <a name="options"></a>
177
+
178
+ ## Options
179
+
180
+ | ARGUMENT | DESCRIPTION |
181
+ | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
182
+ | -p, --profiles | Allows you to select the [profile](./docs/profiles.md) (set of targets) to use. If no option is specified, the available ones will be listed _(**node** by default)_. |
183
+ | --config | Path to a custom .devkillrc configuration file. By default, devkill looks first for `./.devkillrc` and then for `~/.devkillrc`. |
184
+ | -d, --directory | Set the directory from which to begin searching. By default, starting-point is . |
185
+ | -D, --delete-all | Automatically delete all folders that are found. Suggested to be used together with `-x`. |
186
+ | -e, --hide-errors | Hide errors if any |
187
+ | -E, --exclude | Exclude directories from search (directory list must be inside double quotes "", each directory separated by ',' ) Example: "ignore1, ignore2" |
188
+ | -f, --full | Start searching from the home of the user (example: "/home/user" in linux) |
189
+ | --size-unit | Set the unit for displaying folder sizes. _(Available: **auto**, mb, gb)_. With auto, sizes < 1024MB are shown in MB (rounded), larger sizes in GB (with decimals). |
190
+ | -h, --help, ? | Show help page |
191
+ | -nu, --no-check-update | Don't check for updates on startup |
192
+ | -s, --sort | Sort results by: `size`, `path` or `age` |
193
+ | -t, --targets | Disable profiles feature and specify the name of the directories you want to search for. You can define multiple targets separating with comma. Ej. `-t node_modules,.cache`. |
194
+ | -x, --exclude-sensitive | Exclude sensitive directories. |
195
+ | -y | Avoid displaying a warning when executing --delete-all. |
196
+ | --dry-run | It does not delete anything (will simulate it with a random delay). |
197
+ | --json | Output results in JSON format at the end of the scan. Useful for automation and scripting. |
198
+ | --json-stream | Output results in streaming JSON format (one JSON object per line as results are found). Useful for real-time processing. |
199
+ | -v, --version | Show devkill version |
200
+
201
+ <a name="examples"></a>
202
+
203
+ ## Examples
204
+
205
+ - Search **node_modules** directories in your _projects_ directory:
206
+
207
+ ```bash
208
+ devkill -d ~/projects
209
+
210
+ # other alternative:
211
+ cd ~/projects
212
+ devkill
213
+ ```
214
+
215
+ - Scan for both Node.js and Python junk in your projects:
216
+
217
+ ```bash
218
+ devkill -d ~/projects --profiles node,python
219
+ ```
220
+
221
+ - List **node_modules** in your _projects_ directory, excluding the ones in _progress_ and _ignore-this_ directories:
222
+
223
+ ```bash
224
+ devkill -d 'projects' --exclude "progress, ignore-this"
225
+ ```
226
+
227
+ - Automatically delete all node_modules that have sneaked into your backups:
228
+
229
+ ```bash
230
+ devkill -d ~/backups/ --delete-all
231
+ ```
232
+
233
+ - Get results in JSON format for automation or further processing:
234
+
235
+ ```bash
236
+ devkill --json > results.json
237
+ ```
238
+
239
+ - Stream results in real-time as JSON (useful for monitoring or piping to other tools):
240
+
241
+ ```bash
242
+ devkill --json-stream | jq '.'
243
+ ```
244
+
245
+ - Save only successful results to a file, ignoring errors:
246
+
247
+ ```bash
248
+ devkill --json-stream 2>/dev/null | jq -s '.' > clean-results.json
249
+ ```
250
+
251
+ <a name="json-output"></a>
252
+
253
+ ## JSON Output
254
+
255
+ Devkill supports JSON output formats for automation and integration with other tools:
256
+
257
+ - **`--json`**: Output all results as a single JSON object at the end of the scan
258
+ - **`--json-stream`**: Output each result as a separate JSON object in real-time
259
+
260
+ For detailed documentation, examples, and TypeScript interfaces, see [JSON Output Documentation](./docs/json-output.md).
261
+
262
+ **Quick Examples:**
263
+
264
+ ```bash
265
+ # Get all results as JSON
266
+ devkill --json > results.json
267
+
268
+ # Process results in real-time
269
+ devkill --json-stream | jq '.result.path'
270
+
271
+ # Find directories larger than 100MB
272
+ devkill --json | jq '.results[] | select(.size > 104857600)'
273
+ ```
274
+
275
+ <a name="setup-locally"></a>
276
+
277
+ # :pager: Set Up Locally
278
+
279
+ ```bash
280
+ # -- First, clone the repository
281
+ git clone https://github.com/zaldih/npkill.git
282
+
283
+ # -- Navigate to the dir
284
+ cd npkill
285
+
286
+ # -- Install dependencies
287
+ npm install
288
+
289
+ # -- And run!
290
+ npm run start
291
+
292
+
293
+ # -- If you want to run it with some parameter, you will have to add "--" as in the following example:
294
+ npm run start -- -f -e
295
+ ```
296
+
297
+ <a name="API"></a>
298
+
299
+ # :bookmark_tabs: API
300
+
301
+ The API allows you to interact with devkill from Node.js to create your own implementations in your scripts (automations, for example).
302
+
303
+ You can check the basic API [here](./API.md).
304
+
305
+ <a name="roadmap"></a>
306
+
307
+ # :crystal_ball: Roadmap
308
+
309
+ - [x] Release 0.1.0 !
310
+ - [x] Improve code
311
+ - [x] Improve performance
312
+ - [ ] Improve performance even more!
313
+ - [x] Sort results by size and path
314
+ - [x] Allow the search for other types of directories (targets)
315
+ - [x] Multi-language profiles (node, python, rust, java, etc.)
316
+ - [x] Interactive profile picker on startup
317
+ - [ ] Reduce dependencies to be a more minimalist module
318
+ - [ ] Allow to filter by directories that have not been used in a period of time
319
+ - [ ] Create option for displaying directories in tree format
320
+ - [x] Add some menus
321
+ - [x] Add log service
322
+ - [ ] Periodic and automatic cleaning (?)
323
+
324
+ <a name="known-bugs"></a>
325
+
326
+ # :bug: Known bugs :bug:
327
+
328
+ - Sometimes, CLI is blocked while folder is deleting.
329
+ - Sorting, especially by routes, can slow down the terminal when there are many results at the same time.
330
+ - Sometimes, size calculations are higher than they should be.
331
+ - (SOLVED) Performance issues when searching from high level directories (like / in linux).
332
+ - (SOLVED) Sometimes text collapses when updating the cli.
333
+ - (SOLVED) Analyzing the size of the directories takes longer than it should.
334
+
335
+ > If you find any bugs, don't hesitate and open an issue :)
336
+
337
+ <a name="contributing"></a>
338
+
339
+ # :revolving_hearts: Contributing
340
+
341
+ If you want to contribute check the [CONTRIBUTING.md](.github/CONTRIBUTING.md)
342
+
343
+ <a name="donations"></a>
344
+
345
+ # :coffee: Buy us a coffee
346
+
347
+ <img align="right" width="300" src="https://npkill.js.org/img/cat-donation-cup.png">
348
+ We have developed devkill in our free time, because we are passionate about the programming sector.
349
+ Tomorrow we would like to dedicate ourselves to this, but first, we have a long way to go.
350
+
351
+ We will continue to do things anyway, but donations are one of the many ways to support what we do.
352
+
353
+ <span class="badge-opencollective"><a href="https://opencollective.com/npkill/contribute" title="Donate to this project using Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-green.svg" alt="Open Collective donate button" /></a></span>
354
+
355
+ ### Thanks!!
356
+
357
+ ## A huge thank you to our backers :heart:
358
+
359
+ <a href="https://opencollective.com/npkill#backers" target="_blank"><img width="535" src="https://opencollective.com/npkill/tiers/backer.svg?width=535"></a>
360
+
361
+ ---
362
+
363
+ ### Crypto alternative
364
+
365
+ - btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX
366
+ - bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk
367
+ - eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259
368
+
369
+ <a name="license"></a>
370
+
371
+ # :scroll: License
372
+
373
+ MIT © [Nya García Gallardo](https://github.com/NyaGarcia) and [Juan Torres Gómez](https://github.com/zaldih)
374
+
375
+ :cat::baby_chick:
376
+
377
+ ---
package/README.pt.md ADDED
@@ -0,0 +1,241 @@
1
+ <p align="center">
2
+ <img src="https://npkill.js.org/img/npkill-text-outlined.svg" width="320" alt="devkill logo" />
3
+ </p>
4
+ <p align="center">
5
+ <img alt="npm" src="https://img.shields.io/npm/dy/devkill.svg">
6
+ <a href="#donations"><img src="https://img.shields.io/badge/donate-<3-red" alt="Donations Badge"/></a>
7
+ <img alt="npm version" src="https://img.shields.io/npm/v/devkill.svg">
8
+ <img alt="NPM" src="https://img.shields.io/npm/l/devkill.svg">
9
+ </p>
10
+
11
+ ### Encontre e **remova** facilmente diretórios de build e cache antigos e pesados em múltiplas linguagens :sparkles:
12
+
13
+ <p align="center">
14
+ <img src="/docs/npkill-demo-0.10.0.gif" alt="devkill demo GIF" />
15
+ </p>
16
+
17
+ Esta ferramenta permite que você liste diretórios _node_modules_, ambientes virtuais Python, artefatos de build e muito mais no seu sistema, bem como o espaço que ocupam. Então você pode selecionar quais deles deseja apagar para liberar espaço. ¡Yay!
18
+
19
+ ## i18n
20
+
21
+ Estamos fazendo esforço para internacionalizar a documentação do Devkill. Aqui está uma lista das traduções disponíveis:
22
+
23
+ - [Español](./README.es.md)
24
+ - [Indonesian](./README.id.md)
25
+ - [Português](./README.pt.md)
26
+ - [Turkish](./README.tr.md)
27
+
28
+ ## Table of Contents
29
+
30
+ - [Funcionalidades](#features)
31
+ - [Instalação](#installation)
32
+ - [Utilização](#usage)
33
+ - [Opções](#options)
34
+ - [Exemplos](#examples)
35
+ - [Configurar localmente](#setup-locally)
36
+ - [Roteiro](#roadmap)
37
+ - [Problemas conhecidos](#known-bugs)
38
+ - [Contribuindo](#contributing)
39
+ - [Compre-nos um café](#donations)
40
+ - [Licença](#license)
41
+
42
+ <a name="features"></a>
43
+
44
+ # :heavy_check_mark: Funcionalidades
45
+
46
+ - **Limpeza multi-linguagem:** Perfis para Node.js, Python, Rust, Java, C++, Unity e mais — cada um com listas selecionadas de diretórios seguros para deletar.
47
+
48
+ - **Liberar espaço:** Livre-se dos antigos e empoeirados diretórios que ocupam espaço em sua máquina.
49
+
50
+ - **Último Uso do Espaço de Trabalho**: Verifique quando foi a última vez que você modificou um arquivo no espaço de trabalho (indicado na coluna **última_modificação**).
51
+
52
+ - **Muito rápido:** O Devkill é escrito em TypeScript, mas as pesquisas são realizadas em um nível baixo, melhorando muito o desempenho.
53
+
54
+ - **Fácil de usar:** Diga adeus aos comandos longos. Usar o devkill é tão simples quanto escolher um perfil, ler uma lista de diretórios e pressionar Delete para se livrar deles.
55
+
56
+ - **Minificado:** Ele mal possui dependências.
57
+
58
+ <a name="installation"></a>
59
+
60
+ # :cloud: Instalação
61
+
62
+ Você nem precisa instalá-lo para usar!
63
+ Basta usar o seguinte comando:
64
+
65
+ ```bash
66
+ $ npx devkill
67
+ ```
68
+
69
+ Ou, se por algum motivo você realmente deseja instalá-lo:
70
+
71
+ ```bash
72
+ $ npm i -g devkill
73
+ # Usuários do Unix podem precisar executar o comando com sudo. Tome cuidado.
74
+ ```
75
+
76
+ > O Devkill requer node>=18.18.0.
77
+
78
+ <a name="usage"></a>
79
+
80
+ # :clipboard: Utilização
81
+
82
+ ```bash
83
+ $ npx devkill
84
+ # ou apenas devkill se você instalou globalmente
85
+ ```
86
+
87
+ Por padrão, o devkill fará a varredura a partir do local onde o comando devkill é executado.
88
+
89
+ Para mover entre as pastas listadas, utilize as teclas <kbd>↓</kbd> e <kbd>↑</kbd>, e use <kbd>Space</kbd> ou <kbd>Del</kbd> para excluir a pasta selecionada.
90
+ Você também pode usar <kbd>j</kbd> e <kbd>k</kbd> para se mover entre os resultados.
91
+
92
+ Para abrir o diretório onde o resultado selecionado está localizado, pressione <kbd>o</kbd>.
93
+
94
+ Para sair, use <kbd>Q</kbd> ou <kbd>Ctrl</kbd> + <kbd>c</kbd>.
95
+
96
+ **Importante!** Algumas aplicações instaladas no sistema precisam dos seus diretórios para funcionar, e excluí-los pode quebrá-las. O Devkill irá destacá-los exibindo um :warning: para que você tenha cuidado.
97
+
98
+ <a name="options"></a>
99
+
100
+ ## Opções
101
+
102
+ | Comando | Descrição |
103
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
104
+ | -p, --profiles | Selecione o [perfil](./docs/profiles.md) (conjunto de alvos) a usar. Padrão: **node**. |
105
+ | --config | Caminho para um arquivo de configuração .devkillrc personalizado. |
106
+ | -d, --directory | Defina o diretório a partir do qual iniciar a pesquisa. Por padrão, o ponto de partida é . |
107
+ | -D, --delete-all | Exclui automaticamente todos os diretórios encontrados. Recomendado para usar junto com `-x` |
108
+ | -e, --hide-errors | Oculta erros |
109
+ | -E, --exclude | Excluir diretórios da pesquisa (a lista de diretórios deve estar entre aspas duplas "", com cada diretório separado por vírgula ','). Exemplo: "ignorar1, ignorar2" |
110
+ | -f, --full | Iniciar a pesquisa a partir do diretório pessoal do usuário (exemplo: "/home/user" no Linux) |
111
+ | --size-unit | Unidade para exibir tamanhos de pasta. _(Disponível: **auto**, mb, gb)_ |
112
+ | -h, --help, ? | Mostrar a página de ajuda e sair |
113
+ | -nu, --no-check-update | Não verificar atualizações na inicialização |
114
+ | -s, --sort | Ordenar resultados por: `size`, `path` ou `age` |
115
+ | -t, --targets | Desativa perfis e especifica nomes de diretório a buscar. Separe com vírgula. Ex. `-t node_modules,.cache`. |
116
+ | -x, --exclude-sensitive | Excluir diretórios sensíveis. |
117
+ | --dry-run | Não exclui nada (irá simular com um atraso aleatório). |
118
+ | --json | Gerar resultados em formato JSON no final do scan. |
119
+ | --json-stream | Gerar resultados em formato JSON em streaming (um objeto por linha). |
120
+ | -v, --version | Mostrar versão do devkill |
121
+
122
+ <a name="examples"></a>
123
+
124
+ ## Exemplos
125
+
126
+ - Busque pastas **node_modules** no seu diretório de projetos:
127
+
128
+ ```bash
129
+ devkill -d ~/projetos
130
+
131
+ # alternativa:
132
+ cd ~/projetos
133
+ devkill
134
+ ```
135
+
136
+ - Escanear Node.js e Python nos seus projetos:
137
+
138
+ ```bash
139
+ devkill -d ~/projetos --profiles node,python
140
+ ```
141
+
142
+ - Exclua automaticamente todos os diretórios que tenham entrado em seus backups:
143
+
144
+ ```bash
145
+ devkill -d ~/backups/ --delete-all
146
+ ```
147
+
148
+ <a name="setup-locally"></a>
149
+
150
+ # :pager: Configurar localmente
151
+
152
+ ```bash
153
+ # -- Primeiramente, clone o repositório
154
+ git clone https://github.com/zaldih/npkill.git
155
+
156
+ # -- Acesse a pasta
157
+ cd npkill
158
+
159
+ # -- Instale as dependências
160
+ npm install
161
+
162
+ # -- E rode!
163
+ npm run start
164
+
165
+
166
+ # -- Se você deseja executá-lo com algum parâmetro, você terá que adicionar "--" como no seguinte exemplo:
167
+ npm run start -- -f -e
168
+ ```
169
+
170
+ <a name="roadmap"></a>
171
+
172
+ # :crystal_ball: Roteiro
173
+
174
+ - [x] Lançamento 0.1.0 !
175
+ - [x] Melhorias de código
176
+ - [x] Melhorias de performance
177
+ - [ ] Ainda mais melhorias de performance!
178
+ - [x] Ordenação de resultados por tamanho e localização
179
+ - [x] Permitir a pesquisa por outros tipos de diretórios (alvo)
180
+ - [x] Perfis multi-linguagem (node, python, rust, java, etc.)
181
+ - [x] Seletor de perfil interativo na inicialização
182
+ - [ ] Reduzir as dependências para tornar o módulo mais minimalista
183
+ - [ ] Permitir filtrar por diretórios que não foram usados em um período de tempo
184
+ - [ ] Criar opção para mostrar as pastas em formato de árvore
185
+ - [x] Adicionar menus
186
+ - [x] Adicionar logs
187
+ - [ ] Limpeza automatizada periódica (?)
188
+
189
+ <a name="known-bugs"></a>
190
+
191
+ # :bug: Problemas conhecidos :bug:
192
+
193
+ - Às vezes, a CLI fica bloqueada enquanto a pasta está sendo excluída.
194
+ - A ordenação, especialmente por rotas, pode deixar o terminal mais lento quando há muitos resultados ao mesmo tempo.
195
+ - Às vezes, os cálculos de tamanho são maiores do que deveriam ser.
196
+ - (RESOLVIDO) Problemas de desempenho ao pesquisar em diretórios de alto nível (como / no Linux).
197
+ - (RESOLVIDO) Às vezes, o texto se desfaz ao atualizar a interface de linha de comando (CLI).
198
+ - (RESOLVIDO) A análise do tamanho dos diretórios leva mais tempo do que deveria.
199
+
200
+ > Se você encontrar algum erro, não hesite em abrir uma solicitação (via issue) :)
201
+
202
+ <a name="contributing"></a>
203
+
204
+ # :revolving_hearts: Contribuindo
205
+
206
+ Se você quer contribuir confira o [CONTRIBUTING.md](.github/CONTRIBUTING.md)
207
+
208
+ <a name="donations"></a>
209
+
210
+ # :coffee: Compre-nos um café
211
+
212
+ <img align="right" width="300" src="https://npkill.js.org/img/cat-donation-cup.png">
213
+ Desenvolvemos o devkill em nosso tempo livre, porque somos apaixonados pelo setor de programação. Amanhã, gostaríamos de nos dedicar mais a isso, mas antes, temos um longo caminho a percorrer.
214
+
215
+ Continuaremos a fazer as coisas de qualquer maneira, mas as doações são uma das muitas formas de apoiar o que fazemos.
216
+
217
+ <span class="badge-opencollective"><a href="https://opencollective.com/npkill/contribute" title="Faça uma doação para este projeto usando o Open Collective"><img src="https://img.shields.io/badge/open%20collective-donate-green.svg" alt="Open Collective donate button" /></a></span>
218
+
219
+ ### Obrigado!!
220
+
221
+ ## Um enorme agradecimento aos nossos apoiadores :heart:
222
+
223
+ <a href="https://opencollective.com/npkill#backers" target="_blank"><img width="535" src="https://opencollective.com/npkill/tiers/backer.svg?width=535"></a>
224
+
225
+ ---
226
+
227
+ ### via Crypto
228
+
229
+ - btc: 1ML2DihUoFTqhoQnrWy4WLxKbVYkUXpMAX
230
+ - bch: 1HVpaicQL5jWKkbChgPf6cvkH8nyktVnVk
231
+ - eth: 0x7668e86c8bdb52034606db5aa0d2d4d73a0d4259
232
+
233
+ <a name="license"></a>
234
+
235
+ # :scroll: Licença
236
+
237
+ MIT © [Nya García Gallardo](https://github.com/NyaGarcia) e [Juan Torres Gómez](https://github.com/zaldih)
238
+
239
+ :cat::baby_chick:
240
+
241
+ ---