binary-collections 2.0.12 → 2.0.13

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 (231) hide show
  1. package/binaries/binary-executor.cjs +89 -13
  2. package/binaries/clean-nodemodule.cjs +89 -13
  3. package/binaries/clean-nodemodules.cjs +89 -13
  4. package/binaries/dev.cjs +89 -13
  5. package/binaries/empty.cjs +89 -13
  6. package/binaries/git-reduce-size.cjs +89 -13
  7. package/binaries/javakill.cjs +89 -13
  8. package/binaries/kill-process.cjs +89 -13
  9. package/binaries/nodekill.cjs +89 -13
  10. package/binaries/prod.cjs +89 -13
  11. package/binaries/py.cjs +89 -13
  12. package/binaries/rmfind.cjs +89 -13
  13. package/binaries/rmx.cjs +89 -13
  14. package/binaries/submodule-token.cjs +89 -13
  15. package/binaries/test-cjs.cjs +89 -13
  16. package/binaries/test-esm.cjs +89 -13
  17. package/binaries/yarn-clean.cjs +89 -13
  18. package/binaries/yc +22 -1
  19. package/binaries/yc.cjs +89 -13
  20. package/binaries/ycw +256 -0
  21. package/binaries/ycw.cjs +254 -0
  22. package/docs-src/binary-collections.md +34 -0
  23. package/docs-src/changelog.md +26 -0
  24. package/docs-src/clean-github-actions-caches.md +115 -0
  25. package/docs-src/copy-move-file.md +59 -0
  26. package/docs-src/del-gradle.md +17 -0
  27. package/docs-src/del-ps.md +28 -0
  28. package/docs-src/downloader.md +62 -0
  29. package/docs-src/env-helpers.md +29 -0
  30. package/docs-src/find-node-modules.md +17 -0
  31. package/docs-src/free-chatgpt.md +26 -0
  32. package/docs-src/git-diff.md +33 -0
  33. package/docs-src/git-fix.md +34 -0
  34. package/docs-src/git-purge.md +17 -0
  35. package/docs-src/git-reduce-size.md +17 -0
  36. package/docs-src/git-undo.md +21 -0
  37. package/docs-src/kill-night-crows.md +26 -0
  38. package/docs-src/node-cache-cleaner.md +182 -0
  39. package/docs-src/node-executor.md +50 -0
  40. package/docs-src/node-package-packer.md +48 -0
  41. package/docs-src/npm-run-series.md +43 -0
  42. package/docs-src/package-resolutions-updater.md +22 -0
  43. package/docs-src/php-cs-fixer-staged.md +19 -0
  44. package/docs-src/print-directory-tree.md +35 -0
  45. package/docs-src/print-tarball-tree.md +55 -0
  46. package/docs-src/py.md +19 -0
  47. package/docs-src/remove-module.md +32 -0
  48. package/docs-src/rmfind-rmx.md +21 -0
  49. package/docs-src/rmpath.md +38 -0
  50. package/docs-src/run-by-checksum.md +87 -0
  51. package/docs-src/submodule-install.md +31 -0
  52. package/docs-src/submodule-remove.md +22 -0
  53. package/docs-src/submodule-token.md +17 -0
  54. package/docs-src/test-runners.md +21 -0
  55. package/docs-src/yarn-install.md +31 -0
  56. package/docs-src/yarn-reinstall.md +27 -0
  57. package/lib/binary-collections/config.cjs +1 -1
  58. package/lib/binary-collections/config.mjs +1 -1
  59. package/lib/binary-collections/findScript.cjs +35 -10
  60. package/lib/binary-collections/findScript.mjs +2 -2
  61. package/lib/binary-collections/listScript.cjs +35 -10
  62. package/lib/binary-collections/listScript.mjs +2 -2
  63. package/lib/binary-collections.cjs +45 -25
  64. package/lib/binary-collections.mjs +11 -11
  65. package/lib/changelog.cjs +7 -12
  66. package/lib/changelog.mjs +2 -2
  67. package/lib/{chunk-SPTECFE5.mjs → chunk-2MN4VPV2.mjs} +86 -20
  68. package/lib/{chunk-V2IBPCEV.mjs → chunk-6C7KTYGZ.mjs} +3 -1
  69. package/lib/{chunk-5RTXZVCW.mjs → chunk-6RK5UCTP.mjs} +5 -10
  70. package/lib/{chunk-FB2WKVJD.mjs → chunk-CD3HF3LK.mjs} +67 -35
  71. package/lib/{chunk-6PU7BAHB.mjs → chunk-FLYSZFLW.mjs} +1 -1
  72. package/lib/chunk-KLKAIFKI.mjs +40 -0
  73. package/lib/chunk-LVSPEFU2.mjs +86 -0
  74. package/lib/{chunk-2LSRSEXF.mjs → chunk-MGPYPKIE.mjs} +2 -2
  75. package/lib/{chunk-ZOWVMII3.mjs → chunk-NQXUYO67.mjs} +35 -10
  76. package/lib/{chunk-C6D2TTYU.mjs → chunk-OBXLTXFJ.mjs} +4 -2
  77. package/lib/chunk-QD4T255Z.mjs +40 -0
  78. package/lib/{chunk-XPJGCDOD.mjs → chunk-QII2EKCS.mjs} +14 -2
  79. package/lib/chunk-RDGDLSPD.mjs +76 -0
  80. package/lib/{chunk-NCZPTKDV.mjs → chunk-RDN6HF5Z.mjs} +1 -1
  81. package/lib/chunk-RJKTSUAX.mjs +123 -0
  82. package/lib/{chunk-66KDU4TX.mjs → chunk-TBWXE7ST.mjs} +36 -61
  83. package/lib/{chunk-M3YIYRHT.mjs → chunk-UY5VUEA3.mjs} +1 -1
  84. package/lib/chunk-WSHVPGNM.mjs +44 -0
  85. package/lib/{chunk-G5UUEWUO.mjs → chunk-X2B3X7D4.mjs} +1 -1
  86. package/lib/clean-github-actions-caches-cli.cjs +255 -213
  87. package/lib/clean-github-actions-caches-cli.mjs +25 -7
  88. package/lib/clean-github-actions-caches.cjs +231 -35
  89. package/lib/clean-github-actions-caches.d.cts +39 -1
  90. package/lib/clean-github-actions-caches.mjs +2 -1
  91. package/lib/cross-env/command.cjs +2 -2
  92. package/lib/cross-env/command.js +2 -2
  93. package/lib/cross-env/command.mjs +2 -2
  94. package/lib/cross-env/index.cjs +2 -2
  95. package/lib/cross-env/index.mjs +3 -3
  96. package/lib/cross-env/variable.mjs +2 -2
  97. package/lib/del-gradle.cjs +6 -11
  98. package/lib/del-gradle.mjs +1 -1
  99. package/lib/del-node-modules.cjs +185 -3
  100. package/lib/del-node-modules.js +3 -3
  101. package/lib/del-node-modules.mjs +6 -3
  102. package/lib/{del-ps.cjs → del-ps-cli.cjs} +36 -41
  103. package/lib/del-ps-cli.mjs +44 -0
  104. package/lib/del-yarn-caches.cjs +6 -11
  105. package/lib/del-yarn-caches.mjs +1 -1
  106. package/lib/downloader-cli.cjs +256 -0
  107. package/lib/downloader-cli.d.cts +2 -0
  108. package/lib/downloader-cli.mjs +90 -0
  109. package/lib/file/copy-cli.cjs +183 -2
  110. package/lib/file/copy-cli.mjs +6 -2
  111. package/lib/file/move-cli.cjs +183 -2
  112. package/lib/file/move-cli.mjs +6 -2
  113. package/lib/find-node-modules-cli.cjs +1 -1
  114. package/lib/find-node-modules-cli.mjs +1 -1
  115. package/lib/find-node-modules.cjs +1 -1
  116. package/lib/find-node-modules.mjs +1 -1
  117. package/lib/free-chatgpt.cjs +6 -11
  118. package/lib/free-chatgpt.mjs +1 -1
  119. package/lib/git/user-config.cjs +7 -12
  120. package/lib/git/user-config.mjs +2 -2
  121. package/lib/git-diff-cli.cjs +91 -30
  122. package/lib/git-diff-cli.mjs +3 -3
  123. package/lib/git-diff.cjs +91 -30
  124. package/lib/git-diff.js +85 -28
  125. package/lib/git-diff.mjs +3 -3
  126. package/lib/git-fix.cjs +7 -12
  127. package/lib/git-fix.mjs +2 -2
  128. package/lib/git-purge.cjs +7 -12
  129. package/lib/git-purge.mjs +2 -2
  130. package/lib/index.cjs +1 -1
  131. package/lib/index.mjs +1 -1
  132. package/lib/node-cache-cleaner-cli.cjs +185 -2
  133. package/lib/node-cache-cleaner-cli.js +2 -5
  134. package/lib/node-cache-cleaner-cli.mjs +8 -4
  135. package/lib/node-executor.cjs +183 -2
  136. package/lib/node-executor.mjs +5 -2
  137. package/lib/node-package-packer/build-readme.cjs +150 -0
  138. package/lib/node-package-packer/build-readme.d.mts +10 -0
  139. package/lib/node-package-packer/build-readme.mjs +10 -0
  140. package/lib/node-package-packer/build-tarball.cjs +495 -0
  141. package/lib/node-package-packer/build-tarball.d.mts +33 -0
  142. package/lib/node-package-packer/build-tarball.mjs +175 -0
  143. package/lib/node-package-packer-cli.cjs +525 -0
  144. package/lib/node-package-packer-cli.d.mts +1 -0
  145. package/lib/node-package-packer-cli.mjs +34 -0
  146. package/lib/npm-run-series.cjs +7 -12
  147. package/lib/npm-run-series.mjs +2 -2
  148. package/lib/package-resolutions-updater-cli.cjs +73 -76
  149. package/lib/package-resolutions-updater-cli.mjs +4 -3
  150. package/lib/package-resolutions-updater.cjs +71 -74
  151. package/lib/package-resolutions-updater.d.mts +34 -0
  152. package/lib/package-resolutions-updater.mjs +3 -2
  153. package/lib/php-cs-fixer-staged.cjs +1 -1
  154. package/lib/php-cs-fixer-staged.mjs +1 -1
  155. package/lib/print-directory-tree.cjs +16 -18
  156. package/lib/print-directory-tree.mjs +11 -8
  157. package/lib/print-tarball-tree.cjs +262 -0
  158. package/lib/print-tarball-tree.d.mts +1 -0
  159. package/lib/print-tarball-tree.mjs +68 -0
  160. package/lib/ps/index.cjs +10 -10
  161. package/lib/ps/index.mjs +4 -4
  162. package/lib/ps/table-parser.d.ts +3 -4
  163. package/lib/ps/table-parser.js +9 -16
  164. package/lib/remove-module.cjs +17 -22
  165. package/lib/remove-module.mjs +2 -2
  166. package/lib/rm-node-module-cli.cjs +171 -4
  167. package/lib/rm-node-module-cli.mjs +7 -4
  168. package/lib/rmpath-cli.cjs +285 -0
  169. package/lib/rmpath-cli.d.mts +1 -0
  170. package/lib/rmpath-cli.mjs +23 -0
  171. package/lib/rmpath.cjs +6 -217
  172. package/lib/rmpath.mjs +5 -101
  173. package/lib/run-by-checksum/cache.cjs +69 -0
  174. package/lib/run-by-checksum/cache.d.ts +19 -0
  175. package/lib/run-by-checksum/cache.js +50 -0
  176. package/lib/run-by-checksum/cache.mjs +12 -0
  177. package/lib/run-by-checksum/hash.cjs +72 -0
  178. package/lib/run-by-checksum/hash.d.ts +14 -0
  179. package/lib/run-by-checksum/hash.js +85 -0
  180. package/lib/{ps/isWin.mjs → run-by-checksum/hash.mjs} +5 -5
  181. package/lib/run-by-checksum/run.cjs +169 -0
  182. package/lib/run-by-checksum/run.d.ts +22 -0
  183. package/lib/run-by-checksum/run.js +93 -0
  184. package/lib/run-by-checksum/run.mjs +10 -0
  185. package/lib/run-by-checksum-cli.cjs +382 -0
  186. package/lib/run-by-checksum-cli.d.ts +2 -0
  187. package/lib/run-by-checksum-cli.js +43 -0
  188. package/lib/run-by-checksum-cli.mjs +56 -0
  189. package/lib/submodule-install.cjs +8 -13
  190. package/lib/submodule-install.mjs +3 -3
  191. package/lib/submodule-remove-cli.cjs +169 -2
  192. package/lib/submodule-remove-cli.js +2 -2
  193. package/lib/submodule-remove-cli.mjs +5 -2
  194. package/lib/utils/fetchResponse.cjs +24 -0
  195. package/lib/utils/fetchResponse.d.cts +25 -0
  196. package/lib/utils/fetchResponse.mjs +6 -0
  197. package/lib/utils/index.cjs +5 -10
  198. package/lib/utils/index.d.cts +2 -9
  199. package/lib/utils/index.mjs +1 -1
  200. package/lib/utils/isWindows.mjs +3 -1
  201. package/lib/utils/runBash.cjs +1 -1
  202. package/lib/utils/runBash.mjs +1 -1
  203. package/lib/yarn-per-branch-lock-installer.cjs +202 -11
  204. package/lib/yarn-per-branch-lock-installer.mjs +24 -11
  205. package/lib/yarn-reinstall.cjs +6 -11
  206. package/lib/yarn-reinstall.mjs +1 -1
  207. package/package.json +35 -10
  208. package/readme.html +2 -2
  209. package/readme.md +5 -5
  210. package/releases/readme.md +6 -3
  211. package/tmp/test-repo-runChecksum/test-complex-glob/README.md +1 -0
  212. package/tmp/test-repo-runChecksum/test-mixed-args/README.md +1 -0
  213. package/.opencode/package.json +0 -5
  214. package/lib/chunk-6S4NXESK.mjs +0 -26
  215. package/lib/del-ps.js +0 -32
  216. package/lib/del-ps.mjs +0 -43
  217. package/lib/ps/isWin.cjs +0 -26
  218. package/lib/ps/isWin.d.ts +0 -2
  219. package/lib/ps/isWin.js +0 -4
  220. package/test/package.json +0 -20
  221. package/test-project/package.json +0 -22
  222. package/test-project/workspaces/workspace-a/package.json +0 -135
  223. package/test-project/workspaces/workspace-a/test/demo/package.json +0 -25
  224. package/test-project/workspaces/workspace-b/package.json +0 -139
  225. package/test-project/workspaces/workspace-b/test/sample-project/package.json +0 -7
  226. package/test-project/workspaces/workspace-b/themes/hexo-theme-flowbite/package.json +0 -96
  227. package/tmp/rm-node-modules-test-project/package.json +0 -17
  228. package/tmp/rm-node-modules-test-project/packages/workspace-a/package.json +0 -16
  229. package/tmp/rm-node-modules-test-project/packages/workspace-b/package.json +0 -16
  230. package/tmp/test-repo/package.json +0 -17
  231. /package/lib/{del-ps.d.ts → del-ps-cli.d.mts} +0 -0
@@ -0,0 +1,33 @@
1
+ ## Git Diff Utility
2
+
3
+ Enhanced diff functionality for repository inspection. Saves diffs to temp files and optionally generates conventional commit prompts.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ git-diff [options] [file]
9
+ ```
10
+
11
+ ### Options
12
+
13
+ | Option | Description |
14
+ |--------|-------------|
15
+ | `-h, --help` | Show help message |
16
+ | `-s, -S, --staged-only` | Show all staged diffs |
17
+ | `-u, --unstaged <file>` | Show unstaged diff for a specific file |
18
+ | `-u, --unstaged` | Show all unstaged diffs |
19
+ | `--ai` | Generate commit message with ChatGPT |
20
+
21
+ ### Examples
22
+
23
+ ```bash
24
+ git-diff FILE # Show staged diff of a file
25
+ git-diff --staged-only # Show all staged diffs
26
+ git-diff --unstaged FILE # Show unstaged diff of a file
27
+ git-diff --unstaged # Show all unstaged diffs
28
+ git-diff --ai # Generate commit message with ChatGPT
29
+ ```
30
+
31
+ ### Source
32
+
33
+ See [`src/git-diff.js`](../src/git-diff.js) & [`src/git-diff-cli.js`](../src/git-diff-cli.js)
@@ -0,0 +1,34 @@
1
+ ## Git Fix Utility
2
+
3
+ A comprehensive configuration fixer for cross-platform development. Non-interactive and argument-driven.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ git-fix # Apply all default fixes
9
+ git-fix --lf-only # Force LF line endings only
10
+ git-fix --permissions # Ignore file permissions only
11
+ git-fix --normalize # Normalize existing files only
12
+ git-fix --user # Configure Git user from env vars
13
+ git-fix --user NAME EMAIL # Configure Git user with specific values
14
+ ```
15
+
16
+ Options can be combined: `git-fix --lf-only --permissions`
17
+
18
+ ### Features
19
+
20
+ - Forces LF line endings (`core.autocrlf = false`)
21
+ - Ignores file permission changes (`core.filemode = false`)
22
+ - Sets pull strategy to prevent auto-rebase
23
+ - Creates/updates `.gitattributes`
24
+ - Normalizes existing line endings
25
+
26
+ ### User Configuration
27
+
28
+ - Uses environment variables: `GITHUB_USER`, `GITHUB_EMAIL` (if no args provided)
29
+ - Use `--user NAME EMAIL` to specify credentials directly
30
+ - Precedence: CLI arguments > environment variables > skip
31
+
32
+ ### Source
33
+
34
+ See [`src/git-fix.cjs`](../src/git-fix.cjs) & submodules in [`src/git/`](../src/git/)
@@ -0,0 +1,17 @@
1
+ ## Git Repository Purge
2
+
3
+ Cleans and optimizes git repositories by pruning reflogs aggressively.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ git-purge
9
+ ```
10
+
11
+ ### Description
12
+
13
+ Aggressively prunes the git reflog in all `.git` directories, helping reduce repository size and improve performance.
14
+
15
+ ### Source
16
+
17
+ See [`src/git-purge.cjs`](../src/git-purge.cjs)
@@ -0,0 +1,17 @@
1
+ ## Git Repository Size Reducer
2
+
3
+ Reduces repository size by cleaning up history.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ git-reduce-size
9
+ ```
10
+
11
+ ### Description
12
+
13
+ Aggressively prunes git reflog and runs garbage collection to reduce the repository size on disk.
14
+
15
+ ### Source
16
+
17
+ See [`bin/git-reduce-size`](../bin/git-reduce-size)
@@ -0,0 +1,21 @@
1
+ ## Git Undo Commands
2
+
3
+ Utilities to undo recent git operations while preserving your changes.
4
+
5
+ ### Available Commands
6
+
7
+ | Command | Aliases | Description |
8
+ |---------|---------|-------------|
9
+ | `undo-commit` | `undo-last-commit`, `git-undo-commit` | Soft-resets the last commit (`git reset --soft HEAD~1`) |
10
+ | `undo-staged` | `git-undo-staged` | Unstages all staged changes (`git reset HEAD .`) |
11
+
12
+ ### Usage
13
+
14
+ ```bash
15
+ undo-commit # Undo the last commit, keep changes staged
16
+ undo-staged # Unstage all staged changes
17
+ ```
18
+
19
+ ### Source
20
+
21
+ See [`src/git/undo-commit.cjs`](../src/git/undo-commit.cjs), [`src/git/undo-staged.cjs`](../src/git/undo-staged.cjs)
@@ -0,0 +1,26 @@
1
+ ## Night Crows Process Killer
2
+
3
+ Kills the Night Crows game launcher process tree when the shipping process hangs.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ kill-night-crows
9
+ ```
10
+
11
+ ### Options
12
+
13
+ | Option | Description |
14
+ |--------|-------------|
15
+ | `-h, --help` | Show help message |
16
+
17
+ ### Description
18
+
19
+ - Launches `kill-night-crows.ps1` PowerShell script
20
+ - Watches for Night Crows processes and kills the launcher tree
21
+ - **Windows only**
22
+ - Available as a standalone utility for game development environments
23
+
24
+ ### Source
25
+
26
+ See [`src/kill-night-crows.mjs`](../src/kill-night-crows.mjs) & [`bin/kill-night-crows.ps1`](../bin/kill-night-crows.ps1)
@@ -0,0 +1,182 @@
1
+ ## Node Cache Cleaner
2
+
3
+ Cleans NPM, Yarn, and NPX caches in parallel.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ node-cache-cleaner [options]
9
+ ```
10
+
11
+ ### Options
12
+
13
+ | Option | Description |
14
+ |--------|-------------|
15
+ | `-h, --help` | Show help message |
16
+
17
+ ### Description
18
+
19
+ - Runs `npm cache clean --force` to clean the NPM cache
20
+ - Runs `yarn cache clean` (or `yarn cache clean --all` for Yarn Berry) to clean the Yarn cache
21
+ - Removes `_npx`, `_cacache`, and `.cache/npx` directories to clean the NPX cache
22
+ - All cache cleaning operations run in parallel via `Promise.allSettled`
23
+ - Exits with code 0 on success, or 1 if any cache clean operation fails
24
+
25
+ ### Source
26
+
27
+ See [`src/node-cache-cleaner-cli.ts`](../src/node-cache-cleaner-cli.ts) and [`src/node-cache-cleaner/`](../src/node-cache-cleaner/)
28
+
29
+ ---
30
+
31
+ ## Yarn Cache Cleaner (Python)
32
+
33
+ Python-based utility to clean Yarn caches.
34
+
35
+ ### Usage
36
+
37
+ ```bash
38
+ yarn-clean
39
+ ```
40
+
41
+ ### Description
42
+
43
+ Runs `yarn-clean.py` which locates and cleans Yarn cache directories. Available as a shell wrapper in both bash and batch variants.
44
+
45
+ ### Source
46
+
47
+ See [`bin/yarn-clean`](../bin/yarn-clean) & [`bin/yarn-clean.py`](../bin/yarn-clean.py)
48
+
49
+ ---
50
+
51
+ ## yc / ycw
52
+
53
+ Shell scripts to clean `node_modules` directories in parallel.
54
+
55
+ ### Usage
56
+
57
+ ```bash
58
+ yc [options]
59
+ ycw [options]
60
+ ```
61
+
62
+ ### Options
63
+
64
+ | Option | Description |
65
+ |--------|-------------|
66
+ | `-h, --help` | Show help message |
67
+ | `-c, --concurrent <num>` | Maximum parallel jobs (default: 4) |
68
+
69
+ ### Description
70
+
71
+ - **`yc`** — Cleans `node_modules` via letter-based parallel deletion of top-level entries (a-z) inside `node_modules/`
72
+ - **`ycw`** — Yarn workspaces–aware variant. Detects monorepo root, expands workspace globs, and cleans `node_modules` across root + all workspace packages in parallel
73
+
74
+ ### Source
75
+
76
+ See [`bin/yc`](../bin/yc) & [`bin/ycw`](../bin/ycw)
77
+
78
+ ---
79
+
80
+ ## Node Modules Cleaner
81
+
82
+ Recursively finds and removes `node_modules` directories.
83
+
84
+ ### Aliases
85
+
86
+ - `del-nodemodules` (default)
87
+ - `del-node-modules`
88
+
89
+ ### Usage
90
+
91
+ ```bash
92
+ del-nodemodules [options]
93
+ ```
94
+
95
+ ### Options
96
+
97
+ | Option | Description |
98
+ |--------|-------------|
99
+ | `--force`, `-f` | Actually delete (default is dry-run mode) |
100
+ | `-c, --concurrent N` | Set concurrent removals (default: 2, or CPU count) |
101
+ | `-h, --help` | Show help message |
102
+
103
+ ### Description
104
+
105
+ - Searches for all `node_modules` directories recursively
106
+ - Also removes `package-lock.json`, `yarn.lock`, and `.yarn/cache` directories
107
+ - By default runs in dry-run mode (shows what would be deleted)
108
+ - Pass `--force` to actually perform deletion
109
+
110
+ ### Source
111
+
112
+ See [`src/del-node-modules.js`](../src/del-node-modules.js)
113
+
114
+ ---
115
+
116
+ ## Yarn Cache Cleaner
117
+
118
+ Deletes Yarn cache directories and cached `.gz` files.
119
+
120
+ ### Aliases
121
+
122
+ - `del-yarncaches` (default)
123
+ - `del-yarn-caches`
124
+
125
+ ### Usage
126
+
127
+ ```bash
128
+ del-yarncaches
129
+ ```
130
+
131
+ ### Description
132
+
133
+ Finds and deletes all `.yarn/cache*` directories and `.yarn/*.gz` files under the current working directory, excluding `.git` and `vendor` directories.
134
+
135
+ ### Source
136
+
137
+ See [`src/del-yarn-caches.js`](../src/del-yarn-caches.js)
138
+
139
+ ---
140
+
141
+ ## Remove Node Modules (Fast)
142
+
143
+ Alternative tool for removing `node_modules` — faster for very large projects. Removes subfolders by first-letter in parallel.
144
+
145
+ ### Aliases
146
+
147
+ - `rm-node-modules` (default)
148
+ - `rm-node-module`
149
+ - `remove-node-modules`
150
+ - `remove-node-module`
151
+
152
+ ### Usage
153
+
154
+ ```bash
155
+ rm-node-modules [options]
156
+ ```
157
+
158
+ ### Options
159
+
160
+ | Option | Description |
161
+ |--------|-------------|
162
+ | `--force` | Actually delete (default is dry-run mode) |
163
+ | `-h, --help` | Show help message |
164
+
165
+ ### Description
166
+
167
+ - Removes `node_modules` subfolders by first-letter in parallel (a-z, A-Z)
168
+ - Writes and executes a temporary shell script (auto-removed after completion)
169
+ - On Windows requires a Unix-compatible shell in `PATH` (e.g., Git Bash or WSL)
170
+
171
+ ### Examples
172
+
173
+ ```bash
174
+ npx --legacy-peer-deps -y binary-collections rm-node-modules
175
+ npx --legacy-peer-deps -y binary-collections rm-node-modules --force
176
+ yarn run rm-node-modules
177
+ ```
178
+
179
+ ### Source
180
+
181
+ See [`src/rm-node-module-cli.cjs`](../src/rm-node-module-cli.cjs) & [`src/rm-node-modules.cjs`](../src/rm-node-modules.cjs)
182
+
@@ -0,0 +1,50 @@
1
+ ## Node Executor
2
+
3
+ Execute scripts in various languages by dispatching to the appropriate runtime based on file extension.
4
+
5
+ ### Aliases
6
+
7
+ This command is available under several aliases (all invoke the same CLI):
8
+
9
+ - `node-exec` (default)
10
+ - `exec-node`
11
+ - `execute-node`
12
+ - `node-executor`
13
+
14
+ ### Usage
15
+
16
+ ```bash
17
+ node-exec [options] <file>
18
+ ```
19
+
20
+ ### Options
21
+
22
+ | Flag | Description |
23
+ | :--- | :--- |
24
+ | `-h`, `--help` | Show help |
25
+ | `--exit-code=<code>` | Exit code when file not found or invalid (default: `1`) |
26
+
27
+ ### Supported Extensions
28
+
29
+ | Extension | Runtime |
30
+ | :-------- | :------ |
31
+ | `.php` | `php` |
32
+ | `.js` | `node` |
33
+ | `.mjs` | `node` |
34
+ | `.cjs` | `node` |
35
+ | `.py` | `python` |
36
+ | `.rb` | `ruby` |
37
+ | `.sh` | `bash` |
38
+ | `.bat` | `cmd` |
39
+
40
+ ### Example
41
+
42
+ ```bash
43
+ node-exec test.php
44
+ node-exec script.js
45
+ node-exec --exit-code=0 missing.php
46
+ ```
47
+
48
+ ### Source
49
+
50
+ See [`src/node-executor.cjs`](../src/node-executor.cjs)
@@ -0,0 +1,48 @@
1
+ # Node Package Packer
2
+
3
+ Automated tarball (tgz) creator for release folder. It packs the current package, generates release metadata, and writes a release README alongside the produced tarballs.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ tarball-packer [options]
9
+ ```
10
+
11
+ ### One-off Call
12
+
13
+ You can run the command without installing the library:
14
+
15
+ ```bash
16
+ npx --legacy-peer-deps -y binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz node-package-packer [options]
17
+ ```
18
+
19
+ ### Aliases
20
+
21
+ This command is available under the following aliases:
22
+
23
+ - `tarball-packer` (default)
24
+ - `node-package-packer`
25
+ - `pack-node-package`
26
+ - `pack-tarball`
27
+ - `build-tarball`
28
+ - `build-package`
29
+ - `build-package-tarball`
30
+
31
+ ### Options
32
+
33
+ | Flag | Description |
34
+ | :--- | :--- |
35
+ | `-h`, `--help` | Show help message |
36
+ | `-y`, `--yarn` | Force `yarn pack` instead of `npm pack` |
37
+ | `-d`, `--verbose` | Enable verbose output |
38
+ | `--fn`, `--filename` | Set output filename variant |
39
+
40
+ ### Description
41
+
42
+ - Runs `npm pack` or `yarn pack` to create a tarball in the project root.
43
+ - Copies the tarball into the release folder and writes `metadata.json` with integrity hashes.
44
+ - Generates a release README that lists available tarballs and raw GitHub URLs.
45
+
46
+ ### Source
47
+
48
+ See [`src/node-package-packer-cli.mjs`](../src/node-package-packer-cli.mjs) (CLI entry point) and [`src/node-package-packer/build-tarball.mjs`](../src/node-package-packer/build-tarball.mjs) (pack workflow).
@@ -0,0 +1,43 @@
1
+ ## NPM Script Runner
2
+
3
+ Execute multiple npm scripts in series using pattern matching.
4
+
5
+ ### Aliases
6
+
7
+ This command is available under several aliases (all invoke the same CLI):
8
+
9
+ - `nrs` (default)
10
+ - `run-s`
11
+ - `run-series`
12
+ - `npm-run-series`
13
+
14
+ ### Usage
15
+
16
+ ```bash
17
+ nrs <glob-pattern-of-script-names> [options]
18
+ ```
19
+
20
+ ### Options
21
+
22
+ | Flag | Description |
23
+ | :--- | :--- |
24
+ | `--yarn` | Use `yarn run` instead of `npm run` |
25
+ | `--verbose`, `-v` | Enable verbose logging |
26
+
27
+ ### Example
28
+
29
+ Define a script to run all tasks matching a pattern:
30
+
31
+ ```json
32
+ {
33
+ "scripts": {
34
+ "build:app": "echo 'building app'",
35
+ "build:lib": "echo 'building lib'",
36
+ "build:all": "nrs --yarn --verbose \"build:**\""
37
+ }
38
+ }
39
+ ```
40
+
41
+ ### Source
42
+
43
+ See [`src/npm-run-series.cjs`](../src/npm-run-series.cjs)
@@ -0,0 +1,22 @@
1
+ ## Package Resolutions Manager
2
+
3
+ Updates GitHub raw tarball commit SHAs in `package.json` resolutions to the latest commit on each branch.
4
+
5
+ ### Aliases
6
+
7
+ - `pkg-resolutions-updater` (default)
8
+ - `pkg-res-updater`
9
+
10
+ ### Usage
11
+
12
+ ```bash
13
+ pkg-resolutions-updater
14
+ ```
15
+
16
+ ### Description
17
+
18
+ Scans `package.json` resolutions for GitHub tarball URLs (raw.githubusercontent.com) and updates the commit SHA in each URL to the latest commit on the referenced branch.
19
+
20
+ ### Source
21
+
22
+ See [`src/package-resolutions-updater.mjs`](../src/package-resolutions-updater.mjs) & [`src/package-resolutions-updater-cli.mjs`](../src/package-resolutions-updater-cli.mjs)
@@ -0,0 +1,19 @@
1
+ ## PHP CS Fixer Staged
2
+
3
+ Runs `php-cs-fixer` on staged PHP files only.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ php-cs-fixer-staged
9
+ ```
10
+
11
+ ### Description
12
+
13
+ - Gets the list of staged PHP files using `git diff --name-only --cached --diff-filter=ACM`
14
+ - Automatically locates `php-cs-fixer` in PATH or common locations (`vendor/bin/`, `bin/`, `tools/`)
15
+ - Runs `php-cs-fixer fix` on only the staged PHP files
16
+
17
+ ### Source
18
+
19
+ See [`src/php-cs-fixer-staged.cjs`](../src/php-cs-fixer-staged.cjs)
@@ -0,0 +1,35 @@
1
+ ## Directory Tree Printer
2
+
3
+ Generates a directory tree structure with file SHA-256 hashes.
4
+
5
+ ### Aliases
6
+
7
+ - `print-tree` (default)
8
+ - `dir-tree`
9
+ - `print-directory-tree`
10
+
11
+ ### Usage
12
+
13
+ ```bash
14
+ print-tree [options]
15
+ ```
16
+
17
+ ### Options
18
+
19
+ | Option | Description |
20
+ |--------|-------------|
21
+ | `-o, --output <file>` | Output file (default: `tmp/directory-structure.txt`) |
22
+ | `--ext <exts>` | Comma-separated list of file extensions to include |
23
+ | `--pattern <glob>` | Glob pattern to include (repeatable) |
24
+ | `--exclude <dirs>` | Directories to exclude |
25
+ | `--override-exclude, -we` | Override default excludes |
26
+ | `--git-add` | Stage output file to git |
27
+ | `-h, --help` | Show help message |
28
+
29
+ ### Description
30
+
31
+ Scans the current directory recursively, generates a structured tree with SHA-256 hashes for each file, and writes the result to an output file.
32
+
33
+ ### Source
34
+
35
+ See [`src/print-directory-tree.cjs`](../src/print-directory-tree.cjs)
@@ -0,0 +1,55 @@
1
+ # Tarball Tree Printer
2
+
3
+ Prints the directory tree structure of a `.tgz` (gzipped tarball) archive to the console.
4
+
5
+ # Usage
6
+
7
+ ```bash
8
+ print-tarball-tree [options]
9
+ ```
10
+
11
+ ### Aliases
12
+
13
+ - `print-tarball-tree` (default)
14
+ - `tarball-tree`
15
+
16
+ ### Options
17
+
18
+ | Option | Description |
19
+ |--------|-------------|
20
+ | `-f, --file <path>` | Path to the tarball file |
21
+ | `-h, --help` | Show help message |
22
+
23
+ ### Description
24
+
25
+ Reads a `.tgz` file (gzipped tar archive), extracts the entry names, and prints them as a hierarchical directory tree using Unicode box-drawing characters (`├──`, `└──`, `│`).
26
+
27
+ The file path can be given as an absolute path or a relative path (resolved against the current working directory).
28
+
29
+ If no `--file` argument is provided, the command exits with an error.
30
+
31
+ If the specified file does not exist, the command exits with an error.
32
+
33
+ ### Examples
34
+
35
+ Print the tree of a tarball in the current directory:
36
+
37
+ ```bash
38
+ print-tarball-tree --file package.tgz
39
+ ```
40
+
41
+ Print the tree using an absolute path:
42
+
43
+ ```bash
44
+ print-tarball-tree -f /path/to/package.tgz
45
+ ```
46
+
47
+ Using the alias:
48
+
49
+ ```bash
50
+ tarball-tree --file build/package.tgz
51
+ ```
52
+
53
+ # Source
54
+
55
+ See [`src/print-tarball-tree.mjs`](../src/print-tarball-tree.mjs)
package/docs-src/py.md ADDED
@@ -0,0 +1,19 @@
1
+ ## Python Script Runner
2
+
3
+ Runs Python scripts using a managed virtual environment.
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ py <script.py> [args...]
9
+ ```
10
+
11
+ ### Description
12
+
13
+ - Automatically manages a Python virtual environment
14
+ - Installs dependencies as needed
15
+ - Runs Python scripts in a consistent, isolated environment
16
+
17
+ ### Source
18
+
19
+ See [`bin/py`](../bin/py)
@@ -0,0 +1,32 @@
1
+ ## Remove Module
2
+
3
+ Removes a module from one or more dependency directories (Node.js, PHP Composer, Python venv).
4
+
5
+ ### Usage
6
+
7
+ ```bash
8
+ remove-module <moduleName> [<moduleName> ...]
9
+ ```
10
+
11
+ ### Options
12
+
13
+ | Option | Description |
14
+ |--------|-------------|
15
+ | `--node` | Remove from `node_modules` (default if no flag given) |
16
+ | `--composer` | Remove from `vendor/composer` |
17
+ | `--venv` | Remove from `venv`/`.venv` site-packages |
18
+ | `-h, --help` | Show help message |
19
+
20
+ ### Examples
21
+
22
+ ```bash
23
+ remove-module lodash
24
+ remove-module lodash express --node
25
+ remove-module phpunit --composer
26
+ remove-module requests --venv
27
+ remove-module lodash phpunit --node --composer
28
+ ```
29
+
30
+ ### Source
31
+
32
+ See [`src/remove-module.mjs`](../src/remove-module.mjs)
@@ -0,0 +1,21 @@
1
+ ## Fast File/Folder Deleters
2
+
3
+ Shell-based utilities for finding and removing files/directories by name.
4
+
5
+ ### Commands
6
+
7
+ | Command | Description |
8
+ |---------|-------------|
9
+ | `rmfind` | Find and delete files/directories by name using `find` |
10
+ | `rmx` | Fast parallel alphabet-based folder deleter |
11
+
12
+ ### Usage
13
+
14
+ ```bash
15
+ rmfind <name> # Find and delete items by name
16
+ rmx <path> # Fast parallel deletion of folder contents
17
+ ```
18
+
19
+ ### Source
20
+
21
+ See [`bin/rmfind`](../bin/rmfind), [`bin/rmx`](../bin/rmx) & [`bin/rmx.cmd`](../bin/rmx.cmd)