{"id":15503833,"url":"https://github.com/kentcdodds/binode","last_synced_at":"2025-05-07T13:06:14.753Z","repository":{"id":40300984,"uuid":"472954971","full_name":"kentcdodds/binode","owner":"kentcdodds","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-15T04:12:42.000Z","size":39,"stargazers_count":63,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-07T13:06:08.034Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kentcdodds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2022-03-22T22:17:37.000Z","updated_at":"2024-06-14T05:17:21.000Z","dependencies_parsed_at":"2024-06-18T16:57:13.287Z","dependency_job_id":null,"html_url":"https://github.com/kentcdodds/binode","commit_stats":{"total_commits":16,"total_committers":4,"mean_commits":4.0,"dds":0.1875,"last_synced_commit":"89eff16cf7a1bd0b4da1b927dc7ad728a509b5d1"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentcdodds%2Fbinode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentcdodds%2Fbinode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentcdodds%2Fbinode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentcdodds%2Fbinode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentcdodds","download_url":"https://codeload.github.com/kentcdodds/binode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252883206,"owners_count":21819160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-02T09:14:50.031Z","updated_at":"2025-05-07T13:06:14.712Z","avatar_url":"https://github.com/kentcdodds.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# binode\n\n## Problem:\n\n[This is the problem we're solving](https://twitter.com/kentcdodds/status/1506287157203423239):\n\nYou've got an npm package that exposes a CLI, we'll call it `sndwch` and accepts some args:\n\n```sh\nsndwch --topping ham --topping cheese\n```\n\nBut then someone decides they want to run that with node's `--inspect-brk` flag (or maybe `--require` flag, or any other node-based flag). So they have to do this:\n\n```sh\nnode --inspect-brk ./node_modules/.bin/sndwch --topping ham --topping cheese\n```\n\n**The problem is** that doesn't work on windows, so now you have to do this:\n\n```sh\nnode --inspect-brk ./node_modules/sndwch/bin.js --topping ham --topping cheese\n```\n\nBut now the location of your binary file in your package is part of the API and if you ever decide to change how that works it's technically a breaking change.\n\n## Solution:\n\nPeople can install this package and then do this instead:\n\n```sh\nbinode --inspect-brk -- sndwch --topping ham --topping cheese\n```\n\nSometimes a package has a different binary name from the package name (like [`which`](https://npm.im/which) calls it's binary `node-which`). There's no way to do a reverse-lookup of a binary to find the package for it, so you have to supply that by providing the package name along with the executable you want. Something like this:\n\n```sh\nbinode --require ./mocks -- @remix-run/dev:remix dev\n```\n\nThat's it.\n\nHere's everything you need to know:\n\n- Everything on the left side of the `--` is flags for node\n- The first thing after the `--` is the binary you want to use\n- Everything after the binary you want to use is flags for that binary\n- If the package name and binary name are different, you must supply both after the `--` by separating them by a `:` (for example: `pkgName:binName`).\n\n## Installation\n\n```\nnpm install binode\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentcdodds%2Fbinode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentcdodds%2Fbinode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentcdodds%2Fbinode/lists"}