Skip to main content

Module service

Module service 

Source
Expand description

Install + manage OS service units that run wire components automatically across reboots.

Today’s onboarding tells operators “run wire daemon & in a tmux pane or write a launchd plist yourself” — friction that gets skipped, leading to the “daemon dies on reboot, peer sends evaporate” silent class. Bake the unit install into wire service install so it’s one command, idempotent, cross-platform.

§Service kinds (v0.5.22)

  • Daemon (wire service install) — runs wire daemon --interval 5. Pulls/pushes the operator’s own inbox/outbox. ONE per identity. Label: sh.slancha.wire.daemon.

  • LocalRelay (wire service install --local-relay) — runs wire relay-server --bind 127.0.0.1:8771 --local-only. The loopback transport for sister-agents on the same box (v0.5.17 dual-slot). ONE per machine. Label: sh.slancha.wire.local-relay.

§Unit paths

  • macOS: ~/Library/LaunchAgents/<label>.plist
  • linux: ~/.config/systemd/user/wire-<kind>.service

Units auto-start on login + restart on crash. Pair with wire upgrade (P0.5) for atomic version swaps without unit churn.

Structs§

ServiceReport
Outcome of wire service install etc., suitable for both human + JSON rendering.

Enums§

ServiceKind
Which wire service is being managed. Each kind has its own launchd label / systemd unit name / log path so the two kinds can coexist on the same machine without colliding.

Functions§

install
Back-compat shim — wire service install with no flags installs the daemon, matching pre-v0.5.22 behavior.
install_kind
Install a user-scope service unit for the given kind.
status
status_kind
uninstall
uninstall_kind