A cross-platform Node.js library to kill processes by PID, name, or port with advanced options.
fkill is a Node.js library that allows developers to programmatically kill processes by PID, name, or port across macOS, Linux, and Windows. It solves the problem of inconsistent process termination APIs across operating systems by providing a unified, promise-based interface with options for force killing, timeouts, and child process handling.
Node.js developers building cross-platform tools, CLIs, or automation scripts that require reliable process management, such as build tools, dev servers, or system monitors.
Developers choose fkill for its dead-simple API, cross-platform reliability, and advanced features like port killing and tree termination, which are often cumbersome to implement manually with native OS commands.
Fabulously kill processes. Cross-platform.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Abstracts macOS, Linux, and Windows differences, providing a unified promise-based API for process termination without manual OS command handling.
Supports killing by PID, process name, or port (e.g., ':8080'), allowing developers to identify processes in multiple ways as shown in the usage examples.
Accepts arrays to kill multiple processes in one call, such as fkill([1337, 'Safari', ':8080']), streamlining cleanup in automation scripts.
Offers granular options like forceAfterTimeout for delayed force kills and waitForExit for graceful shutdowns, with specific Windows support for tree termination.
Tree killing is only available on Windows, and ignoreCase defaults to false on non-Windows systems, leading to uneven behavior across OSes as noted in the README.
The silent option can hide errors like 'Process doesn't exist', which may obscure failures in production if used without careful oversight.
Relies on underlying system tools (e.g., kill, taskkill), which could fail due to permission issues or command availability, adding potential points of failure.