{"id":16332139,"url":"https://github.com/dimaslanjaka/bin","last_synced_at":"2026-04-13T12:31:22.797Z","repository":{"id":154532140,"uuid":"629565026","full_name":"dimaslanjaka/bin","owner":"dimaslanjaka","description":"Node.js Executable Helpers: A collection of handy Node.js CLI tools for common development tasks like git diff, submodule installation, node_modules cleanup, npm run in series/parallel, and other helpful tools and CLI utilities","archived":false,"fork":false,"pushed_at":"2026-03-19T11:28:03.000Z","size":12467,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-20T04:24:46.714Z","etag":null,"topics":["bash","binary","helper","javascript","nodejs"],"latest_commit_sha":null,"homepage":"https://webmanajemen.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimaslanjaka.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-18T15:08:02.000Z","updated_at":"2026-03-19T11:28:06.000Z","dependencies_parsed_at":"2024-06-19T06:15:01.729Z","dependency_job_id":"4a5a2abc-a5a1-468d-b2f6-a658244852eb","html_url":"https://github.com/dimaslanjaka/bin","commit_stats":{"total_commits":199,"total_committers":1,"mean_commits":199.0,"dds":0.0,"last_synced_commit":"d0115a7389962b688bc745b1e1d8aaaf84ba25a6"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dimaslanjaka/bin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimaslanjaka%2Fbin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimaslanjaka%2Fbin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimaslanjaka%2Fbin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimaslanjaka%2Fbin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimaslanjaka","download_url":"https://codeload.github.com/dimaslanjaka/bin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimaslanjaka%2Fbin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","binary","helper","javascript","nodejs"],"created_at":"2024-10-10T23:29:21.571Z","updated_at":"2026-04-13T12:31:22.751Z","avatar_url":"https://github.com/dimaslanjaka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Binary Collections\nA comprehensive toolkit of Node.js CLI utilities for streamlining development workflows. Includes tools for git operations, dependency management, build processes, automation, and more.\n\n## Features\n\n- 🧹 **Cleanup Tools**: Remove node_modules, yarn caches, gradle builds\n- 🔄 **Git Utilities**: Submodule management, repository purging, diff tools\n- 📦 **Build Tools**: NPM script runners, package management utilities\n- ⚡ **Development Helpers**: Process management, environment setup tools\n\n## Installation\n\n### Clone Repository\n```bash\ngit clone -b master https://github.com/dimaslanjaka/bin bin\n```\n\n### NPM Installation\n```bash\n# Install locally\nnpm install binary-collections\n\n# Install globally\nnpm install binary-collections -g\n\n# Install from release archive\nnpm install binary-collections@https://github.com/dimaslanjaka/bin/raw/master/releases/bin.tgz\n```\n\n### Direct run\n\n```bash\n# Yarn berry\nyarn dlx binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz \u003ccommand-name\u003e\n\n# NPX\nnpx binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz \u003ccommand-name\u003e\n```\n\n## VS Code Setup\n\nCreate `.vscode/settings.json` to add binary tools to your PATH:\n\n```jsonc\n{\n  \"terminal.integrated.env.linux\": {\n    \"PATH\": \"${env:PATH}:${workspaceFolder}/node_modules/.bin:${workspaceFolder}/bin\"\n  },\n  \"terminal.integrated.env.windows\": {\n    \"PATH\": \"${env:PATH};${workspaceFolder}\\\\node_modules\\\\.bin;${workspaceFolder}\\\\bin\"\n  },\n  \"terminal.integrated.profiles.windows\": {\n    \"PowerShell\": {\n      \"source\": \"PowerShell\",\n      \"icon\": \"terminal-powershell\"\n    },\n    \"Command Prompt\": {\n      \"path\": [\n        \"${env:windir}\\\\Sysnative\\\\cmd.exe\",\n        \"${env:windir}\\\\System32\\\\cmd.exe\"\n      ],\n      \"args\": [],\n      \"icon\": \"terminal-cmd\"\n    },\n    \"Git Bash\": {\n      \"source\": \"Git Bash\"\n    },\n    \"Cygwin\": {\n      \"path\": \"C:\\\\cygwin64\\\\bin\\\\bash.exe\",\n      \"args\": [\"--login\", \"-i\"],\n      \"env\": {\n        \"CHERE_INVOKING\": \"1\"\n      }\n    }\n  },\n  \"terminal.integrated.defaultProfile.windows\": \"Command Prompt\"\n}\n```\n\n## Available Tools\n\n### Quick Reference\n\n| Category         | Commands                                                                 | Description                                      |\n|------------------|-------------------------------------------------------------------------|--------------------------------------------------|\n| **Git**          | `git-purge`, `git-diff`, `git-fix`, `git-reduce-size`                   | Git repository management and optimization        |\n| **Submodules**   | `submodule`, `submodule-install`, `submodule-remove`, `submodule-token` | Git submodule operations                         |\n| **NPM Scripts**  | `nrs`, `run-s`, `run-series`, `npm-run-series`                          | Run npm scripts in series with pattern matching   |\n| **Package Mgmt** | `yarn-reinstall`, `pkg-resolutions-updater`, `pkg-res-updater`          | Yarn/package resolutions management utilities     |\n| **Node.js Dev**  | `find-node-modules`, `find-nodemodules`, `dev`, `prod`, `empty`         | Node.js development helpers                      |\n| **Process Mgmt** | `kill-process`, `nodekill`, `javakill`, `del-ps`                        | Process management and termination               |\n| **File System**  | `rmfind`, `rmpath`, `rmx`, `print-tree`, `dir-tree`                     | File system operations                           |\n| **Cleanup**      | `del-nodemodules`, `del-yarncaches`, `del-gradle`                       | Cache and build directory cleanup                |\n| **GitHub Actions**| `clean-github-actions-caches`, `clean-github-actions-cache`, `clear-github-actions-cache`, `clear-github-actions-caches`, `clear-gh-caches` | Remove old GitHub Actions caches, keep only latest |\n\n---\n#### Binary List Generation \u0026 Source Code\n\nThe list of available binaries and utilities is auto-generated by the build script ([`build.mjs`](./build.mjs)).\n- All CLI tools and binaries are collected from the `bin/`, `lib/`, and other relevant folders.\n- The build process updates the `bin` field in `package.json` to reflect all available executables.\n- Source code for utilities is located in the `src/` folder.\n\nTo update the binary list, run:\n```bash\nyarn run build\n# or\nnode build.mjs\n```\nThis scans the project and updates `package.json` with all available binaries. The list may change as files are added or removed.\n\nSee also:\n- [Binary executables](https://github.com/dimaslanjaka/bin/tree/master/bin)\n- [Library modules](https://github.com/dimaslanjaka/bin/tree/master/lib)\n- [Package configuration](https://github.com/dimaslanjaka/bin/blob/master/package.json)\n\n### Git Tools\n\n#### Git Repository Purge\nClean and optimize git repositories by pruning reflogs:\n```bash\ngit-purge\n```\n![Git purge screenshot](https://github.com/dimaslanjaka/bin/assets/12471057/2805c54e-28a7-491d-b381-de2593a854b3)\n\n#### Git Diff Utility\nEnhanced git diff functionality:\n```bash\ngit-diff\n```\n\n#### Git Fix Utility\nComprehensive Git configuration fixer for cross-platform development (replaces `git-fix-encoding`):\n```bash\ngit-fix                          # Apply all fixes\ngit-fix --lf-only                # Force LF line endings only\ngit-fix --permissions            # Ignore file permissions only\ngit-fix --normalize              # Normalize existing files only\ngit-fix --user                   # Configure Git user from environment\ngit-fix --user NAME EMAIL        # Configure Git user with specific values\ngit-fix --user --update-remote   # Also update remote URL to match user\ngit-fix --user NAME EMAIL --update-remote  # Configure user and update remote URL\n```\nFeatures:\n- Forces LF line endings (`core.autocrlf = false`)\n- Ignores file permission changes (`core.filemode = false`)\n- Sets pull strategy to false (prevents auto-rebase)\n- Normalizes existing line endings\n- Creates/updates `.gitattributes` with proper line ending rules\n- Configures Git user from environment variables or CLI arguments\n- **Non-interactive:** All configuration is now argument-driven; no interactive prompts\n- `--update-remote` flag: Update remote URL to match the configured user (for HTTPS remotes)\n\nUser Configuration:\n- Environment variables: `GITHUB_USER`, `GITHUB_EMAIL`\n- CLI arguments take precedence over environment variables\n- Use `--update-remote` to update the remote URL with the configured user\n- Examples:\n  ```bash\n  git-fix --user \"John Doe\" \"john@example.com\"  # Use CLI args\n  git-fix --user --update-remote                 # Use env vars and update remote\n  git-fix --user \"Jane\" \"jane@example.com\" --update-remote  # CLI args and update remote\n  GITHUB_USER=\"Jane\" GITHUB_EMAIL=\"jane@example.com\" git-fix --user  # Use env vars\n  ```\n\n#### Git Repository Size Reducer\nReduce git repository size by cleaning up history:\n```bash\ngit-reduce-size\n```\n\n#### Submodule Management\n- **`submodule`** - General submodule operations\n- **`submodule-install`** - Install and setup submodules\n- **`submodule-remove`** - Remove git submodules with interactive selection\n- **`submodule-token`** - Manage submodule tokens\n\n![Submodule remover screenshot](https://github.com/user-attachments/assets/659c2fa3-f12f-45cb-a66f-aed3807e0023)\n\n\n### NPM Script Runner\n\n**Binaries**: `nrs`, `run-s`, `run-series`, `npm-run-series`\n\nRun multiple npm scripts in series with pattern matching support.\n\n#### Options\n| Flag                | Description                                 |\n|---------------------|---------------------------------------------|\n| `--yarn`            | Use `yarn run \u003cscript-name\u003e` instead of npm |\n| `--verbose`, `-v`   | Enable verbose output                       |\n\n#### Example\nExecute all scripts matching the pattern `namescript:**`:\n```json\n{\n  \"name\": \"package-name\",\n  \"version\": \"0.0.0\",\n  \"private\": true,\n  \"scripts\": {\n    \"namescript:xx\": \"echo xx\",\n    \"namescript:xxx\": \"echo xxx\",\n    \"namescript:xxxx\": \"echo xxxx\",\n    \"namescript:xxxxx\": \"echo xxxxx\",\n    \"namescript\": \"nrs --yarn=true --verbose=true \\\"namescript:**\\\"\"\n  },\n  \"license\": \"ISC\"\n}\n```\n\n### Package Management Tools\n\n#### Yarn Package Reinstaller\nReinstall yarn packages with dependency type flags:\n```bash\nyarn-reinstall \u003cpackageName\u003e [--dev|-D|--peer|-P|--optional|-O]\n```\n\n#### Package Resolutions Manager\nManage package resolutions in package.json (aliases: `pkg-resolutions-updater`, `pkg-res-updater`):\n```bash\npkg-resolutions-updater\npkg-res-updater\n```\n\n### Node.js Development Tools\n\n#### Node Modules Finder\nFind all node_modules directories in a project:\n```bash\nfind-node-modules      # Library function\nfind-node-modules-cli  # CLI tool\nfind-nodemodules       # Alias\n```\n\n#### Development Environment Helpers\n- **`dev`** - Development environment setup\n- **`prod`** - Production environment setup\n- **`empty`** - Empty utility tool\n\n### Process Management Tools\n\n#### Process Killers\nKill processes by name or pattern:\n```bash\nkill-process    # General process killer\nnodekill        # Kill Node.js processes\njavakill        # Kill Java processes (Windows)\ndel-ps          # Kill processes by command name\n```\n\n#### File System Tools\n- **`rmfind`** - Find and remove files\n- **`rmpath`** - Remove from PATH\n- **`rmx`** - Remove executable files\n\n### Cleanup Tools\n\n#### GitHub Actions Cache Cleaner\n[See full documentation](./docs-src/clean-github-actions-caches.md).\n\n#### Node Modules Cleaner\nRemove node_modules directories recursively:\n```bash\ndel-nodemodules        # Primary command\ndel-node-modules       # Alternative\nclean-nodemodule       # Legacy\nclean-nodemodules      # Legacy\n```\n![Node modules cleaner screenshot](https://github.com/dimaslanjaka/bin/assets/12471057/f03e5b51-1808-4e82-a474-0dd3c7eab5fe)\n\n#### Yarn Cache Cleaner\nClear yarn cache directories:\n```bash\ndel-yarncaches         # Primary command\ndel-yarn-caches        # Alternative\n```\n\n#### Gradle Build Cleaner\nDelete gradle build folders:\n```bash\ndel-gradle\n```\n\n#### Free ChatGPT automation tool\n\n[See full documentation](./docs-src/free-chatgpt.md)\n\n## Troubleshooting\n\n### Submodule Installation Issues\nIf you encounter the following error:\n```log\nfatal: 'origin/\u003cbranch\u003e' is not a commit and a branch '\u003cbranch\u003e' cannot be created from it\nfatal: unable to checkout submodule '\u003cfolder\u003e/\u003csubmodule\u003e'\n```\n**Solution**: Delete `.git/modules` directory before running `submodule-install`.\n\n#### Complete Submodule Setup Example\n```bash\necho \"Initializing submodules...\"\ngit submodule init\ngit submodule foreach \"git submodule init\"\n\necho \"Syncing submodules...\"\ngit submodule sync\ngit submodule foreach \"git submodule sync\"\n\necho \"Updating submodules...\"\nnpx --yes rimraf .git/modules\nnpx --yes binary-collections@https://raw.githubusercontent.com/dimaslanjaka/bin/master/releases/bin.tgz submodule-install\n```\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the terms specified in the LICENSE file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimaslanjaka%2Fbin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimaslanjaka%2Fbin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimaslanjaka%2Fbin/lists"}