{"repo":"raskrebs/sonar","free":true,"listed":false,"github":"https://github.com/raskrebs/sonar","clone":"git clone https://github.com/raskrebs/sonar.git","description":"CLI tool for inspecting and managing services listening on localhost ports","language":"Go","stars":1090,"topics":["cli","developer-tools","docker","golang","linux","localhost","macos","portscanner","powershell"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Know what's running on your machine. 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. Install Homebrew (macOS / Linux) On macOS this also installs the sonar-tray menu bar app. Install script Downloads the latest binary to /.local/bin and adds it to your PATH if needed. Restart your terminal or source /.zshrc . On Windows (PowerShell): Custom install location: Install a specific version: Using Go Note: go install only installs the CLI. The menu bar tray app ( sonar tray ) is a native Swift binary and must be built separately — see Tray app below. Shell completions (tab-complete port numbers): Usage List ports By default, sonar hides desktop apps and system services that listen on TCP ports but aren't relevant to development — things like Figma, Discord, Spotify, ControlCenter, AirPlay, and other macOS .app bundles and /System/Library/ daemons. Use -a to include them. Available columns: port , process , pid , type , url , cpu , mem , threads , uptime , state , connections , health , latency , container , image , containerport , compose , project , user , bind , ip Inspect a port Shows ","default_branch":null,"files":null,"tree":[],"storefront":"/r/raskrebs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/raskrebs/sonar/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}