sindresorhus / Fkill
Licence: mit
Fabulously kill processes. Cross-platform.
Stars: ✭ 607
Programming Languages
javascript
184084 projects - #8 most used programming language
Fabulously kill processes. Cross-platform.
Works on macOS (10.13 or later), Linux, Windows.
Install
$ npm install fkill
Usage
const fkill = require('fkill');
(async () => {
await fkill(1337);
console.log('Killed process');
})();
fkill('Safari');
fkill(':8080');
fkill([1337, 'Safari', ':8080']);
API
fkill(input, options?)
Returns a promise that resolves when the process is killed.
input
Type: number | string | Array<number | string>
One or more process IDs/names/ports to kill.
To kill a port, prefix it with a colon. For example: :8080
.
options
Type: object
force
Type: boolean
Default: false
Force kill the process.
tree
Type: boolean
Default: true
Kill all child processes along with the parent process. (Windows only)
ignoreCase
Type: boolean
Default: false
Ignore capitalization when killing a process.
Note that the case is always ignored on Windows.
silent
Type: boolean
Default: false
Suppress all error messages. For example: Process doesn't exist
.
Related
- fkill-cli - CLI for this module
- alfred-fkill - Alfred workflow for this module
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].