fkill

9.0.0last stable release 1 year ago
Complexity Score
Low
Open Issues
7
Dependent Projects
124
Weekly Downloadsglobal
198,458

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme





Fabulously kill processes. Cross-platform.

Works on macOS (10.13 or later), Linux, Windows.

Install

npm install fkill

Usage

import fkill from 'fkill';

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 processes are 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 processes.

forceAfterTimeout

Type: number
Default: undefined

Force kill processes that did not exit within the given number of milliseconds.

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

Dependencies

CVE IssuesActive
0
Scorecards Score
3.60
Test Coverage
No Data
Follows Semver
Yes
Github Stars
722
Dependenciestotal
12
DependenciesOutdated
0
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute fkill in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install fkill
Processing...
Done

25 Releases

NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.