✓ Verified 💻 Development ✓ Enhanced Data

Toolguard Daemon Control

Manage long-running processes as macOS launchd services.

Rating
3.9 (155 reviews)
Downloads
30,436 downloads
Version
1.0.0

Overview

Manage long-running processes as macOS launchd services.

Complete Documentation

View Source →

toolguard-daemon-control

Manage any executable as a persistent macOS launchd user agent.

Overview

Services are installed as ~/Library/LaunchAgents/ai.toolguard..plist and run as user-level launch agents. They auto-restart on failure and log to ~/Library/Logs/toolguard/.

Scripts

All scripts are in scripts/ relative to this skill's directory. Run them with bash.

install.sh — Create and start a service

bash
bash scripts/install.sh <service-name> <command> [args...] [--workdir <dir>] [--env KEY=VALUE ...]
  • service-name: Short identifier (e.g., toolguard-proxy). Used in plist filename and log paths.
  • command: Absolute path to the executable.
  • args: Arguments passed to the command.
  • --workdir : Working directory for the process (default: $HOME).
  • --env KEY=VALUE: Environment variables (repeatable).
Example:
bash
bash scripts/install.sh toolguard-proxy /usr/local/go/bin/go run ./cmd/server --config toolguard.dev.yaml --workdir ~/Documents/toolguard

uninstall.sh — Stop and remove a service

bash
bash scripts/uninstall.sh <service-name>

Unloads the service and removes the plist file. Logs are preserved.

status.sh — Check service status

bash
bash scripts/status.sh [service-name]

Without arguments, lists all ai.toolguard.* services. With a name, shows detailed status for that service.

logs.sh — View service logs

bash
bash scripts/logs.sh <service-name> [--follow] [--lines <n>]

Shows stdout and stderr logs. Default: last 50 lines.

list.sh — List all managed services

bash
bash scripts/list.sh

Lists all installed ai.toolguard.* services with their running state.

Notes

  • Services run as the current user (no sudo required).
  • Services auto-restart on crash (KeepAlive = true).
  • To run a Go project, use the compiled binary path or wrap in a shell script — launchd does not support go run directly. Use go build first, then point to the binary.
  • Log directory: ~/Library/Logs/toolguard//
  • Plist location: ~/Library/LaunchAgents/ai.toolguard..plist

Installation

Terminal bash

openclaw install toolguard-daemon-control
    
Copied!

💻Code Examples

bash scripts/install.sh <service-name> <command> [args...] [--workdir <dir>] [--env KEY=VALUE ...]

bash-scriptsinstallsh-service-name-command-args---workdir-dir---env-keyvalue-.txt
- `service-name`: Short identifier (e.g., `toolguard-proxy`). Used in plist filename and log paths.
- `command`: Absolute path to the executable.
- `args`: Arguments passed to the command.
- `--workdir <dir>`: Working directory for the process (default: `$HOME`).
- `--env KEY=VALUE`: Environment variables (repeatable).

Example:

bash scripts/uninstall.sh <service-name>

bash-scriptsuninstallsh-service-name.txt
Unloads the service and removes the plist file. Logs are preserved.

### status.sh — Check service status

bash scripts/status.sh [service-name]

bash-scriptsstatussh-service-name.txt
Without arguments, lists all `ai.toolguard.*` services. With a name, shows detailed status for that service.

### logs.sh — View service logs

bash scripts/logs.sh <service-name> [--follow] [--lines <n>]

bash-scriptslogssh-service-name---follow---lines-n.txt
Shows stdout and stderr logs. Default: last 50 lines.

### list.sh — List all managed services

Tags

#ios_and-macos-development

Quick Info

Category Development
Model Claude 3.5
Complexity One-Click
Author johnnylambada
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install toolguard-daemon-control