cli

package
v0.40.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL