Skip to main content

Synopsis

profclaw daemon <subcommand> [flags]

Description

daemon registers profClaw as an OS-level service so it starts automatically on boot and restarts on failure. On macOS it creates a launchd plist at ~/Library/LaunchAgents/com.profclaw.agent.plist. On Linux it creates a systemd user unit at ~/.config/systemd/user/profclaw.service. Logs are written to ~/.profclaw/daemon.log and ~/.profclaw/daemon-error.log on macOS, and to the system journal on Linux.

Subcommands

SubcommandDescription
installRegister the service with launchd / systemd
uninstallRemove the service registration
startStart the service
stopStop the service
restartRestart the service (also rotates logs)
statusShow current service status, PID, and log sizes
logsTail service logs
rotateRotate log files when > 10 MB (macOS only)

Examples

profclaw daemon install
profclaw daemon start

daemon logs Flags

-f, --follow
boolean
Follow log output in real time. Press Ctrl+C to stop.
-n, --lines
string
default:"50"
Number of lines to show. Maps to tail -n on macOS and journalctl -n on Linux.
--errors
boolean
Show the error log only (daemon-error.log on macOS, journal priority err on Linux).

Crash Loop Protection

The service is configured with restart limits to prevent runaway crash loops:
PlatformBehavior
macOS (launchd)ThrottleInterval=10s between restart attempts
Linux (systemd)Max 5 restart attempts per 60 seconds (RestartSec=5s)
If the limit is hit, use profclaw doctor to identify the root cause, then manually start the service again.

Log Rotation

On macOS, log files rotate automatically when they exceed 10 MB (one .1 backup kept). On Linux, journald handles rotation automatically.
# Manually rotate macOS logs
profclaw daemon rotate