Sonar: A CLI tool for inspecting and managing localhost port services
By
raskrebs
Fresh out the oven, still warm. Top of the tray.
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 pulledI 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.
You might also wanna read
Harbor: CLI tool for one-command local LLM stack deployment
Harbor is a CLI tool and companion that lets developers spin up complete local LLM stacks with a single command. Created by Ivan over nearly
Sonarly: AI Platform That Autonomously Fixes Production Bugs Using Monitoring Tools
Sonarly is an AI-powered platform that autonomously fixes production bugs by connecting to monitoring tools like Sentry and Datadog. It tria
