All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Sonar: A CLI tool for inspecting and managing localhost port services

By

raskrebs

2mo ago· 4 min readenCode

Summary

A developer created "sonar," a CLI tool that simplifies managing services listening on localhost ports. It replaces the tedious process of using lsof and grep by showing all listening services with Docker container names, Compose projects, resource usage, and clickable URLs. Users can kill processes, tail logs, and shell into containers by port number. The tool is installable via Homebrew or a script, and includes a menu bar app for macOS.

Key quotes

· 4 pulled
I got tired of running lsof -iTCP -sTCP:LISTEN | grep ... every time a port was already taken, then spending another minute figuring out if it was a Docker container or some orphaned dev server from another worktree.
So I built sonar.
It shows everything listening on localhost, with Docker container names, Compose projects, resource usage, and clickable URLs.
You can kill processes, tail logs, shell into containers, and more — all by port number.
Snippet from the RSS feed
CLI tool for inspecting and managing services listening on localhost ports - raskrebs/sonar

You might also wanna read