serviceman

Creates and manages Linux and macOS background services via system init systems.

38|3|Updated Nov 30, 2024
One-click install
npx skills add https://github.com/bnnanet/serviceman --skill serviceman
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: serviceman
Source: https://github.com/bnnanet/serviceman/tree/main
Command: npx skills add https://github.com/bnnanet/serviceman --skill serviceman

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Serviceman removes the friction of managing background services by giving you one consistent way to register and control daemons across Linux (systemd/OpenRC) and macOS (launchctl).

Core Features & Use Cases

  • Cross-platform service management: Create, enable/disable, start/stop, restart, list, and view logs using the same workflow on supported init systems.
  • Safe installation patterns: Clear separation between user login services (agent) and always-on system boot services (daemon) with sensible defaults per OS.
  • Operational guardrails: Enforces the critical use of -- before the command and requires a valid --workdir (or --force) to prevent common runtime failures.
  • Use case example: You have a Node.js API you want to run persistently on a server; add it once with the right daemon mode and manage lifecycle commands later without hand-authoring service files.

Quick Start

Run serviceman to install your service in the background by using the command: serviceman add --name 'myapp' --workdir ~/srv/myapp -- ~/bin/myapp serve

Frequently Asked Questions about serviceman

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage background daemons across Linux and macOS using a single tool?

You can manage background daemons across Linux and macOS by using a tool that translates a single command into the correct init-system service configuration. This approach supports systemd, OpenRC, and launchctl, providing a unified control surface for cross-platform service deployment.

How to deploy a Node.js API as a persistent systemd service without writing unit files?

To deploy a persistent systemd service, run the add command with a valid workdir and use a double dash delimiter before your start command. This automatically generates the appropriate service configuration and control surface without requiring manual unit file authoring.

Does cross-platform service management work with both OpenRC and launchctl?

Cross-platform service management works with OpenRC and launchctl, alongside systemd. The tool detects the target operating system and translates your command into the correct init-system configuration for daemon deployment and lifecycle control.

What is the difference between an agent and a daemon when configuring user login services?

An agent configures user login services, while a daemon configures always-on system boot services. This separation enforces safe installation patterns by applying sensible defaults per OS based on the specific service lifecycle requirement.

Why does service installation fail without a valid workdir or force flag?

Service installation requires a valid workdir to prevent common runtime failures related to missing working directories. If you do not have a pre-existing workdir, you must use the force flag to bypass this operational guardrail.

Can I view logs and restart services using the same workflow on different init systems?

You can view logs, restart, start, stop, enable, and disable services using the same workflow on different init systems. The tool abstracts the underlying differences to provide consistent operational commands for listing and log inspection.