cli

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: MIT Imports: 18 Imported by: 2

Documentation

Overview

Package cli provides the command-line interface for remote-ui. It exports Run() and RunWithHooks() to allow extension by wrapper projects.

Package cli provides the command-line interface for remote-ui. This file re-exports config types from internal/config for public API.

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfig = config.DefaultConfig
	Load          = config.Load
)

Re-export config functions for public API

Functions

func Run

func Run(args []string) int

Run executes the CLI with the given arguments. Returns exit code (0 = success, non-zero = error).

func RunWithHooks

func RunWithHooks(args []string, hooks *Hooks) int

RunWithHooks executes CLI with extension hooks.

Types

type Config

type Config = config.Config

Re-export config types for public API

type Duration

type Duration = config.Duration

Re-export config types for public API

type Hooks

type Hooks struct {
	// BeforeDispatch is called before command dispatch.
	// Return (handled=true, exitCode) to skip normal dispatch.
	BeforeDispatch func(command string, args []string) (handled bool, exitCode int)

	// CustomHelp returns additional help text to append.
	CustomHelp func() string

	// CustomVersion returns version info to append (optional).
	CustomVersion func() string
}

Hooks allows extending the CLI with additional commands.

type LoggingConfig

type LoggingConfig = config.LoggingConfig

Re-export config types for public API

type LuaConfig

type LuaConfig = config.LuaConfig

Re-export config types for public API

type ServerConfig

type ServerConfig = config.ServerConfig

Re-export config types for public API

type SessionConfig

type SessionConfig = config.SessionConfig

Re-export config types for public API

Jump to

Keyboard shortcuts

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