Persistent localhost servers (macOS launchd)
SkillAI & modelsLets your agent keep local development servers running persistently on your Mac, even after shells close.
Use Persistent localhost servers (macOS launchd) in Claude, ChatGPT or Ahel Desktop
Free. Sign in, add Persistent localhost servers (macOS launchd) and connect your AI. About a minute.
Also: Claude Code · Cursor · Codex
Then ask your AI: use the Persistent localhost servers (macOS launchd) skill
Details
Instructions available. Your AI can read the instructions. Execution depends on the setup they require.
Account requirements not reviewed. Check the skill instructions before use; ahel provides instructions and does not run this skill.
No other account needed.
Add ahel to your AI once: Claude, ChatGPT, Cursor, Claude Code or Codex. Then ask it to use this.
About this skill
Manage persistent dev servers, APIs, and other local processes on a port using macOS LaunchAgents. Use when starting, stopping, restarting, inspecting, or troubleshooting local servers that should survive shell exit and restart after crashes.
What this skill tells your AI
The instructions your AI receives, as published by davidondrej/skills in skills/ops-and-setup/persistent-localhost/SKILL.md and read by ahel’s review.
One script does everything. Resolve scripts/persistent-localhost.sh relative to this SKILL.md, never from the current directory.
Workflow
- Check what already exists:
scripts/persistent-localhost.sh list
- Start the server.
--nameis the handle.--portenables readiness checks and duplicate handling.--dirdefaults to the current directory.
scripts/persistent-localhost.sh start --name myproj --port 5111 --cmd "./bin/serve"
The command returns only after the port is listening, or fails with the last 20 log lines. Report the printed URL= to the user.
- Inspect, restart, read logs, stop:
scripts/persistent-localhost.sh status myproj
scripts/persistent-localhost.sh restart myproj # after editing code that has no reloader
scripts/persistent-localhost.sh logs myproj 100
scripts/persistent-localhost.sh stop myproj
Hot reload
Prefer the framework's own reloader in --cmd (flask run --debug, vite, uvicorn --reload, node --watch). If the server has none, add --watch. It wraps the command in watchexec -r on the working directory. Never use both. Requires brew install watchexec.
Rules the script enforces
- Runs as
com.persistent-localhost.<name>in the userguidomain vialaunchctl bootstrap. Restart useskickstart -kp, stop usesbootout. No deprecatedload,start,stop, no broadpkill. KeepAliveonly on crash. A clean exit stays down. Throttle 5s so a syntax error cannot spin.- Port already taken by the same app (our own label, or a stray process with the same working directory) is replaced. A different app is left alone and the next free port is used. Read the printed
PORT=. - The caller's
PATHand aPORTvariable are passed into the job. Add more with--env KEY=VAL. - Logs:
~/Library/Logs/persistent-localhost/<name>.log. State:~/Library/Application Support/persistent-localhost/<name>.state. Plist:~/Library/LaunchAgents/.
Fallback
Never start servers with nohup, &, disown, setsid, or run_in_background. If launchctl bootstrap fails, report the failure and stop.
Signals
- GitHub stars
- 4k
- Forks
- 598
- Last commit
- Sep 2026
ahel review
K1binfo
installs-packagesK1binfo
installs-packages (in scripts/persistent-localhost.sh)
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Item type
- skill
- Key
persistent-localhost- Source
- github.com/davidondrej/skills
More in AI & models
Skill · anthropics
More in AI & modelstriage
Skill · mattpocock
More in AI & modelswayfinder
Skill · mattpocock
More in AI & modelsalgorithmic-art
Skill · anthropics
More in AI & modelscode-review-and-quality
Skill · addyosmani
More in AI & modelsai-first-engineering
Skill · affaan-m
More in AI & models