Dev.to WebDev ๐Ÿ›  Dev ๐Ÿ‘ 0 ๐Ÿ“– 2 min read

Why I Built a 337 KB Native Swift Port Manager Instead of Another 200 MB Electron App

Every full-stack developer hits the exact same friction multiple times a day: Error: listen EADDRINUSE: address already in use :::3000 You stop what you're building, open a new terminal tab, run lsof -nP -iTCP:3

Why I Built a 337 KB Native Swift Port Manager Instead of Another 200 MB Electron App

PortPilot โ€” Native macOS Menu-Bar Port Manager

Every full-stack developer hits the exact same friction multiple times a day:

Error: listen EADDRINUSE: address already in use :::3000

You stop what you're building, open a new terminal tab, run lsof -nP -iTCP:3000 -sTCP:LISTEN, squint at the PID, run kill -9 <pid>, and lose your flow. And if you look for a macOS menu-bar utility to handle it, half the options are 200โ€“350 MB Electron wrappers eating 300 MB of RAM just to sit in your menu bar โ€” or bundled into $10/month subscriptions.

So I started Kilobyte Labs to compile tiny, native Apple Silicon Swift/AppKit menu-bar utilities with zero Electron and one-time pricing.

How PortPilot Fits in 337 KB

Instead of shipping Chromium + Node.js, PortPilot compiles directly to a stripped native ARM64 Mach-O binary (swiftc -O -whole-module-optimization -parse-as-library -Xfrontend -disable-reflection-names -Xlinker -dead_strip -Xlinker -x + strip -u -r):

  • Machine-parseable port scanning: Uses /usr/sbin/lsof -nP -iTCP -sTCP:LISTEN -F pcnT combined with a single batched ps -ww -o pid=,rss=,args= lookup so process names with spaces never break parsing.
  • Smart runtime tagging: Automatically identifies Next.js (:3000), Vite (:5173), PostgreSQL (:5432), Redis (:6379), FastAPI/Django (:8000), Ollama (:11434), and protects macOS system daemons (ControlCenter, mDNSResponder, rapportd) with a shield badge.
  • 1-click actions right from the menu bar: Open http://localhost:<port>, Copy URL, Pin favorites, graceful SIGTERM stop, right-click Force SIGKILL, and Clean All Dev Ports.
  • Offline hardware-bound licensing: Verifies once against the Gumroad License API and caches a CryptoKit HMAC-SHA256 receipt bound to the Mac's native IOKit IOPlatformUUID so it works 100% offline afterward.

Tool #2: SnapShrink (Offline ImageIO Compressor + GPS/EXIF Stripper)

Right alongside PortPilot, I built SnapShrink โ€” a native macOS menu-bar utility powered by Apple's hardware-accelerated ImageIO & CoreGraphics (CGImageSource / CGImageDestination):

  • Shrinks bloated 4โ€“8 MB macOS Retina screenshots and photos up to 80% smaller locally (also super useful for compressing screenshots before pasting into Claude, Cursor, or ChatGPT).
  • Automatically strips hidden GPS coordinates, camera serial/model, TIFF, and IPTC EXIF metadata with zero cloud uploads.
  • Includes an optional Auto-Shrink Desktop Screenshots watcher mode.

Check Out Both Apps

Full transparency: Both apps target macOS 14+ (Apple Silicon) and are currently ad-hoc signed indie builds while bootstrapping at $0 fixed cost (Right-Click โ†’ Open once on first launch).

What other everyday macOS or developer friction deserves a sub-500 KB native Swift utility instead of a 250 MB Electron app? Let me know in the comments!

๐Ÿ“ฐ Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes โ€” full credit and traffic to the original publisher.