Skip to content

maggiehe/killpick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

killpick

See which process is which before you kill it.

中文文档

demo

killpick is an interactive process killer for macOS. Instead of blind kill or pkill, it shows you what each process is actually doing — PID, name, start time, memory footprint, and working directory — so you can pick the right ones to kill.

Why

You have 15 node processes running. Which ones are safe to kill?

  • ps aux | grep node — wall of text, no working directory
  • htop — too much noise, kill one at a time
  • pkill node — kills everything, hope nothing important was running

killpick shows the CWD so you know which project each process belongs to, then lets you multi-select and batch kill.

Install

Option 1: Direct (recommended)

curl -fsSL https://raw.githubusercontent.com/maggiehe/killpick/main/killpick.py -o ~/scripts/killpick
mkdir -p ~/scripts
chmod +x ~/scripts/killpick

# Add to PATH (if not already)
echo 'export PATH="$HOME/scripts:$PATH"' >> ~/.zshrc
source ~/.zshrc

Option 2: Git clone

git clone https://github.com/maggiehe/killpick.git
cd killpick
mkdir -p ~/scripts
cp killpick.py ~/scripts/killpick
chmod +x ~/scripts/killpick

Option 3: AI Agent Skill

If you use Skills-compatible AI agents (Claude Code, Cursor, etc.):

npx skills add maggiehe/killpick

Then use /killpick install to have the agent set it up, or /killpick node to let the agent find and kill processes for you.

Usage

killpick <name>

<name> matches process names by substring. killpick node finds node, nodemon, etc.

Keybindings

Key Action
/ or j/k Navigate
Space Select / deselect
a Select all
n Invert selection
Enter Kill selected processes
q / Esc Quit without killing

What you see

killpick: node (6 processes)
     PID  NAME          STARTED      MEM  CWD
[x] 48210  node          04-01 09:15  1.2G  …/my-webapp
[ ] 48356  node          04-01 10:32  845M  …/api-server
[x] 49012  node          04-02 14:07  312M  …/dashboard
[ ] 50188  nodemon       04-03 08:45  128M  …/auth-service
[ ] 51443  node          04-03 16:20  2.1G  …/data-pipeline
[ ] 52901  node          04-04 11:03   95M  …/docs-site

Space select/deselect  a all  n invert  ↑/↓ j/k move  q quit
Enter kill selected (2)

How it works

  • Finds processes with pgrep (substring match on process name)
  • Gets memory via macOS footprint (same as Activity Monitor), falls back to ps rss
  • Gets working directory via lsof -a -d cwd
  • Sorts by start time (oldest first)
  • Kills with SIGKILL (kill -9)

Requirements

  • macOS (uses footprint, lsof, pgrep)
  • Python 3 (pre-installed on macOS)
  • No external dependencies — stdlib only

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages