Back

Building CMDHub — A Native macOS Dev Services Manager

https://github.com/iCyberon/cmdhub

As a developer juggling multiple projects, I found myself constantly switching between terminal tabs to start, stop, and monitor local services — databases, API servers, frontend dev servers, queue workers. It was messy and error-prone. I’d forget to start a dependency, or accidentally kill the wrong process.

Why Native?

I wanted something that felt like a natural part of macOS, not another Electron app eating 500MB of RAM. CMDHub lives in the menu bar, launches instantly, and uses minimal resources. It’s built entirely in Swift with AppKit.

How It Works

CMDHub lets you define services in a simple configuration — the command to run, the working directory, environment variables, and dependencies between services. From the menu bar you can:

  • Start and stop services individually or as a group
  • See real-time stdout/stderr output per service
  • Monitor resource usage (CPU, memory) for each process
  • Auto-start services when you open a project folder

The Tricky Parts

Process management on macOS has its quirks. Handling process groups correctly so that child processes are cleaned up, dealing with shell environments vs. login environments, and making sure signals propagate properly all required careful attention.

The log viewer needed to handle high-throughput output without freezing the UI — buffering and virtualized rendering solved that.

What’s Next

I’m exploring adding support for Docker Compose services alongside native processes, and a simple health-check system that can auto-restart crashed services.

The project is open source — contributions and feedback are welcome.