Documentation
¶
Overview ¶
Package cli holds the small amount of CLI-level glue for the Linux SpeechKit Server entry point. The actual flag parsing, config loading, logger wiring, and lifecycle handoff to internal/server/core lives here so the command remains a thin adapter around the shared Framework kernel.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
func Run(opts Options)
Run is the canonical entry point each cmd/<name>/main.go calls. It owns the entire process lifecycle: parse flags, load config, set up logging, hand off to core.Run, log the exit reason, return. It does not return an exit code — it calls os.Exit on failure so callers stay one line.
The body delegates to runOnce so we can keep `defer` clean: any non-zero exit code goes through os.Exit(code) at the end of Run, after all of runOnce's deferred cleanup has run. Calling os.Exit directly inside runOnce would short-circuit the deferred signal stop() that core.NotifySignals registers.
Types ¶
type Options ¶
type Options struct {
// Banner is the short program name printed in startup logs and the
// CLI usage line.
Banner string
// Version is set at build time via -ldflags="-X main.version=...".
// Each binary's main.go forwards its own version string here.
Version string
// DefaultModes is the mode set used when neither `[server].modes`
// in config nor the `--modes` flag are provided. nil means all
// server modes: Dictation, Assist, and Voice Agent.
DefaultModes []string
}
Options describes the command defaults main supplies.