No mercy for runaway processes.
Merc finds, displays, and kills processes using window titles and fuzzy search. It detects file locks and force-removes stuck files and directories. Currently Windows-only, with the architecture to support other platforms.
- See what processes are doing — window titles, not just
chrome.exe - Fuzzy search — type a few characters, find what you need
- Multi-select — kill several processes at once
- Force-remove locked paths — detect who holds the lock, kill them, delete the path
- Resource stats — memory usage, CPU time, and weight class grading (
-s) - Pipeline-friendly — composable flags for scripting (
-l,-k,-json)
Download merc.exe from the latest release and put it on your PATH.
Or build from source:
go install github.com/jack-work/merc/cmd/merc@latest
- Windows — currently the only supported platform (Linux/macOS planned via the
Backendinterface) - fzf — required for interactive mode. Tested with fzf 0.62.0 (scoop). Install via
winget install junegunn.fzf,scoop install fzf, orchoco install fzf.
# Interactive: fuzzy-pick processes → kill selection
merc
# Force-remove a locked directory
merc -rm .\node_modules
# List processes (fzf protocol: PID\t{display})
merc -l
# List with resource stats and weight classes
merc -l -s
# JSON output
merc -json
# JSON with stats
merc -json -s
# Pipeline: pick with fzf, kill selection
merc -l | fzf -m --with-nth=2.. --delimiter=$'\t' | merc -k
# Include system/junk windows
merc -l -j| Flag | Description |
|---|---|
| (none) | Interactive mode — fzf picker, kill selection |
-l |
List processes as PID\t{display} lines |
-json |
List processes as JSON |
-k |
Read PIDs from stdin, kill each |
-rm <path> |
Detect file locks → prompt → kill → delete |
-j |
Include system/junk windows (modifier) |
-s |
Include resource stats and weight classes (modifier) |
$ merc -rm .\out
Blocked! These processes hold files under C:\project\out:
40080 devenv MyProject - Visual Studio
Kill devenv (PID 40080)? [y/N]: y
Killing devenv (PID 40080)...
Removed: C:\project\out
Merc is designed library-first. Import it to build your own frontend:
import "github.com/jack-work/merc"
// Without stats
procs, _ := merc.ListProcesses(false, false)
for _, p := range procs {
fmt.Println(merc.FormatProcessLine(p))
}
// With stats and weight classes
procs, _ = merc.ListProcesses(false, true)
for _, p := range procs {
fmt.Printf("%s %s %s\n", p.Name, merc.FormatBytes(p.MemoryBytes), p.WeightClass)
}See the wiki for the full API reference and integration guide.
When -s is enabled, each process is graded into a weight class based on its relative resource consumption across all running processes:
| Class | Composite Score | Color |
|---|---|---|
| feather | < 25th percentile | dim gray |
| mid | 25th–75th percentile | white |
| heavy | 75th–95th percentile | yellow |
| wew lad | > 95th percentile | red |
The composite score is 0.6 × memory_percentile + 0.4 × cpu_percentile.
The README covers installation and daily use. For deeper topics — API reference, pipeline recipes, frontend integration — see the Wiki.
MIT