{"id":13567816,"url":"https://github.com/milewski/cross-port-killer","last_synced_at":"2025-03-17T16:10:42.124Z","repository":{"id":20349341,"uuid":"89724002","full_name":"milewski/cross-port-killer","owner":"milewski","description":"Kill any process running on a given TCP port on Windows, Linux or Mac","archived":false,"fork":false,"pushed_at":"2024-08-16T05:49:47.000Z","size":242,"stargazers_count":48,"open_issues_count":0,"forks_count":5,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-03-02T13:09:13.187Z","etag":null,"topics":["cross-platform","kill-port","linux","mac","process-kill","windows"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/milewski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"milewski","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2017-04-28T16:22:46.000Z","updated_at":"2024-08-16T15:27:48.000Z","dependencies_parsed_at":"2023-12-06T03:22:27.131Z","dependency_job_id":"ab088b54-a795-4472-8953-e8ccebf96fb5","html_url":"https://github.com/milewski/cross-port-killer","commit_stats":{"total_commits":37,"total_committers":7,"mean_commits":5.285714285714286,"dds":"0.32432432432432434","last_synced_commit":"06b74471fffa9cb627a747e863dac81233bec081"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fcross-port-killer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fcross-port-killer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fcross-port-killer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milewski%2Fcross-port-killer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milewski","download_url":"https://codeload.github.com/milewski/cross-port-killer/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066180,"owners_count":20392406,"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":["cross-platform","kill-port","linux","mac","process-kill","windows"],"created_at":"2024-08-01T13:02:44.551Z","updated_at":"2025-03-17T16:10:42.105Z","avatar_url":"https://github.com/milewski.png","language":"TypeScript","funding_links":["https://github.com/sponsors/milewski"],"categories":["TypeScript","Miscellaneous"],"sub_categories":["Server-rendered React"],"readme":"# cross-port-killer\n\n[![npm version](https://badge.fury.io/js/cross-port-killer.svg)](https://badge.fury.io/js/cross-port-killer)\n[![npm downloads](https://img.shields.io/npm/dm/cross-port-killer.svg)](https://www.npmjs.com/package/cross-port-killer)\n\nKill any process running on a given TCP port on **Windows**, **Linux** or **Mac**\n\n## Install\n\n```bash\n$ npm install cross-port-killer -D\n```\n\n## Usage\n\n```js\nimport { kill, killer } from 'cross-port-killer';\n\nkill(9090).then(pids =\u003e {\n  console.log(pids)\n})\n\n// you could also kill pids manually if you know them... this would save you bringing up another lib, you are welcome.\n\nkiller.killByPid(12345).then(() =\u003e console.log('done'))\nkiller.killByPids([12345, 54321]).then(() =\u003e console.log('done'))\n```\nThis lib also comes with a `CLI`.\n\nTo kill any process occupying the port 9090 you can run:\n\n```bash\n$ npx cross-port-killer 9090\n```\n\nor\n\n```bash\n$ npm install cross-port-killer -g\n```\n```bash\n$ kill-port 9090\n```\n\n## Dependencies\n\nOn **Linux**/**Mac** this library depends on `lsof` in case you don't have it installed (perhaps you are using docker?) run:\n\n```bash\n$ apt install lsof\n```\n\nOn **Mac**, It comes with the OS by default so nothing to worry.\n\n## License \n\n[MIT](LICENSE) © [Rafael Milewski](https://rafael-milewski.com?github=readme)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilewski%2Fcross-port-killer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilewski%2Fcross-port-killer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilewski%2Fcross-port-killer/lists"}