pub enum ServiceAction {
Install {
services: Option<Vec<String>>,
start: bool,
enable: bool,
system: bool,
systemd_session: bool,
verbose: bool,
},
Uninstall {
services: Option<Vec<String>>,
},
Start {
name: Option<String>,
foreground: bool,
daemon: bool,
standalone: bool,
ipc: bool,
services: Option<Vec<String>>,
quic_bind: Option<String>,
print_cert_hash: bool,
},
Stop {
name: Option<String>,
},
Status {
verbose: bool,
},
Repair {
verbose: bool,
},
EnsureKey {
name: String,
},
ReconcileEnrollment,
EnsureNodeAuthority,
ProvisionPolicyTemplates {
template: Vec<String>,
},
ReadbackLocalCanary {
path: PathBuf,
expected_head: String,
},
RegisterLocalCanary {
path: PathBuf,
expected_head: String,
},
}Expand description
Service management actions
Variants§
Install
Install, repair, and update hyprstream services
Idempotent setup: bootstraps directories, registry, policy files, and signing key; installs command alias and systemd units. With –start: also stops and restarts services to pick up changes. With –enable: registers units for autostart at boot (systemctl enable). With –system: installs to /etc/systemd/system/ (requires root).
Fields
Uninstall
Stop and remove systemd units
Start
Start services (via systemd or direct spawn)
Without –foreground: Uses systemd if available, else spawns background process. With –foreground: Runs service in foreground (used by systemd ExecStart). With –daemon: Bypasses systemd and spawns process directly.
Fields
foreground: boolRun in foreground instead of background
Used by systemd unit files (ExecStart) to run the service process. When running manually, keeps the service attached to the terminal.
daemon: boolForce daemon mode (bypass systemd, spawn process directly)
Use this to run services as standalone daemons even when systemd is available.
standalone: boolRun all services in a single foreground process
Starts every configured service in-process without systemd. Useful for containers, testing, and environments without a systemd user session.
services: Option<Vec<String>>Comma-separated list of services to start in multi-service foreground mode
When used with –foreground, starts all listed services in a single process. Example: –services registry,policy,model,streams,event
Stop
Stop services
Status
Show service status
Displays running services, unit file locations, and execution mode.
Repair
Diagnose the hyprstream installation
Runs all setup checks (directories, registry, policy, signing keys, TLS, bootstrap-pubkeys hybrid posture) and reports status without starting services. Dispatches before the hybrid gate so it works on a partially-broken install.
EnsureKey
Generate or load a service’s signing key and write its public sidecars
Runs the same key loader the service itself uses (with
resolve_service_signing_key semantics, so policy resolves to the
flat node/CA key), then ensures the public sidecars exist next to the
seed: signing-key.pub (32-byte Ed25519 verifying key, 0644) and
service-pubkey.hybrid (1984-byte hybrid bootstrap entry, 0644).
Idempotent: an existing key is loaded, never rotated, and up-to-date sidecars are left untouched. Does not start any services — intended for provisioning/keygen units that run before service startup.
ReconcileEnrollment
Validate retained bootstrap identities and reconcile their enrollment and JWTs
Runs offline before service startup. Never generates or rotates keys, changes the bootstrap key set, or replaces a disagreeing manifest.
EnsureNodeAuthority
Initialize or validate the node CA without provisioning a service roster
ProvisionPolicyTemplates
Persist built-in policy templates directly into the configured policy store
This offline provisioning command is intended for boot orchestration before Policy or Registry starts. It does not contact a service or load credentials.
ReadbackLocalCanary
Read back one local canary through the enrolled Registry identity. Requires query authorization; never registers or retries. Uses a fresh outbound Iroh carrier identity; N0 can publish transient reach for it.
Fields
RegisterLocalCanary
Register one existing local canary using the enrolled Registry identity. Uses a fresh outbound Iroh carrier; never retries an ambiguous write. N0 may publish transient reach for that carrier.
Trait Implementations§
Source§impl FromArgMatches for ServiceAction
impl FromArgMatches for ServiceAction
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for ServiceAction
impl Subcommand for ServiceAction
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for ServiceAction
impl RefUnwindSafe for ServiceAction
impl Send for ServiceAction
impl Sync for ServiceAction
impl Unpin for ServiceAction
impl UnsafeUnpin for ServiceAction
impl UnwindSafe for ServiceAction
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request