Sonar

Dev tools

port management cli

SHOW HN2026

Sonar

A tiny CLI to see and kill whatever's running on localhost

github.com

#localhost port#kill port#lsof alternative#listening ports

204points
77comments
#287of 4,366 in 2026
Top 7%of 2026 by points

How HN took it

MixedNo clear lean

14 positive, 11 neutral or asking, 0 mixed, 6 critical, out of 31 comments about the project. Thread score +0.30.

Idea: 9 for, 4 againstDesign: 1 for, 0 againstDocs: 0 for, 1 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful, saves remembering lsof flags

    From 4 comments
    • Nice — the use case for this is immediately obvious. I've spent more time than I care to admit running `lsof -i :PORT` or `netstat -tulpn | grep PORT` trying to figure out what's…
      diablevv on HN
    • Can never remember the right lsof incantation for this and end up googling it every time. The Docker container detection is a nice touch — half the time whatever's squatting on…
      derodero24 on HN
    • love this, i get tired of spamming lsof -i tcp:xxxx
      Bradd3rs on HN
    • Honestly, pretty cool. I was wondering if something like this existed. Right now I have scripts to kill the ports I use consistently to avoid issues when developing. Kudos!
      kohexo on HN
  • Docker container info is a nice touch

    From 2 comments
    • Can never remember the right lsof incantation for this and end up googling it every time. The Docker container detection is a nice touch — half the time whatever's squatting on…
      derodero24 on HN
    • I read the readme. :) Very nice. Thoughtful features. Get this on Homebrew!
      jkestner on HN

Objections

  • lsof with a shell alias does the same job

    From 3 comments
    • The README made me realize I just needed a simple `alias local-tcp-listeners='lsof -iTCP -sTCP:LISTEN'` in my `~/.bash_aliases` :)
      Doublon on HN
    • I just have an alias in my .bashrc :)
      RonanSoleste on HN
    • Can it do things that existing tools build into my distro cannot? It looks to me like a convenience tool. Which is fine, but i see no need for it myself
      RonanSoleste on HN
  • Title suggests listing and killing only; the tool does more

    From 2 comments
    • Its funny bc the title suggests a tool for listing and killing
      fionic on HN
    • HN is a place where people can be expected to go beyond the title (though I like the limited script and am glad it was posted). Misleading titles are not uncommonly flagged and…
      tomcatfish on HN
  • Name clashes with SonarQube

    From 3 comments
    • Nice! I always forget the lsof flags and end up googling them every time. Would be cool if it could run in the system tray and show what's running on your ports at a glance.…
      maciejj on HN
    • Sonar as in SonarQube? That's an interesting choice for a name :)
      moezd on HN
    • you picked a unique name. There is already a massively popular product called Sonar
      Brainspackle on HN

Requests

  • Tray app or system tray view of ports

    From 1 comment
    • Nice! I always forget the lsof flags and end up googling them every time. Would be cool if it could run in the system tray and show what's running on your ports at a glance.…
      maciejj on HN
  • Homebrew install

    From 2 comments
    • I read the readme. :) Very nice. Thoughtful features. Get this on Homebrew!
      jkestner on HN
    • I recommend just doing a tap in the same repo rather than adding this to homebrew first.
      0x457 on HN
  • Show Tailscale or custom host IP instead of localhost for Docker URLs

    From 1 comment
    • Would be nice to have a flag to customize the URL displayed for Docker containers. I connect to my host via Tailscale, but I can’t open links with localhost. It would be helpful…
      klaushardt on HN
  • Interactive multiselect kill

    From 1 comment
    • Nice util. It should be possible to kill inline. I like clack/prompts. See its multiselect API. https://github.com/bombshell-dev/clack/tree/main/packages/prompts
      mustafa0x on HN

Questions

  • Can it do things existing distro tools cannot?

    From 1 comment
    • Can it do things that existing tools build into my distro cannot? It looks to me like a convenience tool. Which is fine, but i see no need for it myself
      RonanSoleste on HN

Alternatives named

  • killport

    From 1 comment
    • I am absolutely installing this and starting to use it daily! For the even less patient there's also this (not mine): https://github.com/jkfran/killport
      pdimitar on HN
  • Evan Hahn's murder script

    From 1 comment
    • Have a look at Evan Hahn's murder util: https://codeberg.org/EvanHahn/dotfiles/src/commit/843b9ee13d949d346a4a73ccee2a99351aed285b/home/bin/bin/murder
      pluc on HN
  • lsof shell aliases and functions

    From 2 comments
    • i have this in my .zshrc which provides same functionality: ``` lk() { if [ $# -eq 0 ]; then local output=$(sudo lsof -iTCP -sTCP:LISTEN -n -P) elif [ $# -eq 1 ]; then local…
      chwzr on HN
    • The README made me realize I just needed a simple `alias local-tcp-listeners='lsof -iTCP -sTCP:LISTEN'` in my `~/.bash_aliases` :)
      Doublon on HN
  • ctop

    From 1 comment

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/47452515)