Skip to main content

Module daemon

Module daemon 

Source
Expand description

Daemon command implementation for background service management.

Responsibilities:

  • Re-export daemon subcommands (start, stop, serve, status, logs)
  • Define shared types (DaemonState) and constants
  • Provide shared helpers for daemon state management

Not handled here:

  • Individual command implementations (see submodules)
  • Windows service management (Unix-only implementation)

Invariants/assumptions:

  • Daemon uses a dedicated lock at .ralph/cache/daemon.lock
  • Daemon state is stored at .ralph/cache/daemon.json

Functionsยง

logs
Inspect daemon logs with filtering and follow support.
serve
Internal: Run the daemon serve loop. This should not be called directly by users.
start
Start the daemon as a background process.
status
Show daemon status.
stop
Stop the daemon gracefully.