How a service is exposed to clients. Decided once at install time
(--url, --tailscale, the interactive prompt, or auto-derived) and
threaded through the planner so every code path that needs to know
“where does this service live?” pattern-matches a single typed value
instead of juggling a parallel (Option<url>, bool) pair where some
combinations were silently invalid (e.g. a *.ts.net URL with
tailscale_enabled = false).
Per-install record. Written at ryra add time, read by every command
that needs to know how a service was set up. Mirrors the data that used
to live in # Service-* quadlet header comments.
Typed steps the CLI executes, the warnings it surfaces, and the result
shapes returned from add / remove / reset. Pattern matching ensures
every step type is handled — no string parsing or if-chains.
Why the planner is running. The render path is shared between fresh
installs and re-renders (ryra upgrade); the side-effect steps are
not — re-registering an OIDC client on upgrade would mint a new
client_id/client_secret against authelia’s existing entry, and
patching every other installed service’s quadlet (retroactive network
joins) is install-time work. The mode gates those.
Drop the cached [auth] block when the auth provider is removed —
otherwise a later ryra add <svc> --auth thinks auth is still
configured and skips the auto-install path, then bombs out trying
to register an OIDC client against a non-existent authelia config.
The function name is preserved for caller compatibility; quadlet
removal is what actually finalises the install state.
True if the named service is ryra-managed and fully installed —
the marker’d .container is present AND metadata.toml exists.
A partial install (quadlets written but the install plan errored
before metadata.toml landed) is treated as not-installed so that
ryra remove <svc> --purge routes through the orphan-cleanup path
instead of failing with “service is not installed”. Same source of
truth as list_installed.
List installed services. Quadlet directory is the source of
truth — every service whose main .container file carries our
marker is reconstructed from its on-disk headers + .env. The
preferences file is only consulted as a fallback for entries the
scan can’t see (e.g. partially-rolled-out installs from older
ryra versions before metadata headers landed).
Record a service as pending installation (installed: false).
Called BEFORE executing steps so that partial failures are recoverable.
Persist install-time scaffolding to preferences.toml. This is now
the only side-effect — quadlet headers track the install itself,
preferences just remembers cross-cutting defaults so the next
ryra add --auth doesn’t have to re-prompt for the OIDC issuer.
Scan the user’s quadlet directory for ryra-managed services. A
.container file is considered ryra-managed iff it carries a
# Service-Source: registry/<name> comment within its first 16
lines (added at install time). Returns the deduplicated set of
service names found.
Get the current status of the ryra installation. Considers ryra
“initialized” when EITHER a marker’d quadlet is on disk OR a
preferences.toml exists — quadlets are the source of truth for
installed services, but a preferences-only state (e.g. an SMTP relay
configured before any service install) still counts.