Skip to content

A native macOS menu bar utility for managing local development servers.

Notifications You must be signed in to change notification settings

rayanical/DevDock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DevDock ⚓️

A native macOS menu bar utility for managing local development servers. Stop juggling 10 terminal tabs. Manage your localhost processes directly from the menu bar.

devdock

🚀 Why DevDock?

Every web developer knows the pain:

  • "Port 3000 is already in use."
  • Forgetting which terminal tab is running the backend.
  • Orphaned node processes draining battery in the background.

DevDock solves this by wrapping your start commands (like npm run dev, go run ., or python app.py) into a clean menu bar interface. It parses logs in real-time to detect ports and ensures processes are actually killed when you press stop.

✨ Features

  • Menu Bar Access: Start/Stop servers globally without searching for terminal windows.
  • Ghost Process Killer: Automatically detects and kills orphaned processes (e.g., a rogue node process blocking port 8080).
  • Auto-Port Detection: Real-time stdout parsing reads logs to find which port a server is running on.
  • ZSH Integration: Runs commands in a full login shell, so your existing tools (nvm, bun, cargo, rbenv) work out of the box.
  • Native Performance: Built with Swift & SwiftUI. Uses < 20MB RAM (unlike Electron apps).

🛠 Technical Highlights (Under the Hood)

  • Process Management: Uses low-level Process and NSPipe APIs to manage child processes and capture output streams.
  • Signal Handling: Sends SIGTERM for graceful shutdowns and escalates to SIGKILL if processes hang.
  • System Analysis: Parses lsof output to identify "Ghost Ports" — processes listening on TCP ports that aren't managed by the app.
  • Sandbox Escape: Intentionally bypasses the App Sandbox to allow full interaction with local development tools and file systems.

🐍 Python & Virtual Environments

DevDock runs commands in a full ZSH shell, so standard virtual environment patterns work perfectly.

Option 1: The Direct Path (Recommended) Point directly to the python executable inside your venv. This is cleaner and less error-prone.

  • Command: venv/bin/python3 app.py
  • Django: venv/bin/python3 manage.py runserver

Option 2: The Activate Chain If you need environment variables from the activate script, chain the commands:

  • Command: source venv/bin/activate && python3 main.py

📥 Installation

Option 1: Download App (Easiest)

  1. Go to the Releases page.
  2. Download DevDock.zip.
  3. Unzip and drag DevDock.app to your Applications folder.

⚠️ Important: Since I am an independent developer (and not paying Apple $99/year), the app is unsigned.

When opening it for the first time:

  1. Right-Click (or Control-Click) the app.
  2. Select Open.
  3. Click Open in the warning dialog. (You only need to do this once).

Troubleshooting: If the Right-Click > Open trick doesn't give you an "Open" button, macOS Gatekeeper might have blocked the app completely. Here is the fix:

  1. Open System Settings (or System Preferences).
  2. Go to Privacy & Security.
  3. Scroll down to the Security section.
  4. You will see a message: "DevDock" was blocked from use because it is not from an identified developer.
  5. Click the Open Anyway button.
  6. Enter your Mac password or Touch ID.
  7. The dialog will pop up one last time, but now it will have an Open button. Click it.

Option 2: Build from Source

Requirements: Xcode 14+

  1. Clone this repository.
  2. Open DevDock.xcodeproj in Xcode.
  3. Select your Team (Personal Team) in Signing & Capabilities.
  4. Press Cmd + R to build and run.

🤝 Contributing

Feel free to open issues or submit PRs!

  1. Fork the repo.
  2. Create your feature branch (git checkout -b feature/amazing-feature).
  3. Commit your changes.
  4. Push to the branch.
  5. Open a Pull Request.

📄 License

Distributed under the MIT License. See LICENSE for more information.


About

A native macOS menu bar utility for managing local development servers.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages