cli

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleInstall added in v2.8.0

func HandleInstall(component string) error

HandleInstall handles the -install flag for all Linux platforms.

func HandleUninstall added in v2.8.0

func HandleUninstall(component string) error

HandleUninstall handles the -uninstall flag for all Linux platforms.

func RunApp added in v2.8.0

func RunApp(pl platforms.Platform, cfg *config.Instance, daemonMode bool) (returnErr error)

RunApp runs the main application in either daemon or TUI mode. It handles signal handling, service lifecycle, and graceful shutdown.

func Setup

func Setup(
	pl platforms.Platform,
	defaultConfig config.Values,
	writers []io.Writer,
) *config.Instance

Setup initializes the user config and logging. Returns a user config object.

func StartAndOpenBrowser added in v2.8.0

func StartAndOpenBrowser(cfg *config.Instance) error

StartAndOpenBrowser starts the service via systemd and opens the web UI in the browser.

Types

type DefaultInstaller added in v2.8.0

type DefaultInstaller struct{}

DefaultInstaller implements Installer using the real installer package.

func (DefaultInstaller) InstallApplication added in v2.8.0

func (DefaultInstaller) InstallApplication() error

func (DefaultInstaller) InstallDesktop added in v2.8.0

func (DefaultInstaller) InstallDesktop() error

func (DefaultInstaller) InstallHardware added in v2.8.0

func (DefaultInstaller) InstallHardware() error

func (DefaultInstaller) InstallService added in v2.8.0

func (DefaultInstaller) InstallService() error

func (DefaultInstaller) UninstallApplication added in v2.8.0

func (DefaultInstaller) UninstallApplication() error

func (DefaultInstaller) UninstallDesktop added in v2.8.0

func (DefaultInstaller) UninstallDesktop() error

func (DefaultInstaller) UninstallHardware added in v2.8.0

func (DefaultInstaller) UninstallHardware() error

func (DefaultInstaller) UninstallService added in v2.8.0

func (DefaultInstaller) UninstallService() error

type Flags

type Flags struct {
	Write      *string
	Read       *bool
	Run        *string
	Launch     *string
	API        *string
	Version    *bool
	Config     *bool
	ShowLoader *string
	ShowPicker *string
	Reload     *bool
}

func SetupFlags

func SetupFlags() *Flags

SetupFlags defines all common CLI flags between platforms.

func (*Flags) Post

func (f *Flags) Post(cfg *config.Instance, _ platforms.Platform)

Post actions all remaining common flags that require the environment to be set up. Logging is allowed.

func (*Flags) Pre

func (f *Flags) Pre(pl platforms.Platform)

Pre runs flag parsing and actions any immediate flags that don't require environment setup. Add any custom flags before running this.

type Installer added in v2.8.0

type Installer interface {
	InstallApplication() error
	InstallDesktop() error
	InstallService() error
	InstallHardware() error
	UninstallApplication() error
	UninstallDesktop() error
	UninstallService() error
	UninstallHardware() error
}

Installer defines the interface for install/uninstall operations. This allows mocking in tests to avoid side effects.

Jump to

Keyboard shortcuts

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