> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiroshios.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Background Service Installer

> Learn how to configure Hiroshi as an always-on background OS service.

Instead of keeping a terminal session open, you can register Hiroshi as a background service that boots automatically on system startup.

```bash theme={null}
hiroshi service [ACTION]
```

### 📋 Actions

* `install` - Register Hiroshi as an OS daemon service.
* `uninstall` - Remove the Hiroshi service from your system.
* `start` - Start the registered background service.
* `stop` - Stop the active background service.
* `status` - Query the running status of the background daemon.

***

### 💻 Platform Setup Instructions

#### 🪟 Windows Setup (sc.exe)

On Windows, Hiroshi registers itself as a native system service using the Windows Service Control Manager.

1. Run PowerShell or Command Prompt **as Administrator**.
2. Run:
   ```powershell theme={null}
   hiroshi service install
   ```
3. Start the service:
   ```powershell theme={null}
   hiroshi service start
   ```

#### 🐧 Linux Setup (systemd)

On Linux, Hiroshi writes a systemd service unit file at `/etc/systemd/system/hiroshi.service`.

1. Run the service installer:
   ```bash theme={null}
   sudo hiroshi service install
   ```
2. Start and enable the service:
   ```bash theme={null}
   sudo systemctl start hiroshi
   ```

#### 🍏 macOS Setup (launchd)

On macOS, Hiroshi registers a LaunchAgent configuration file at `~/Library/LaunchAgents/com.hiroshi.daemon.plist`.

1. Run the service installer:
   ```bash theme={null}
   hiroshi service install
   ```
2. The agent loads and starts running under the active user session immediately.
