fkill-cli

repository·main·Indexed 25 days ago

https://github.com/sindresorhus/fkill-cli

A cross-platform command-line tool for killing processes on macOS, Linux, and Windows. Supports terminating processes by PID, name, or port, and includes an interactive UI with fuzzy searching and CPU/memory usage indicators.

Tokens
1.1K
Snippets
5
Records
7
Agent score
42%

What's inside fkill-cli

  1. Use fkill CLI options

    main

    The fkill command supports several flags to modify kill behavior and matching logic:

    • --force, -f: Force kill the process.
    • --verbose, -v: Show process arguments.
    • --silent, -s: Silently kill and always exit with code 0.
    • --force-timeout <N>, -t <N>: Force kill processes which didn't exit after N seconds.
    • --smart-case: Case-insensitive unless the pattern contains uppercase.
    • --case-sensitive: Force case-sensitive matching.

    Note: Process name matching is case-insensitive by default.

    $ fkill --help
    
    	Usage
    		$ fkill [<pid|name|:port> …]
    
    	Options
    		--force, -f                  Force kill
    		--verbose, -v                Show process arguments
    		--silent, -s                 Silently kill and always exit with code 0
    		--force-timeout <N>, -t <N>  Force kill processes which didn't exit after N seconds
    		--smart-case                 Case-insensitive unless pattern contains uppercase
    		--case-sensitive             Force case-sensitive matching
  2. Use fkill to kill processes by PID, name, or port

    main

    You can kill processes by providing their Process ID (PID), their name, or the port they are listening on. To specify a port, prefix it with a colon (e.g., :8080).

    Syntax: fkill [<pid|name|:port> …]

  3. Reference fkill CLI flags

    main

    The following flags are available for the fkill command:

    FlagShortTypeDescription
    --force-fbooleanForce kill
    --verbose-vbooleanShow process arguments
    --silent-sbooleanSilently kill and always exit with code 0
    --force-after-timeout <N>-t <N>numberForce kill processes which didn't exit after N seconds
    --smart-casebooleanCase-insensitive unless pattern contains uppercase
    --case-sensitivebooleanForce case-sensitive matching
    Options
    	  --force -f                         Force kill
    	  --verbose -v                       Show process arguments
    	  --silent -s                        Silently kill and always exit with code 0
    	  --force-after-timeout <N>, -t <N>  Force kill processes which didn't exit after N seconds
    	  --smart-case                       Case-insensitive unless pattern contains uppercase
    	  --case-sensitive                   Force case-sensitive matching
  4. Configure case sensitivity matching in fkill

    main

    By default, process name matching is case-insensitive. You can modify this behavior using the following flags:

    • --case-sensitive: Forces case-sensitive matching.
    • --smart-case: Case-insensitive unless the input pattern contains any uppercase characters. If multiple inputs are provided and any one of them contains an uppercase character, all inputs will be matched case-sensitively.
    • Default behavior: If no flags are provided, matching is case-insensitive.
  5. Use the fkill CLI to kill processes

    main

    The fkill command allows you to kill processes by their PID, name, or port. If no arguments are provided, the CLI enters an interactive mode.

    Usage Patterns:

    • By PID: $ fkill 1337
    • By Name: $ fkill safari
    • By Port: $ fkill :8080 (prefix the port with a colon)
    • Multiple targets: $ fkill 1337 safari :8080
    • Interactive Mode: $ fkill (supports fuzzy search and displays CPU/Memory usage indicators: 🚦 for CPU, 🐏 for memory)
    $ fkill 1337
    $ fkill safari
    $ fkill :8080
    $ fkill 1337 safari :8080
    $ fkill