Skip to content

Add macOS launchd auto-start setup - #16

Open
Plaidmustache wants to merge 2 commits into
aniketkarne:mainfrom
Plaidmustache:codex/add-macos-launchd-support
Open

Add macOS launchd auto-start setup#16
Plaidmustache wants to merge 2 commits into
aniketkarne:mainfrom
Plaidmustache:codex/add-macos-launchd-support

Conversation

@Plaidmustache

@Plaidmustache Plaidmustache commented Feb 28, 2026

Copy link
Copy Markdown

Summary

  • add a macOS-only setup-claude-launchd.sh helper to install, check, and remove a LaunchAgent
  • add claude-launchd-bootstrap.sh so launchd starts the daemon once per login without duplicating a running process
  • document launchd-based auto-start in the README

Why

The repo already supports manual daemon startup and legacy cron setup, but macOS users do not have a native auto-start option that survives reboots without manual intervention.

This adds a generic launchd workflow that:

  • installs into the current user's ~/Library/LaunchAgents
  • captures the current shell PATH so claude, ccusage, npx, or bunx remain discoverable under launchd
  • forwards optional arguments to ./claude-daemon-manager.sh start

Usage

  • ./setup-claude-launchd.sh install
  • ./setup-claude-launchd.sh install -- --at "09:00" --stop "17:00"
  • ./setup-claude-launchd.sh status
  • ./setup-claude-launchd.sh uninstall

Validation

  • bash -n claude-launchd-bootstrap.sh
  • bash -n setup-claude-launchd.sh
  • ./setup-claude-launchd.sh help
  • ./setup-claude-launchd.sh status
  • ./claude-launchd-bootstrap.sh --disableccusage while the daemon was already running (confirmed no duplicate start)
  • ./setup-claude-launchd.sh install
  • ./setup-claude-launchd.sh status
  • ./setup-claude-launchd.sh uninstall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant