explaingit

ashutosh-swain-git/dahmer

1GoAudience · developerComplexity · 1/5ActiveLicenseSetup · easy

TLDR

Cross-platform Go CLI that names the process holding a TCP port and can kill it, with support for single ports, lists, and ranges in parallel.

Mindmap

mindmap
  root((dahmer))
    Inputs
      Port number
      Port range
      kill flag
    Outputs
      Process info box
      Listening port table
      Kill result
    Use Cases
      Free port 3000
      Audit local ports
      Batch kill ranges
    Tech Stack
      Go
      Cobra
      Bubble Tea
      lsof

Things people build with this

USE CASE 1

Find out which app is squatting on port 3000 before starting a new dev server

USE CASE 2

Kill every process listening on a range like 3000 to 3010 in one command

USE CASE 3

List every TCP port currently being listened on across the machine

USE CASE 4

Force kill a stuck process with -f when SIGTERM is ignored

Tech stack

GoCobraBubble Tea

Getting it running

Difficulty · easy Time to first run · 5min

Single Go binary; on Unix it shells out to lsof, so a system without lsof in PATH will need it installed.

MIT license, free to use and modify with attribution and no warranty.

In plain English

Dahmer is a small command line program that solves a common annoyance for developers: a program is holding on to a network port, often something like 3000 or 8080, so a new project cannot start because that port is already in use. Dahmer tells you which program is holding the port and, if you want, kills it for you. It runs on macOS, Linux, and Windows from a single binary. The basic command is just the port number. Running dahmer 3000 prints a small framed box showing the process id, the name of the program, and the user account that owns it, or a friendly message if the port is free. You can ask about several ports at once by listing them, or about a whole range by writing something like dahmer 3000-3010, in which case the results come back as a table. The command dahmer ls shows every TCP port that is currently being listened on. To stop the offending process you add the word kill, as in dahmer 3000 kill. That sends the polite SIGTERM signal, equivalent to taskkill on Windows, asking the program to shut down cleanly. Adding the -f flag escalates to a forced SIGKILL when the program refuses to exit. Ranges and lists can also be killed in one shot, and the work happens in parallel. Internally the tool is written in Go using the Cobra library for the command structure and Bubble Tea for the styled output. It shells out to lsof on Unix and netstat plus tasklist on Windows. The project is released under the MIT license.

Copy-paste prompts

Prompt 1
Install dahmer on macOS and show me the framed output for dahmer 3000 when Node is holding the port
Prompt 2
Kill every process on ports 3000-3010 in parallel using dahmer and explain when to add -f
Prompt 3
Run dahmer ls and pipe the output into a script that emails me if more than 20 ports are listening
Prompt 4
Compare how dahmer queries port owners on Linux via lsof versus on Windows via netstat and tasklist
Prompt 5
Write a shell alias that calls dahmer with kill for the most common dev ports 3000, 5173, and 8080
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.